Add a warning for KEYWORDS=-*
authorMarius Mauch <genone@gentoo.org>
Tue, 24 Jan 2006 17:41:41 +0000 (17:41 -0000)
committerMarius Mauch <genone@gentoo.org>
Tue, 24 Jan 2006 17:41:41 +0000 (17:41 -0000)
svn path=/main/trunk/; revision=2583

bin/repoman
man/repoman.1

index 9ca91f0f2ca2400a08a43a82579b2e5b26dc812d..c0d99b18114c9d6c7ae1a3eccbab58d396819177 100755 (executable)
@@ -97,11 +97,12 @@ qahelp={
        "file.size":"Files in the files directory must be under 20k",
        "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 KEYWORDS variable",
-       "LICENSE.missing":"Ebuilds that have a missing LICENSE variable",
-       "DESCRIPTION.missing":"Ebuilds that have a missing DESCRIPTION variable",
-       "SLOT.missing":"Ebuilds that have a missing SLOT variable",
-       "HOMEPAGE.missing":"Ebuilds that have a missing HOMEPAGE variable",
+       "KEYWORDS.missing":"Ebuilds that have a missing or emtpy KEYWORDS variable",
+       "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",
+       "SLOT.missing":"Ebuilds that have a missing or empty SLOT variable",
+       "HOMEPAGE.missing":"Ebuilds that have a missing or empty HOMEPAGE variable",
        "DEPEND.bad":"User-visible ebuilds with bad DEPEND settings (matched against *visible* ebuilds)",
        "RDEPEND.bad":"User-visible ebuilds with bad RDEPEND settings (matched against *visible* ebuilds)",
        "PDEPEND.bad":"User-visible ebuilds with bad PDEPEND settings (matched against *visible* ebuilds)",
@@ -157,6 +158,7 @@ qawarnings=[
 "DEPEND.badindev","RDEPEND.badindev","PDEPEND.badindev",
 "DEPEND.badmaskedindev","RDEPEND.badmaskedindev","PDEPEND.badmaskedindev",
 "IUSE.invalid",
+"KEYWORDS.stupid",
 "ebuild.minorsyn",
 "ebuild.badheader",
 "file.size",
@@ -943,6 +945,18 @@ for x in scanlist:
                                stats[myqakey]=stats[myqakey]+1
                                fails[myqakey].append(x+"/"+y+".ebuild")
 
+               # KEYWORDS="-*" is a stupid replacement for package.mask and screws general KEYWORDS semantics
+               if "-*" in myaux["KEYWORDS"].split():
+                       haskeyword = False
+                       for kw in myaux["KEYWORDS"].split():
+                               if kw[0] == "~":
+                                       kw = kw[1:]
+                               if kw in kwlist:
+                                       haskeyword = True
+                       if not haskeyword:
+                               stats["KEYWORDS.stupid"] += 1
+                               fails["KEYWORDS.stupid"].append(x+"/"+y+".ebuild")
+               
                if "--ignore-other-arches" in myoptions:
                        arches=[[repoman_settings["ARCH"], repoman_settings["ARCH"], portage.groups]]
                else:
index 6439a796026928a9ef2882abccd734c86fdcb0cb..7a0deaf7cde52333a4675efee92124694bf96666 100644 (file)
@@ -114,6 +114,9 @@ commiting the ebuild.
 .BR KEYWORDS.missing
 The ebuild does not have a KEYWORDS variable.
 .TP
+.BR KEYWORDS.stupid
+The ebuild uses KEYWORDS=-* instead of package.mask.
+.TP
 .BR LICENSE.missing
 The ebuild does not have a LICENSE variable.
 .TP