New ports can be only committed with DISTVERSION, not PORTVERSION, when it factors into DISTFILES.
I don't see where this is stated in the Porter's Handbook. One may need to use PORTVERSION if the proper version cannot be derived from DISTVERSION. In particular: " If the version contains letters, it might be needed to set PORTVERSION and not DISTVERSION" I'd rather not add an error-prone check when things have been working fine for a while now.
Both tcberner@ abd mat@ say that this is a requirement. They returned my patches countless times because portlint didn't complain about PORTVERSION.
I'm not sure. I haven't been part of those conversations. But as you have written this PR, I don't see what should be done that is in line with the porter's handbook. If you can provide more details or a patch showing the precise check and how it relates to the PH, that would be helpful.
(In reply to Joe Marcus Clarke from comment #3) @tcberner Tobias, could you please advice what is the best way to fix portlint so that it can warn about the wrongly used PORTVERSION?
How about something like @@ -2583,6 +2583,11 @@ "specified, not both."); } if ($newport) { + if ($tmp =~ /\nPORTVERSION.?=/) { + &perror("WARN", $file, -1, "new ports should prefer DISTVERSION over PORTVERSION") + } + } + if ($newport) { print "OK: checking for existence of PORTREVISION in new port.\n" if ($verbose); if ($tmp =~ /^PORTREVISION(.)?=/m) { [1] https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-naming.html#makefile-versions
Thanks, Tobias. I agree, this is where such a check would go, but I have a hard time reconciling this with the PH where it states that DISTVERSION might not be sufficient given the syntax of the DISTVERSION. So would this not just cause more confusion for new porters? Is there a reliable regex that would indicate that a PORTVERSION is being used where DISTVERSION would be better?