Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 570328 - dev-vcs/subversion-1.8.15: ruby selection sed expression doesn't work
Summary: dev-vcs/subversion-1.8.15: ruby selection sed expression doesn't work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
: 570412 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-12-31 04:04 UTC by Rafał Mużyło
Modified: 2016-03-18 14:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Mużyło 2015-12-31 04:04:03 UTC
...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.
Comment 1 Sven E. 2015-12-31 15:58:00 UTC
*** Bug 570412 has been marked as a duplicate of this bug. ***
Comment 2 Sven E. 2015-12-31 16:00:05 UTC
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?
Comment 3 Sven E. 2015-12-31 16:01:12 UTC
(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 ;-).
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-03-18 14:55:20 UTC
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>