From: Zac Medico Date: Fri, 27 Mar 2009 06:16:35 +0000 (-0000) Subject: In portdbapi.findname2(), move some of the path joining out of the loop. X-Git-Tag: v2.1.6.11~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=578287af0f734919631f00766cdaee8f26662c81;p=portage.git In portdbapi.findname2(), move some of the path joining out of the loop. (trunk r13224) svn path=/main/branches/2.1.6/; revision=13225 --- 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