From 8d1fdc19743d65f0e03dbfc3d1f5728b308f619a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 20 Sep 2008 09:33:49 +0000 Subject: [PATCH] Fix some broken logic inside portdbapi.getFetchMap(). svn path=/main/trunk/; revision=11525 --- pym/portage/dbapi/porttree.py | 18 +++++------------- 1 file 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: -- 2.26.2