From: Zac Medico <zmedico@gentoo.org>
Date: Wed, 7 Feb 2007 21:49:10 +0000 (-0000)
Subject: For bug #165783, handle a potential InvalidDependString exception inside digestgen... 
X-Git-Tag: v2.1.2-r9~6
X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=36d90687a142080196d12d4b639665614d6265f9;p=portage.git

For bug #165783, handle a potential InvalidDependString exception inside digestgen(). (trunk r5916)

svn path=/main/branches/2.1.2/; revision=5917
---

diff --git a/pym/portage.py b/pym/portage.py
index f6dfdcf84..bfacca09c 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2671,9 +2671,15 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None
 		_doebuild_manifest_exempt_depend += 1
 		distfiles_map = {}
 		fetchlist_dict = FetchlistDict(mysettings["O"], mysettings, myportdb)
-		for cpv, fetchlist in fetchlist_dict.iteritems():
-			for myfile in fetchlist:
-				distfiles_map.setdefault(myfile, []).append(cpv)
+		for cpv in fetchlist_dict:
+			try:
+				for myfile in fetchlist_dict[cpv]:
+					distfiles_map.setdefault(myfile, []).append(cpv)
+			except portage_exception.InvalidDependString, e:
+				writemsg("!!! %s\n" % str(e), noiselevel=-1)
+				writemsg("!!! Invalid SRC_URI for '%s'.\n" % cpv, noiselevel=-1)
+				del e
+				return 0
 		mf = Manifest(mysettings["O"], mysettings["DISTDIR"],
 			fetchlist_dict=fetchlist_dict)
 		# Don't require all hashes since that can trigger excessive