Opened 7 years ago
Last modified 7 years ago
#55514 new enhancement
Add semantic versioning support to livecheck
Reported by: | emcrisostomo (Enrico Maria Crisostomo) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | |
Keywords: | Cc: | ||
Port: |
Description
Today I noticed the following while working on a port update:
$ port livecheck devel/mongo-tools mongo-tools seems to have been updated (port version: 3.6.0, new version: 3.6.0-rc8)
The devel/mongo-tools
port uses the default livecheck
settings set by the github
port group.
I'm aware that version numbers are tricky to sort, and that many different versioning schemes are used, so there are no silver bullets. But since semantic versioning is widely used nowadays, perhaps we could kill many birds with a stone and avoid port maintainers to come up with custom regexes. The databases/mongo
port, for example, uses the same versioning scheme used by devel/mongo-tools
, and it overcomes this problem using a custom regex that drops the -*
and only captures the dot-separated numerical part of the version number).
Implementing sorting of version numbers adhering to semver isn't complicated. Actually, I could contribute code to do it.
Change History (4)
comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 7 years ago by mf2k (Frank Schima)
Keywords: | livecheck removed |
---|
comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to emcrisostomo:
Actually, I could contribute code to do it.
That code says it is licensed under GPL-3+. I don't think we would be able to accept code under that license into MacPorts base, which is licensed BSD. If you wrote that code, you could presumably offer to license it to us under BSD if you wanted to.
comment:4 Changed 7 years ago by emcrisostomo (Enrico Maria Crisostomo)
I will certainly be happy to license any code of mine under BSD anyway :) Thanks for your feedback, Ryan. I will dedicate some time to this during the weekend.
Generally I like the idea of making our version comparisons more accurate. But note that livecheck uses the
vercmp
procedure, so any changes you make there will affect not only livecheck but also portfiles that usevercmp
, and probably even the computations ofport outdated
. This might change the criteria portfile authors use when deciding whether to increase theepoch
. So these changes certainly need to be done with great care and forethought, and communication with portfile authors (i.e. documentation) about the changedepoch
requirements.