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 duplicates correctly (see e.g.
the duplicate || ( ... ) issue in *DEPEND).

This doesn't fix all instances and to be honest, it's a bit dubious given 
has_iuse
doesn't work in global scope, but let's just fix the thing which is definitely
wrong (the quoting).

This does change the metadata generated in the way I expected, but it doesn't
remove *all* duplicates.

Signed-off-by: Sam James <s...@gentoo.org>
---
 eclass/ruby-ng.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index b81038237a6b..b63dd19e18f2 100644
--- a/eclass/ruby-ng.eclass
+++ b/eclass/ruby-ng.eclass
@@ -234,7 +234,7 @@ ruby_add_rdepend() {
                6) DEPEND="${DEPEND} test? ( ${dependency} )" ;;
                *) BDEPEND="${BDEPEND} test? ( ${dependency} )" ;;
        esac
-       if ! has test "$IUSE"; then
+       if ! has test ${IUSE}; then
                IUSE+=" test"
                RESTRICT+=" !test? ( test )"
        fi
-- 
2.40.0


Reply via email to