Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 242100 - subversion.eclass fails when ROOT variable is set - 'Unable to resolve dev-vcs/subversion to an installed package'
Summary: subversion.eclass fails when ROOT variable is set - 'Unable to resolve dev-vc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Akinori Hattori
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-14 19:25 UTC by Sven 'sleipnir' Rebhan
Modified: 2012-07-29 05:43 UTC (History)
4 users (show)

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


Attachments
workaround for the built_with_use + ROOT issue (subversion.eclass-built_with_use.patch,741 bytes, patch)
2008-10-14 19:26 UTC, Sven 'sleipnir' Rebhan
Details | Diff
patch (subversion-cross-fix.patch,1.20 KB, patch)
2009-01-13 17:08 UTC, Robert Piasek (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven 'sleipnir' Rebhan 2008-10-14 19:25:19 UTC
Calling subversion_src_unpack fails if I emerge with the ROOT environment variable set. The error message is:
'Unable to resolve dev-util/subversion to an installed package'

I tracked the problem down to the built_with_use calls in line 172 and 173 of the subversion.eclass file. The mentioned function uses the ROOT variable to evaluate the conditions which is wrong for e.g. cross-compilation environments.

The following patch works around the problem by faking ROOT for just this two calls in the eclass.

Reproducible: Always

Steps to Reproduce:
1.make sure subversion is installed in /
2.set ROOT=/somewhere, where subversion is not installed in /somewhere
3.emerge an ebuild that inherits subversion
Comment 1 Sven 'sleipnir' Rebhan 2008-10-14 19:26:30 UTC
Created attachment 168470 [details, diff]
workaround for the built_with_use + ROOT issue
Comment 2 Robert Piasek (RETIRED) gentoo-dev 2009-01-13 17:08:52 UTC
Created attachment 178397 [details, diff]
patch

How about something like this?

For cross-compilation we completely don't need this check.

Tested with portage and paludis.
Comment 3 Bishop Bettini 2010-06-23 20:57:16 UTC
Note that this bug seems to be a specific instance of Bug 145134

Note that submitted patches may not work now that subversion moved from dev-util to dev-vcs category
Comment 4 Nicolas Perrenoud 2012-04-26 09:26:51 UTC
This bug is still not fixed!

Environment: Up-to date portage tree, destination is ROOT=/some/dir, using company internal ebuilds (therefore names replaced witih 'example') with 
ESVN_REPO_URI="https://some-internal-server/svn/${PN}/tags/${PV}".

Installed Subversion:

dev-vcs/subversion-1.6.17-r7  USE="bash-completion berkdb dso nls sasl webdav-neon -apache2 -ctypes-python -debug -doc -emacs -extras -gnome-keyring -java -kde -perl -python -ruby -vim-syntax -webdav-serf"

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) net-misc/example-2.2.0-r2 from example for /some/dir/
>>> Unpacking source...
 * ERROR: net-misc/example-2.2.0-r2 failed (unpack phase):
 *   Unable to resolve dev-vcs/subversion to an installed package
 *
 * Call stack:
 *     ebuild.sh, line   85:  Called src_unpack
 *   environment, line 2074:  Called subversion_src_unpack
 *   environment, line 2366:  Called subversion_fetch
 *   environment, line 2206:  Called built_with_use '-o' 'dev-vcs/subversion' 'webdav-neon' 'webdav-serf'
 *   environment, line  246:  Called die
 * The specific snippet of code:
 *       [[ -z ${PKG} ]] && die "Unable to resolve $1 to an installed package";
 *
 * If you need support, post the output of 'emerge --info =net-misc/example-2.2.0-r2',
 * the complete build log and the output of 'emerge -pqv =net-misc/example-2.2.0-r2'.
 * This ebuild used the following eclasses from overlays:
 *   /usr/local/portage/overlays/example/eclass/example-utils.eclass
 * This ebuild is from an overlay named 'example': '/usr/local/portage/overlays/example/'
 * The complete build log is located at '/var/tmp/portage/net-misc/example-2.2.0-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/example-2.2.0-r2/temp/environment'.
 * S: '/var/tmp/portage/net-misc/example-2.2.0-r2/work/example-2.2.0'
Comment 5 Akinori Hattori gentoo-dev 2012-07-29 05:43:36 UTC
Replace built_with_use by USE deps.