From: Zac Medico Date: Sat, 20 Sep 2008 09:33:49 +0000 (-0000) Subject: Fix some broken logic inside portdbapi.getFetchMap(). X-Git-Tag: v2.2_rc9~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8d1fdc19743d65f0e03dbfc3d1f5728b308f619a;p=portage.git Fix some broken logic inside portdbapi.getFetchMap(). svn path=/main/trunk/; revision=11525 --- 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: