• [gentoo-dev] [PATCH 1/3] ruby-ng.eclass: improve error when no valid Ru

    From Sam James@21:1/5 to All on Wed Mar 29 17:40:01 2023
    This means we don't get confusing *DEPEND/REQUIRED_USE errors about it being unparseable and instead just get a straightforward die message indicating
    the problem.

    Signed-off-by: Sam James <sam@gentoo.org>
    ---
    eclass/ruby-ng.eclass | 7 ++++++-
    1 file changed, 6 insertions(+), 1 deletion(-)

    diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
    index c273a431c5b1..b81038237a6b 100644
    --- a/eclass/ruby-ng.eclass
    +++ b/eclass/ruby-ng.eclass
    @@ -103,16 +103,21 @@ ruby_implementation_depend() {
    # Return a list of valid implementations in USE_RUBY, skipping the old
    # implementations that are no longer supported.
    _ruby_get_all_impls() {
    - local i
    + local i found_valid_impl
    for i in ${USE_RUBY}; do
    case ${i} in
    # removed implementations
    ruby19|ruby20|ruby21|ruby22|ruby23|ruby24|ruby25|ruby26|jruby)
    ;;
    *)
    + found_valid_impl=1
    echo ${i};;
    esac
    done
    +
    + if [[ -z ${found_valid_impl} ]] ; then
    + die "No supported implementation in USE_RUBY."
    + fi
    }

    # @FUNCTION: ruby_samelib
    --
    2.40.0

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

    Signed-off-by: Sam James <sam@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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans de Graaff@21:1/5 to Sam James on Fri Mar 31 11:30:01 2023
    On Wed, 2023-03-29 at 16:39 +0100, Sam James wrote:
    This means we don't get confusing *DEPEND/REQUIRED_USE errors about
    it being
    unparseable and instead just get a straightforward die message
    indicating
    the problem.


    All three patches look good to me.

    Hans

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

    iQEzBAABCAAdFiEEIggVRmJzp0YePtgn2zR/k4ZU+jQFAmQmp9kACgkQ2zR/k4ZU +jQbIQf9HUyQ6hXK+DBIPH5ieqRgtwv4b1Xpl8XowrOvtIHeVewL/K+pFHm1T+oD b4EiEc/aAQypbjod9jyw/bGI4bNFqbouh7tALMxtxd4Po00DaIn9r7nQ8v0RAU9t H2HrJ7g7OBsntSgtG/0N2vvl2vFyfM5Gu5IZbhJdvR1GhdOxV5Q7Fpb7zaYkH8I3 ckVwQpdLQEtot419JQlxOhg+Fd8mt2ilAd0HH13xKyOoKqayI6kuPPjHw/RMh+e9 1BMVGdhrBHyOFnIBRMDrM3rsiCpnnpsqc+yZeBJMZW5HlNNWl1J20gp+m6Voe+GX 8jSYvQPGz+tdF2f1g1YeNYqfLK5vMA==
    =W6qr
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam James@21:1/5 to Hans de Graaff on Fri Mar 31 22:30:01 2023
    Hans de Graaff <graaff@gentoo.org> writes:

    [[PGP Signed Part:Undecided]]
    On Wed, 2023-03-29 at 16:39 +0100, Sam James wrote:
    This means we don't get confusing *DEPEND/REQUIRED_USE errors about
    it being
    unparseable and instead just get a straightforward die message
    indicating
    the problem.


    All three patches look good to me.

    Thanks! I'm going to rework the IUSE test stuff based on the feedback
    as it's apparently fragile to do at all.


    Hans

    [[End of PGP Signed Part]]


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

    iOUEARYKAI0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCZCdCR18UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MA8cc2FtQGdlbnRv by5vcmcACgkQc4QJ9SDfkZCdHgD9HEEQMojeFd/xwRJ2lLuePS6wSeRTCB0pb4pc g5JHUwUA/0jlz2VMxFBYqu/PWmnATr2iWiYwr0aST5ny3Vv10ecD
    =OGLD
    -----END PGP SIGNATURE-----

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