For bug #165783, handle a potential InvalidDependString exception inside digestgen().
authorZac Medico <zmedico@gentoo.org>
Wed, 7 Feb 2007 21:47:43 +0000 (21:47 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 7 Feb 2007 21:47:43 +0000 (21:47 -0000)
svn path=/main/trunk/; revision=5916

pym/portage/__init__.py

index ff780c5820953946f247e229fb81f33f991fee88..5ba744660002a43f864b6d6ebc3fea64e5adcd7c 100644 (file)
@@ -2697,9 +2697,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