Date: Thu, 27 Nov 2003 17:15:44 +0100 From: Oliver Eikemeier <eik@FreeBSD.org> To: Sergey Matveychuk <sem@ciam.ru> Cc: Joe Marcus Clarke <marcus@FreeBSD.org> Subject: Re: PORTVERSION and portlint Message-ID: <3FC62330.6060507@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
Sergey Matveychuk wrote: > What's wrong with '+' sign in PORTVERSION? > www/apache13+modssl, russian/apache* and dns/bind9-dlz ports use it for > separating port version and module version. I think it's a good practice. > > But portlint marks it as FATAL. May be make a sense this simple patch to > apply? > > --- > Sem. > -------------- next part -------------- > --- portlint.orig Thu Nov 27 01:22:30 2003 > +++ portlint Thu Nov 27 01:23:04 2003 > @@ -1535,7 +1535,7 @@ > &perror("FATAL: $file: PORTVERSION must be specified"); > } > if ($portversion =~ /^pl[0-9]*$/ > - || $portversion =~ /^[0-9]*[A-Za-z]?[0-9]*(\.[0-9]*[A-Za-z]?[0-9]*)*$/) { > + || $portversion =~ /^[0-9]*[A-Za-z]?[0-9]*(\.[0-9]*[A-Za-z]?[0-9+]*)*$/) { > print "OK: PORTVERSION \"$portversion\" looks fine.\n" if ($verbose); > } elsif ($portversion =~ /^[^\-]*\$[{\(].+[\)}][^\-]*$/) { > &perror("WARN: $file: using variable, \"$portversion\", as version ". The problem with `+' in PORTVERSIONs is that they suggest a semantic that the current port tools don't conform with. I did some test for PR 56961: <http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/56961> and realized that 1.0.1+2003.11.27 < 1.0+2003.10.03, try pkg_version -t 1.0.1+2003.11.27 1.0+2003.10.03 See also the FreeBSD Porter's Handbook, 4.2.4 Package Naming Conventions: The idea is to make it easier to sort ports by looking at the version string. In mparticular, make sure version number components are always delimited by a period [...] <http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-naming.html#PORTING-PKGNAME> It is no problem to extend PR 56961 so that the plus sign is a real separator between version numbers, but that change is incompatible with current port tools (although nobody will notice, I guess). Currently you can only use `.' as a separator in version numbers and be more or less sure what you'll get. I would keep that error, or at least issue a warning. The ports should use PORTVERSION= ${VERSION_ONE}.${VERSION_TWO} until the port tools can handle multi-version numbers. -Oliver
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FC62330.6060507>