ebuild(1): fix breakage for /var/db/pkg ebuilds
authorZac Medico <zmedico@gentoo.org>
Tue, 26 Oct 2010 19:45:30 +0000 (12:45 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 26 Oct 2010 19:45:30 +0000 (12:45 -0700)
bin/ebuild
pym/portage/dbapi/vartree.py

index ae793ac4d6c797a1835b333cb5ef422354ef1a19..93859327dc5049e8c7c1b7ef5df22508d374d6c9 100755 (executable)
@@ -153,9 +153,11 @@ if ebuild_portdir != vdb_path and \
 # Constrain eclass resolution to the master(s)
 # that are specified in layout.conf (using an
 # approach similar to repoman's).
-myrepo = portage.portdb.getRepositoryName(ebuild_portdir)
-repo_info = portage.portdb._repo_info[ebuild_portdir]
-portage.portdb.porttrees = list(repo_info.eclass_db.porttrees)
+myrepo = None
+if ebuild_portdir != vdb_path:
+       myrepo = portage.portdb.getRepositoryName(ebuild_portdir)
+       repo_info = portage.portdb._repo_info[ebuild_portdir]
+       portage.portdb.porttrees = list(repo_info.eclass_db.porttrees)
 
 if not os.path.exists(ebuild):
        print("'%s' does not exist." % ebuild)
index 571b344f31715eaf33cf4d3fcd2e431160164dd9..4b0b47ba0c51774aaee41a16308be1259dc66ae4 100644 (file)
@@ -421,7 +421,7 @@ class vardbapi(dbapi):
                        self.matchcache[mycat][mydep] = mymatch
                return self.matchcache[mycat][mydep][:]
 
-       def findname(self, mycpv):
+       def findname(self, mycpv, myrepo=None):
                return self.getpath(str(mycpv), filename=catsplit(mycpv)[1]+".ebuild")
 
        def flush_cache(self):