Opened 4 years ago
Closed 4 years ago
#61702 closed defect (duplicate)
livecheck version comparison sees -pre suffix as newer than same version without -pre suffix
Reported by: | Tatsh (Andrew Udvare) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.6.4 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt), tobypeterson, raimue (Rainer Müller), jmroot (Joshua Root) | |
Port: |
Description
Using livecheck with this package:
https://github.com/GothenburgBitFactory/timewarrior/tags
Portfile is here: https://github.com/Tatsh/ports/blob/master/office/timew/Portfile
This package has a -pre
tagged version v1.4.2
that is seen as newer than the final release of v1.4.2
. The top version under /tags
on GitHub is usually the newest, but also -pre
should be considered older than a version with the same numbers but without -pre. Same goes for [.-](alpha|beta)[0-9]+?$
.
Debug output:
DEBUG: Fetching https://github.com/GothenburgBitFactory/timewarrior/tags DEBUG: Using CURL options "--append-http-header" "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" DEBUG: The regex is "archive/v([^"]+)\.tar\.gz" DEBUG: The regex matched "archive/v1.4.2.tar.gz", extracted "1.4.2" DEBUG: The regex matched "archive/v1.4.2-pre.tar.gz", extracted "1.4.2-pre" DEBUG: The regex matched "archive/v1.4.1.tar.gz", extracted "1.4.1" DEBUG: The regex matched "archive/v1.4.0.tar.gz", extracted "1.4.0" DEBUG: The regex matched "archive/v1.3.0.tar.gz", extracted "1.3.0" DEBUG: The regex matched "archive/v1.2.0.tar.gz", extracted "1.2.0" DEBUG: The regex matched "archive/v1.1.1.tar.gz", extracted "1.1.1" DEBUG: The regex matched "archive/v1.1.0.tar.gz", extracted "1.1.0" DEBUG: The regex matched "archive/v1.0.0.tar.gz", extracted "1.0.0" DEBUG: The regex matched "archive/v1.0.0.beta1.tar.gz", extracted "1.0.0.beta1" timew seems to have been updated (port version: 1.4.2, new version: 1.4.2-pre)
Change History (5)
comment:1 Changed 4 years ago by mf2k (Frank Schima)
Keywords: | version livecheck removed |
---|
comment:2 follow-up: 4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
See also #55514 for my comments and concerns on the previous request to make livecheck smarter.
comment:4 Changed 4 years ago by Tatsh (Andrew Udvare)
Replying to ryandesign:
Livecheck works using the
vercmp
procedures, which just does numeric comparisons of versions. It is not aware of nonstandard suffixes like "-pre" and does not assign any special meaning to them, and I'm not sure that it's appropriate for support for such suffixes to be added. Usually individual ports override the livecheck regex as needed to accommodate that project's particular version numbering strategy. For example in this case you might usegithub.livecheck.regex {([0-9.]+)}to exclude all versions that are not composed solely of numbers and periods.
This is good enough for me for packages like this. Thanks
comment:5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Livecheck works using the
vercmp
procedures, which just does numeric comparisons of versions. It is not aware of nonstandard suffixes like "-pre" and does not assign any special meaning to them, and I'm not sure that it's appropriate for support for such suffixes to be added. Usually individual ports override the livecheck regex as needed to accommodate that project's particular version numbering strategy. For example in this case you might useto exclude all versions that are not composed solely of numbers and periods.