tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: OS_VERSION and NetBSD 10.0



On 23.04.2021 14:09, nia wrote:
The release of NetBSD 10.0 will cause problems in pkgsrc due to the
number of packages that attempt to evaluate the major version with
:M on OS_VERSION.

Do you have some examples for these badly behaving packages?

When I searched for "OS_VERSION:M" in pkgsrc, I found these, which are
all fine since "." means a literal ".", not "an arbitrary character".

${OPSYS} == "NetBSD" && !empty(OS_VERSION:M[45].*)

empty(OS_VERSION:M6.99.[4-9]?) && empty(OS_VERSION:M[7-9].*)

${OPSYS} == "NetBSD" && !empty(OS_VERSION:M[0-3].*)

I can see that patterns like "1*" are bad, but pkglint already warns
about these:

$ pkglint -s
> .if ${OS_VERSION:M1*}
WARN: Makefile:28: Please use "1.*" instead of "1*" as the version pattern.

To find all of these, just run pkglint on the whole pkgsrc tree:
"pkglint -r".

If you are worried that ":M0.*" may match "10.0": it doesn't, since the
':M' patterns are implicitly anchored at both ends.

Is there anything else I missed?

Roland


Home | Main Index | Thread Index | Old Index