Subject: Re: RFC: Removing redundancy from packages that use bsd.options.mk
To: Dieter Baron <dillo@danbala.tuwien.ac.at>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 06/06/2007 14:00:28
Dieter Baron wrote:
> In article <466665EB.9020502@NetBSD.org> Roland wrote:
> : +.if defined(PKGNAME)
> : +PKG_OPTIONS_VAR?=      PKG_OPTIONS.${PKGNAME:C/-[0-9].*//}
> 
>   This pattern is wrong.  It should be /-[^-]*$//.  This is precicly
> the reason I did not want to duplicate it.  If you go ahead with this
> (and I would prefer you didn't), please add comments here and
> wherever PKGBASE is defined that the two versions must be kept in
> sync.

In practice, both patterns should do the same. I think, up to now we 
don't have any packages whose name looks like pkgbase-1.0-1.1.1, and 
pkglint tries to prevent them anyway. But you are right that using only 
one pattern consistently is better.

Roland