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

bin/repoman

index f2e520c6e2a13e0b22680f8dff6c202d44d38e61..6194d171458cef7fcaf75d664e3f48490d1a7dfc 100755 (executable)
@@ -1000,8 +1000,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)