Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 264029

Summary: ruby.eclass breaks on Gentoo prefix
Product: Gentoo/Alt Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: normal CC: ruby
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2009-03-28 01:44:21 UTC
Trying to install dev-ruby/test-unit:

>>> Install test-unit-2.0.2-r1 into /opt/gentoo/var/tmp/portage/dev-ruby/test-unit-2.0.2-r1/image/opt/gentoo/ category dev-ruby
-------------------------------------------------------
You should not use ${EPREFIX} with helpers.
  --> /opt/gentoo/usr/lib/ruby/site_ruby
-------------------------------------------------------
 * ERROR: dev-ruby/test-unit-2.0.2-r1 failed:
 *   failed to install -r test
 * 
 * Call stack:
 *               ebuild.sh:  48: <call src_install>
 *             environment:2379: <call doruby '-r' 'test'>
 *             environment: 586:     doins "$@" ) || die "failed to install $@"

The problem is in the doruby() function:

doruby() {
        ( # dont want to pollute calling env
                insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
                insopts -m 0644
                doins "$@"
        ) || die "failed to install $@"
}

opensolaris test-unit # ruby -r rbconfig -e 'puts Config::CONFIG["sitedir"]'
/opt/gentoo/usr/lib/ruby/site_ruby
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-03-28 01:52:34 UTC
fixed, thx for reporting.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-03-28 13:01:33 UTC
Actually, it's still broken ^^;

It strips ${EPREFIX} from the target (which is not eprefixed) rather than from the insinto :)
Comment 3 Fabian Groffen gentoo-dev 2009-03-28 13:46:42 UTC
right, good catch, thanks