Re: [gentoo-dev] [PATCH v2 2/3] ruby-ng.eclass: don't quote IUSE in has test

2023-03-29 Thread Sam James
Ulrich Mueller writes: >> On Wed, 29 Mar 2023, Sam James wrote: > >> -if ! has test "$IUSE"; then >> +if ! has test ${IUSE}; then > > You cannot reliably test for a flag in IUSE with code like this. > PMS defines the function in_iuse() for this (unless the above is > in global scope,

Re: [gentoo-dev] [PATCH v2 2/3] ruby-ng.eclass: don't quote IUSE in has test

2023-03-29 Thread Ulrich Mueller
> On Wed, 29 Mar 2023, Sam James wrote: > - if ! has test "$IUSE"; then > + if ! has test ${IUSE}; then You cannot reliably test for a flag in IUSE with code like this. PMS defines the function in_iuse() for this (unless the above is in global scope, in which case you're out of luck).

[gentoo-dev] [PATCH v2 2/3] ruby-ng.eclass: don't quote IUSE in has test

2023-03-29 Thread Sam James
I was looking at the generated metadata for nokogiri and noticed several instances of 'test' in IUSE & RESTRICT. Ended up finding that the quoting of 'IUSE' in has is wrong here. This isn't explicitly wrong, but it's a bit ugly in the generated metadata, and I'm not convinced Portage handles dupli