summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-09-20 09:33:49 +0000
committerZac Medico <zmedico@gentoo.org>2008-09-20 09:33:49 +0000
commit8d1fdc19743d65f0e03dbfc3d1f5728b308f619a (patch)
treeaa624cf97543880090cdd4d038c1ccdea4d5ed7f
parent7f040e58b8c4c379964cc3a2899998ebf43c60b6 (diff)
downloadportage-8d1fdc19743d65f0e03dbfc3d1f5728b308f619a.tar.gz
portage-8d1fdc19743d65f0e03dbfc3d1f5728b308f619a.tar.bz2
portage-8d1fdc19743d65f0e03dbfc3d1f5728b308f619a.zip
Fix some broken logic inside portdbapi.getFetchMap().
svn path=/main/trunk/; revision=11525
-rw-r--r--pym/portage/dbapi/porttree.py18
1 files changed, 5 insertions, 13 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 95455182c..67e7955d4 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -543,26 +543,18 @@ class portdbapi(dbapi):
uri_map = {}
- uri = None
- operator = None
myuris.reverse()
while myuris:
- token = myuris.pop()
- if uri is None:
- uri = token
- if myuris:
- continue
- if token == "->":
- operator = token
- continue
- if operator is None:
+ uri = myuris.pop()
+ if myuris and myuris[-1] == "->":
+ operator = myuris.pop()
+ distfile = myuris.pop()
+ else:
distfile = os.path.basename(uri)
if not distfile:
raise portage.exception.InvalidDependString(
("getFetchMap(): '%s' SRC_URI has no file " + \
"name: '%s'") % (mypkg, uri))
- else:
- distfile = token
uri_set = uri_map.get(distfile)
if uri_set is None: