From 4825a9b5cbc2e3173c4b9dcf2b6444811cca959c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 26 Oct 2010 12:45:30 -0700 Subject: ebuild(1): fix breakage for /var/db/pkg ebuilds --- bin/ebuild | 8 +++++--- pym/portage/dbapi/vartree.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/ebuild b/bin/ebuild index ae793ac4d..93859327d 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -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) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 571b344f3..4b0b47ba0 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -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): -- cgit v1.2.3-1-g7c22