Weird version comparison in livecheck
Mojca Miklavec
mojca at macports.org
Tue Apr 26 02:26:15 PDT 2016
On 26 April 2016 at 01:04, Rainer Müller wrote:
> 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.
Thank you for explaining the mystery to me. I didn't know regexm existed.
Chris, I added some ugly trickery to get livecheck "working" for ROOT
6. I hope you don't mind.
This is what I ended up doing (just because I hate getting the error
when running livecheck):
# github.setup root-mirror root 6-06-04 v
# version [string map {- .} ${github.version}]
# livecheck.version ${github.version}
github.setup root-mirror root 7ed7e643b913a85534ccd2fbc8bfa4b50f1a0992
version 6.06.03
livecheck.version 6-06-02
If anyone has a better idea for less repetitive code, please let me know.
Mojca
More information about the macports-dev
mailing list