Bug #239471 - Handle InvalidDependString from portdbapi.getfetchlist() inside
authorZac Medico <zmedico@gentoo.org>
Mon, 6 Oct 2008 17:43:56 +0000 (17:43 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 6 Oct 2008 17:43:56 +0000 (17:43 -0000)
search.output(). (trunk r11602)

svn path=/main/branches/2.1.4/; revision=11641

bin/emerge

index f71536f344789805ff2fa65e8b0faf2951be203c..61bec137d3ebc95656dcf6c379f8efd56b37d1cc 100755 (executable)
@@ -634,13 +634,19 @@ class search:
                                                import portage_manifest as manifest
                                                mf = manifest.Manifest(
                                                        pkgdir, self.settings["DISTDIR"])
-                                               fetchlist = self.portdb.getfetchlist(mycpv,
-                                                       mysettings=self.settings, all=True)[1]
                                                try:
-                                                       mysum[0] = mf.getDistfilesSize(fetchlist)
-                                               except KeyError, e:
-                                                       file_size_str = "Unknown (missing digest for %s)" % \
-                                                               str(e)
+                                                       fetchlist = self.portdb.getfetchlist(mycpv,
+                                                               mysettings=self.settings, all=True)[1]
+                                               except portage_exception.InvalidDependString, e:
+                                                       file_size_str = "Unknown (%s)" % (e,)
+                                                       del e
+                                               else:
+                                                       try:
+                                                               mysum[0] = mf.getDistfilesSize(fetchlist)
+                                                       except KeyError, e:
+                                                               file_size_str = "Unknown (missing " + \
+                                                                       "digest for %s)" % (e,)
+                                                               del e
 
                                        available = False
                                        for db in self._dbs: