From bcfb87e519ccc11d8da6a6566aa4efbe92699a31 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 27 Mar 2009 05:48:47 +0000 Subject: [PATCH] In portdbapi.findname2(), move some of the path joining out of the loop. svn path=/main/trunk/; revision=13224 --- pym/portage/dbapi/porttree.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 126d3606c..c94a2965d 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 -- 2.26.2