Weird version comparison in livecheck
Mojca Miklavec
mojca at macports.org
Mon Apr 25 09:29:06 PDT 2016
Hello,
I'm fighting with the livecheck for root6.
The thing is ... it works perfectly as long as we use
github.setup root-mirror root 6-06-02 v
version [string map {- .} ${github.version}]
But occasionally the developers fix a problem that prevents us to
build the latest version on MacPorts, so we use:
github.setup root-mirror root 7ed7e643b
version 6.06.03
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)
While if I use
github.setup root-mirror root 6-06-02 v
or
github.setup root-mirror root 6-06-03 v
I end up with the correct output:
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"
DEBUG: The regex matched "archive/v6-06-02.tar.gz", extracted "6-06-02"
DEBUG: The regex matched "archive/v6-04-14.tar.gz", extracted "6-04-14"
DEBUG: The regex matched "archive/v6-06-00.tar.gz", extracted "6-06-00"
root6 seems to be up to date
or
Error: livecheck failed for root6: extracted version '6-06-02' is
older than livecheck.version '6-06-03'
Can someone help me understand what exactly is going on and why
livecheck is giving me an older version?
Thank you,
Mojca
More information about the macports-dev
mailing list