From: Jason Stubbs Date: Tue, 24 Jan 2006 15:19:17 +0000 (-0000) Subject: Add further checks for correct DEPEND syntax X-Git-Tag: v2.1_pre4~14 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=db991ec37388ea6c8a5d3871ef10a690ffa41347;p=portage.git Add further checks for correct DEPEND syntax svn path=/main/trunk/; revision=2580 --- diff --git a/bin/repoman b/bin/repoman index 99cbdfadd..9ca91f0f2 100755 --- a/bin/repoman +++ b/bin/repoman @@ -26,6 +26,7 @@ import portage import portage_checksum import portage_const import portage_dep +import portage_exception import cvstree import time import codecs @@ -959,6 +960,7 @@ for x in scanlist: badlicsyntax = False badprovsyntax = False catpkg = catdir+"/"+y + myiuse = myaux["IUSE"].split() + portage.archlist type_list, badsyntax = [], [] for mytype in ("DEPEND", "RDEPEND", "PDEPEND", "LICENSE", "PROVIDE"): mydepstr = myaux[mytype] @@ -974,6 +976,12 @@ for x in scanlist: raise ValueError except ValueError: badsyntax.append("parenthesis mismatch") + mydeplist = [] + + try: + portage_dep.use_reduce(mydeplist, excludeall=myiuse) + except portage_exception.InvalidDependString, e: + badsyntax.append(str(e)) for token in ("||", "(", ")"): if mydepstr.startswith(token+" "):