Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 570412 - dev-vcs/subversion-1.9.3 USE="ruby" fails to build due to bug in ebuild script
Summary: dev-vcs/subversion-1.9.3 USE="ruby" fails to build due to bug in ebuild script
Status: RESOLVED DUPLICATE of bug 570328
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-31 15:31 UTC by Sven E.
Modified: 2015-12-31 15:58 UTC (History)
0 users

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 Sven E. 2015-12-31 15:31:50 UTC
The ebuild claims that no useable ruby version is available and bails out, even if ruby is available. This seems to be owed to the ruby detection which has a major bug (MOre Info further down)

Reproducible: Always

Steps to Reproduce:
1. Put ruby in USE and have ruby 2.1 and 2.3 available
2. Try emerging subversion
3. Build bails out as it canot find ruby
Actual Results:  
Build failure due to broken ruby detection

Expected Results:  
Working build

for rbslot in $(sed 's@\([[:digit:]]\+\)\([[:digit:]]\)@\1.\2@' <<< ${USE_RUBY/ruby}) ; do
     if has_version dev-lang/ruby:${rbslot} ;  then
          RB_VER="${rbslot/.}"
          break
     fi
done

This code seems to be buggy.
USE_RUBY="ruby22 ruby21 ruby20 ruby19" generates:
2.2
ruby21
ruby20
ruby19
for $rbslot and as such the check for ruby 2.1 is against ruby:ruby21 instead of the correct slot ruby:2.1. As such RB_VER will not be filled and finally the build bails out.
Comment 1 Sven E. 2015-12-31 15:39:58 UTC
I think ${USE_RUBY/ruby} (replace first match) should actually read ${USE_RUBY//ruby}) to replace ALL matches. Sorry for not seeing this right away, I had to take a glance at the string expansions docs first.
Comment 2 Sven E. 2015-12-31 15:47:48 UTC
(In reply to Sven E. from comment #1)
> I think ${USE_RUBY/ruby} (replace first match) should actually read
> ${USE_RUBY//ruby}) to replace ALL matches. Sorry for not seeing this right
> away, I had to take a glance at the string expansions docs first.

While this removes ruby from all version-strings in USE_RUBY, sed still only replaces the first ocucrrance, I think sed needs to move into the for loop to resolve this?
Comment 3 Sven E. 2015-12-31 15:58:00 UTC

*** This bug has been marked as a duplicate of bug 570328 ***