For bug #175344, handle a potential InvalidDependString exception when parsing PROVID...
authorZac Medico <zmedico@gentoo.org>
Fri, 20 Apr 2007 21:32:23 +0000 (21:32 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 20 Apr 2007 21:32:23 +0000 (21:32 -0000)
svn path=/main/branches/2.1.2/; revision=6420

bin/emerge

index 96c288c0e7511ff3cf52f5075d5530468047a084..ddbc6b19d6e1710dab660c65e62eb0c620959ddd 100755 (executable)
@@ -1540,8 +1540,14 @@ class depgraph:
                        if p_status == "merge":
                                # Update old-style virtuals if this package provides any.
                                # These are needed for dep_virtual calls inside dep_check.
-                               self.pkgsettings[p_root].setinst(p_key,
-                                       self.trees[p_root][self.pkg_tree_map[p_type]].dbapi)
+                               p_db = self.trees[p_root][self.pkg_tree_map[p_type]].dbapi
+                               try:
+                                       self.pkgsettings[p_root].setinst(p_key, p_db)
+                               except portage_exception.InvalidDependString, e:
+                                       provide = p_db.aux_get(p_key, ["PROVIDE"])[0]
+                                       show_invalid_depstring_notice(myparent, provide, str(e))
+                                       del e
+                                       return 0
 
                if "--debug" in self.myopts:
                        print "Candidates:",mymerge