summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-27 05:48:47 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-27 05:48:47 +0000
commitbcfb87e519ccc11d8da6a6566aa4efbe92699a31 (patch)
tree4e5c502be78ab3ce1aa43c0d7def6955a1b3b34f
parentIn dyn_unpack(), don't force a new unpack when the ebuild mtime is newer (diff)
downloadportage-multirepo-bcfb87e519ccc11d8da6a6566aa4efbe92699a31.tar.gz
portage-multirepo-bcfb87e519ccc11d8da6a6566aa4efbe92699a31.tar.bz2
portage-multirepo-bcfb87e519ccc11d8da6a6566aa4efbe92699a31.zip
In portdbapi.findname2(), move some of the path joining out of the loop.
svn path=/main/trunk/; revision=13224
-rw-r--r--pym/portage/dbapi/porttree.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 126d3606..c94a2965 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -279,11 +279,14 @@ class portdbapi(dbapi):
else:
mytrees = self.porttrees[:]
mytrees.reverse()
+
+ relative_path = os.path.join(mysplit[0], psplit[0],
+ mysplit[1] + ".ebuild")
+
if 'parse-eapi-glep-55' in self.doebuild_settings.features:
glep55_startswith = '%s.ebuild-' % mysplit[1]
for x in mytrees:
- filename = os.path.join(x, mysplit[0], psplit[0],
- mysplit[1] + ".ebuild")
+ filename = x + os.sep + relative_path
if os.access(filename, os.R_OK):
return (filename, x)
@@ -297,7 +300,7 @@ class portdbapi(dbapi):
return (os.path.join(pkgdir, y), x)
else:
for x in mytrees:
- file=x+"/"+mysplit[0]+"/"+psplit[0]+"/"+mysplit[1]+".ebuild"
+ file = x + os.sep + relative_path
if os.access(file, os.R_OK):
return[file, x]
return None, 0