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

bin/repoman

index 1e2f54864b9e57c07382507138cae5f67514ed30..3eef5c29dd20b2bc6b854549176a4e52bd223b8c 100755 (executable)
@@ -999,8 +999,14 @@ for x in scanlist:
                #for x in myaux[allvars.index("RESTRICT")].split():
                #       if x.startswith("no"):
                #               print "Bad RESTRICT value: %s" % x
-
-               myaux["PROVIDE"] = portage_dep.use_reduce(portage_dep.paren_reduce(myaux["PROVIDE"]), matchall=1)
+               try:
+                       myaux["PROVIDE"] = portage_dep.use_reduce(
+                               portage_dep.paren_reduce(myaux["PROVIDE"]), matchall=1)
+               except portage_exception.InvalidDependString, e:
+                       stats["PROVIDE.syntax"] = stats["PROVIDE.syntax"] + 1
+                       fails["PROVIDE.syntax"].append(mykey+".ebuild PROVIDE: "+str(e))
+                       del e
+                       continue
                myaux["PROVIDE"] = " ".join(portage.flatten(myaux["PROVIDE"]))
                for myprovide in myaux["PROVIDE"].split():
                        prov_cp = portage.dep_getkey(myprovide)