For bug #175344, handle a potential InvalidDependString exception when parsing PROVIDE.
authorZac Medico <zmedico@gentoo.org>
Fri, 20 Apr 2007 21:31:53 +0000 (21:31 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 20 Apr 2007 21:31:53 +0000 (21:31 -0000)
svn path=/main/trunk/; revision=6419

pym/emerge/__init__.py

index 3a434fb0f492ef0841e3b0e4cc97a412adcaaa05..8dbe72b180ac3251bea3db385b496226104efe57 100644 (file)
@@ -1542,8 +1542,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