summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-09-06 17:49:28 +0000
committerZac Medico <zmedico@gentoo.org>2007-09-06 17:49:28 +0000
commit28617230ee7d7736b85a8fd94abbf2f76821277d (patch)
treefd85c1e1bdaf4714dbf50e969bd7d02c3cd0f5d6
parenta00ff78df7156bf000b9ac91da5d35cce66b563b (diff)
downloadportage-28617230ee7d7736b85a8fd94abbf2f76821277d.tar.gz
portage-28617230ee7d7736b85a8fd94abbf2f76821277d.tar.bz2
portage-28617230ee7d7736b85a8fd94abbf2f76821277d.zip
Bug #110443 - Add a KEYWORDS.stable check for ebuilds that are added directly
with stable KEYWORDS. (trunk r7710) svn path=/main/branches/2.1.2/; revision=7739
-rwxr-xr-xbin/repoman28
1 files changed, 28 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman
index a31cc6ea8..163388865 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -149,6 +149,7 @@ qahelp={
"file.name":"File/dir name must be composed of only the following chars: %s " % allowed_filename_chars,
"file.UTF8":"File is not UTF8 compliant",
"KEYWORDS.missing":"Ebuilds that have a missing or empty KEYWORDS variable",
+ "KEYWORDS.stable":"Ebuilds that have been added directly with stable KEYWORDS",
"KEYWORDS.stupid":"Ebuilds that use KEYWORDS=-* instead of package.mask",
"LICENSE.missing":"Ebuilds that have a missing or empty LICENSE variable",
"DESCRIPTION.missing":"Ebuilds that have a missing or empty DESCRIPTION variable",
@@ -780,6 +781,13 @@ elif "--pretend" in myoptions:
elif quiet < 1:
print green("\nRepoMan scours the neighborhood...")
+new_ebuilds = set()
+if isCvs:
+ mycvstree = cvstree.getentries("./", recursive=1)
+ mynew = cvstree.findnew(mycvstree, recursive=1, basedir="./")
+ new_ebuilds.update(x for x in mynew if x.endswith(".ebuild"))
+ del mycvstree, mynew
+
dofail = 0
arch_caches={}
arch_xmatch_caches = {}
@@ -1098,6 +1106,26 @@ for x in scanlist:
stats[myqakey]=stats[myqakey]+1
fails[myqakey].append(x+"/"+y+".ebuild")
+ keywords = myaux["KEYWORDS"].split()
+ stable_keywords = []
+ for keyword in keywords:
+ if not keyword.startswith("~") and \
+ not keyword.startswith("-"):
+ stable_keywords.append(keyword)
+ if stable_keywords:
+ ebuild_path = y + ".ebuild"
+ if repolevel < 3:
+ ebuild_path = os.path.join(pkgdir, ebuild_path)
+ if repolevel < 2:
+ ebuild_path = os.path.join(catdir, ebuild_path)
+ ebuild_path = os.path.join(".", ebuild_path)
+ if ebuild_path in new_ebuilds:
+ stable_keywords.sort()
+ stats["KEYWORDS.stable"] += 1
+ fails["KEYWORDS.stable"].append(
+ x + "/" + y + ".ebuild added with stable keywords: %s" % \
+ " ".join(stable_keywords))
+
# KEYWORDS="-*" is a stupid replacement for package.mask and screws general KEYWORDS semantics
if "-*" in myaux["KEYWORDS"].split():
haskeyword = False