summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-30 23:38:56 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-30 23:38:56 +0000
commit1e5eb7ee963e37926c202b54a66ebbfb0cf60838 (patch)
tree0d8bc8650d551c076040272ab8a86cdf79fdba92
parent30b1a62bd1ad86ec6de56cc315d385b348ef4c98 (diff)
downloadportage-1e5eb7ee963e37926c202b54a66ebbfb0cf60838.tar.gz
portage-1e5eb7ee963e37926c202b54a66ebbfb0cf60838.tar.bz2
portage-1e5eb7ee963e37926c202b54a66ebbfb0cf60838.zip
Add a QA warning for invalid values of RESTRICT. Thanks to peper for the patch. (trunk r7102)
svn path=/main/branches/2.1.2/; revision=7103
-rwxr-xr-xbin/repoman12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman
index a93965ff3..dfc4778b2 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -181,6 +181,7 @@ qahelp={
"IUSE.invalid":"This ebuild has a variable in IUSE that is not in the use.desc or use.local.desc file",
"LICENSE.invalid":"This ebuild is listing a license that doesnt exist in portages license/ dir.",
"KEYWORDS.invalid":"This ebuild contains KEYWORDS that are not listed in profiles/arch.list or for which no valid profile was found",
+ "RESTRICT.invalid":"This ebuild contains invalid RESTRICT values.",
"ebuild.nostable":"There are no ebuilds that are marked as stable for your ARCH",
"ebuild.allmasked":"All ebuilds are masked for this package (Package level only)",
"ebuild.majorsyn":"This ebuild has a major syntax error that may cause the ebuild to fail partially or fully",
@@ -215,6 +216,7 @@ qawarnings=[
"IUSE.invalid",
"KEYWORDS.stupid",
"KEYWORDS.missing",
+"RESTRICT.invalid",
"ebuild.minorsyn",
"ebuild.badheader",
"file.size",
@@ -238,6 +240,8 @@ for x in missingvars:
qacats.append(x)
qawarnings.append(x)
+valid_restrict = frozenset(["binchecks", "bindist", "fetch", "mirror",
+ "primaryuri", "strip", "test", "userpriv"])
verbose=0
quiet=0
@@ -1346,6 +1350,14 @@ for x in scanlist:
stats["KEYWORDS.invalid"] += 1
fails["KEYWORDS.invalid"].append(x+"/"+y+".ebuild: %s (profile invalid)" % mykey)
+ #restrict checks
+ myrestrict = set(myaux["RESTRICT"].split())
+ mybadrestrict = myrestrict.difference(valid_restrict)
+ if mybadrestrict:
+ stats["RESTRICT.invalid"] += len(mybadrestrict)
+ for mybad in mybadrestrict:
+ fails["RESTRICT.invalid"].append(x+"/"+y+".ebuild: %s" % mybad)
+
#syntax checks
myear = time.gmtime(os.stat(checkdir+"/"+y+".ebuild")[ST_MTIME])[0]
gentoo_copyright = re.compile(r'^# Copyright ((1999|200\d)-)?' + str(myear) + r' Gentoo Foundation')