...or perhaps it does, but only for first element in USE_RUBY. What I suspect is that ${USE_RUBY/ruby} can't work in a different matter. Probably most simple solution is to let sed handle that to - just putting 'ruby' right after ''s@' should work (I've only tested the ebuild with '-e 's@ruby@@g -e', but compact should be just fine). Of course the other part is that that substitute should end with 'g' for it to work at all for the later arguments.
*** Bug 570412 has been marked as a duplicate of this bug. ***
While not being too elegant: for rbslot in ${USE_RUBY//ruby} ; do rbslot=$(sed 's@\([[:digit:]]\+\)\([[:digit:]]\)@\1.\2@' <<< $rbslot) echo $rbslot if has_version dev-lang/ruby:${rbslot} ; then RB_VER="${rbslot/.}" break fi done works for me for 1.9.3, can someone check on the other versions?
(In reply to Sven E. from comment #2) > While not being too elegant: > > for rbslot in ${USE_RUBY//ruby} ; do > rbslot=$(sed 's@\([[:digit:]]\+\)\([[:digit:]]\)@\1.\2@' <<< > $rbslot) > if has_version dev-lang/ruby:${rbslot} ; then > RB_VER="${rbslot/.}" > break > fi > done > > works for me for 1.9.3, can someone check on the other versions? Erhm *cough* *cough*, we can leave out the debug-echo of course ;-).
commit 6fb38ffb961e55e91ff94c762a2e35261ecc99ea Author: Lars Wendler <polynomial-c@gentoo.org> Date: Fri Mar 18 15:50:08 2016 dev-vcs/subversion: Fixed ruby version detection (bug #570328). Package-Manager: portage-2.2.28 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>