Set PORTDIR_OVERLAY (rather than PORTDIR) when portage wants to use a different ebuild.
authorJason Stubbs <jstubbs@gentoo.org>
Tue, 11 Oct 2005 12:46:33 +0000 (12:46 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Tue, 11 Oct 2005 12:46:33 +0000 (12:46 -0000)
(Yields the same behaviour when stuff isn't missing in the same tree and better behaviour when there is)

svn path=/main/branches/2.0/; revision=2124

bin/ebuild

index 75386c7f61338542e2e1c293627c35f341b76351..45f2442e6d1892f05377f11ad536718c370f06c2 100755 (executable)
@@ -37,10 +37,9 @@ cpv = "/".join(ebuild_split[-2:])[:-7]
 
 portage_ebuild = portage.portdb.findname(cpv)
 
-if portage_ebuild != ebuild:
-       os.environ["PORTDIR"] = "/".join(ebuild_split[:-2])
-       os.environ["PORTDIR_OVERLAY"] = ""
-       print "Adjusting PORTDIR to '%s'..." % os.environ["PORTDIR"]
+if not portage_ebuild or os.path.abspath(portage_ebuild) != ebuild:
+       os.environ["PORTDIR_OVERLAY"] = "/".join(ebuild_split[:-2])
+       print "Adjusting PORTDIR_OVERLAY to '%s'..." % os.environ["PORTDIR_OVERLAY"]
        reload(portage)