Hi Rainer, 
Hi all,

On 29 Apr 2015, at 19:04, Rainer Müller <rai...@macports.org> wrote:

> On 2015-04-29 18:47, petr wrote:
>> I am trying to understand how the default livecheck mechanism and the
>> files in _resources/port1.0/livecheck, are supposed to work. I
>> somehow assumed the name of the tcl file in the directory should be
>> matched by the mirror site key. But is there some documentation on
>> this? I have not found anything useful on this.
> 
> The filename has to match the value of the option livecheck.type.
> 
> The default option "livecheck.type default" uses some hardcoded rules in
> base [1] to guess a more appropriate value based on master_sites or
> homepage.

Actually, my assumption described above is kind of correct (at least if I read 
the sources correctly). If option "livecheck.type" is set "default", and 
"master_sites" uses some sort of "$mirror:xxx" pattern (the one used to 
reference the mirrors in _resources/port1.0/ , the mirror is used to execute 
the mirror.tcl file in _resources/port1.0/livecheck. 

However, what tricked me is what I would consider an inconsistency across 
various procedures in base wrt to the handling of there _resources directories. 
While in most cases the changes in a local ports repository are 
evaluated/consider, e.g portfetch.tcl for _resources/port1.0/fetch, 
portinstall.tcl for _resources/port1.0/group uses procedure 
macports::getportresourcepath, portlivecheck.tcl uses 
macports::getdefaultportresourcepath and therefore evaluates the resource 
directory at the default location, which defaults to 
'/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/livecheck'
 only.

I am not very familiar with base so far. Am I correct in the assumption, that 
this "inconsistency" could be fixed by replacing getdefaultportresourcepath 
with getportresourcepath in portlivecheck.tcl. Should I turn this into a 
ticket? Just commit?

Thanks!
~petr


_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to