summaryrefslogtreecommitdiffstats
path: root/bin/ebuild
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-16 21:52:31 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-16 21:52:31 -0700
commitfc1eae78e3f086da4ce8fb32504b7a3d615d054c (patch)
tree71273ff0c0489c4b9420cdacf3bdaaca0417892b /bin/ebuild
parent7161609fd9606245a5100683eac526f282b0c1a7 (diff)
downloadportage-fc1eae78e3f086da4ce8fb32504b7a3d615d054c.tar.gz
portage-fc1eae78e3f086da4ce8fb32504b7a3d615d054c.tar.bz2
portage-fc1eae78e3f086da4ce8fb32504b7a3d615d054c.zip
For ebuilds from $ROOT/var/db/pkg, don't give /var/db/pkg with the
"Appending /var/db/pkg to PORTDIR_OVERLAY..." treatment.
Diffstat (limited to 'bin/ebuild')
-rwxr-xr-xbin/ebuild5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/ebuild b/bin/ebuild
index 617cad355..658652f5a 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -74,6 +74,7 @@ from portage import _encodings
from portage import _shell_quote
from portage import _unicode_decode
from portage import _unicode_encode
+from portage.const import VDB_PATH
if not opts.ignore_default_opts:
default_opts = portage.settings.get("EBUILD_DEFAULT_OPTS", "").split()
@@ -129,9 +130,11 @@ ebuild = portage.normalize_path(ebuild)
ebuild_portdir = os.path.realpath(
os.path.dirname(os.path.dirname(os.path.dirname(ebuild))))
ebuild = os.path.join(ebuild_portdir, *ebuild.split(os.path.sep)[-3:])
+vdb_path = os.path.join(portage.settings['ROOT'], VDB_PATH)
# Make sure that portdb.findname() returns the correct ebuild.
-if ebuild_portdir not in portage.portdb.porttrees:
+if ebuild_portdir != vdb_path and \
+ ebuild_portdir not in portage.portdb.porttrees:
if sys.hexversion >= 0x3000000:
os.environ["PORTDIR_OVERLAY"] = \
os.environ.get("PORTDIR_OVERLAY","") + \