summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-01-11 02:03:15 +0000
committerZac Medico <zmedico@gentoo.org>2008-01-11 02:03:15 +0000
commit48226fb63daf14029f123ba43059b2513813fb8a (patch)
tree775e9e556ce101c0f7a5560b68b19e77b912e487 /bin/ebuild
parentBug #204425 - Remove --delete-after from the default PORTAGE_RSYNC_OPTS. (diff)
downloadportage-multirepo-48226fb63daf14029f123ba43059b2513813fb8a.tar.gz
portage-multirepo-48226fb63daf14029f123ba43059b2513813fb8a.tar.bz2
portage-multirepo-48226fb63daf14029f123ba43059b2513813fb8a.zip
Make sure that portdb.findname() returns the correct ebuild.
svn path=/main/trunk/; revision=9164
Diffstat (limited to 'bin/ebuild')
-rwxr-xr-xbin/ebuild5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/ebuild b/bin/ebuild
index 7aebd8a3..1c4acef7 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -60,6 +60,11 @@ ebuild = portage.normalize_path(ebuild)
ebuild_portdir = os.path.realpath(os.path.dirname(os.path.dirname(ebuild)))
ebuild = os.path.join(ebuild_portdir, *ebuild.split(os.path.sep)[-2:])
+# Make sure that portdb.findname() returns the correct ebuild.
+del portage.portdb.porttrees[1:]
+if ebuild_portdir != portage.portdb.porttree_root:
+ portage.portdb.porttrees.append(ebuild_portdir)
+
if not os.path.exists(ebuild):
print "'%s' does not exist." % ebuild
sys.exit(1)