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

    From Sam James@21:1/5 to Ulrich Mueller on Wed Mar 29 18:40:02 2023
    Ulrich Mueller <ulm@gentoo.org> 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, in which case you're out of luck).

    Yep, it is, unfortunately. I can try ripping it out entirely given it's
    not reliable, depending on how others feel about it.

    -----BEGIN PGP SIGNATURE-----

    iOUEARYKAI0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCZCRn+18UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MA8cc2FtQGdlbnRv by5vcmcACgkQc4QJ9SDfkZAGSwD/QjuTlKKWSIxBe9hxih6043NHy1fSNXsLeWUM j2kWq0UBANksKUf2Dc8q7sREEkG2WOAQ2XU2OXgD1GFXcAiWBw0H
    =Q8Xk
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ulrich Mueller@21:1/5 to All on Wed Mar 29 18:20:01 2023
    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).

    Ulrich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)