summaryrefslogtreecommitdiffstats
path: root/bin/repoman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-06-28 19:40:39 +0000
committerZac Medico <zmedico@gentoo.org>2009-06-28 19:40:39 +0000
commit58ba036b77ce5b2250e54a4d4742d1c7c08efb4b (patch)
tree30f3bf74661166e4f96cb804b4a1c3c03795d4f9 /bin/repoman
parent6848505d7e7cb330d85ea2d16b0041ef68125677 (diff)
downloadportage-58ba036b77ce5b2250e54a4d4742d1c7c08efb4b.tar.gz
portage-58ba036b77ce5b2250e54a4d4742d1c7c08efb4b.tar.bz2
portage-58ba036b77ce5b2250e54a4d4742d1c7c08efb4b.zip
Use Package.invalid to generate *.syntax repoman errors for LICENSE,
PROPERTIES, PROVIDE, and RESTRICT. svn path=/main/trunk/; revision=13728
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman24
1 files changed, 10 insertions, 14 deletions
diff --git a/bin/repoman b/bin/repoman
index 09b79da23..3ea879c35 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1199,6 +1199,14 @@ for x in scanlist:
continue
pkg = pkgs[y]
+
+ if pkg.invalid:
+ for k, msgs in pkg.invalid.iteritems():
+ for msg in msgs:
+ stats[k] = stats[k] + 1
+ fails[k].append("%s %s" % (relative_path, msg))
+ continue
+
myaux = pkg.metadata
eapi = myaux["EAPI"]
inherited = pkg.inherited
@@ -1232,21 +1240,9 @@ for x in scanlist:
"%s: '%s' found in thirdpartymirrors" % \
(relative_path, mirror))
- # Test for negative logic and bad words in the RESTRICT var.
- #for x in myaux[allvars.index("RESTRICT")].split():
- # if x.startswith("no"):
- # print "Bad RESTRICT value: %s" % x
- try:
- 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
-
# The Package class automatically evaluates USE conditionals.
- for myprovide in myaux["PROVIDE"].split():
+ for myprovide in portage.flatten(portage.dep.use_reduce(
+ portage.dep.paren_reduce(pkg.metadata['PROVIDE']), matchall=1)):
prov_cp = portage.dep_getkey(myprovide)
if prov_cp != myprovide:
stats["virtual.versioned"]+=1