summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2006-01-24 15:19:17 +0000
committerJason Stubbs <jstubbs@gentoo.org>2006-01-24 15:19:17 +0000
commitdb991ec37388ea6c8a5d3871ef10a690ffa41347 (patch)
tree37061868e85f0dffc013b4c0f93e298616e74b5d
parent7a00d728fe0535d29fa59b4383ded1243d13d431 (diff)
downloadportage-db991ec37388ea6c8a5d3871ef10a690ffa41347.tar.gz
portage-db991ec37388ea6c8a5d3871ef10a690ffa41347.tar.bz2
portage-db991ec37388ea6c8a5d3871ef10a690ffa41347.zip
Add further checks for correct DEPEND syntax
svn path=/main/trunk/; revision=2580
-rwxr-xr-xbin/repoman8
1 files changed, 8 insertions, 0 deletions
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+" "):