I would like to add a port made of two independently versioned components. The first component is fetched from git with no versioning (so version g20220630), the second component is a more conventional version (Apr2022 which I translate into 2022.04). So the complete PORTVERSION ends up being g20220630+2022.04 Unfortunately portlint doesn't like this version. The regex used for checking portversions is $portversion =~ /^[0-9]*[A-Za-z]?[0-9]*(\.[0-9]*[A-Za-z]?[0-9+]*)*$/ Which only permits port versions with a + after a dot and the + must be succeeded by numbers. How about changing it to $portversion =~ /^[0-9]*[A-Za-z]?[0-9]*([.+][0-9]*[A-Za-z]?[0-9]*)*$/ to fix the detection of port versions? Note that this regular expression still matches port versions with nothing after the +, but now it also matches my port version.
Added to my private git repo pending the next release.
Committed, thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9800743f0178a43313a7248f7ef2bcabfacef23d commit 9800743f0178a43313a7248f7ef2bcabfacef23d Author: Joe Marcus Clarke <marcus@FreeBSD.org> AuthorDate: 2022-09-07 17:21:52 +0000 Commit: Joe Marcus Clarke <marcus@FreeBSD.org> CommitDate: 2022-09-07 17:24:21 +0000 ports-mgmt/portlint: Update to 2.19.13 * Allow for a plus ('+') in other places in a PORTVERSION [1] * Check for .dkestop file installation [2] * Support the new Makefile WWW macro [3] PR: 265364 [1] 265551 [2] 266068 [3] Submitted by: Robert Clausecker [1] se [3] ports-mgmt/portlint/Makefile | 2 +- ports-mgmt/portlint/src/portlint.pl | 71 +++++++++++++++++++++++++++---------- 2 files changed, 53 insertions(+), 20 deletions(-)
The check is still kind of weird. Instead of the $portversion =~ /^[0-9]*[A-Za-z]?[0-9]*([.+][0-9]*[A-Za-z]?[0-9]*)*$/ I recommended, it now reads $portversion =~ /^[0-9]*[A-Za-z]?[0-9]*([.+][0-9]*[A-Za-z]?[0-9+]*)*$/ i.e. there is an extra + in [0-9]+. While this does not change the set of accepted versions, it should perhaps be looked into to make the regex less confusing.