Weird version comparison in livecheck

Rainer Müller raimue at macports.org
Mon Apr 25 16:04:48 PDT 2016


On 2016-04-25 18:29, Mojca Miklavec wrote:
> The problem is that in the second case the livecheck breaks. I tried
> to work around the issue by specifying
> 
>     livecheck.url       ${github.homepage}/tags
>     livecheck.regex     {archive/v(6[-.]\d[02468][-.]\d{2}).tar.gz}
>     set xversion        [string map {. -} ${version}]
>     livecheck.version   ${xversion}
> 
> but the weird thing is that I then end up with an old version:
> 
> DEBUG: Fetching https://github.com/root-mirror/root/tags
> DEBUG: The regex is "archive/v(6[-.]\d[02468][-.]\d{2}).tar.gz"
> DEBUG: The regex matched "archive/v6-04-16.tar.gz", extracted "6-04-16"
> root6 seems to have been updated (port version: 6-06-02, new version: 6-04-16)

If the github.version looks like a commit hash (at least 9 hex
characters), the github port group changes livecheck.type to 'regexm'.
With this type, the regex is only applied once against the whole file
(to support multiline matching). That is why you get only a single match
in the above output.

You also need to set

  livecheck.type regex

to switch back to the default mode, which applies the regex on each line
of the fetched documented.

Rainer


More information about the macports-dev mailing list