Index: bin/repoman =================================================================== --- bin/repoman (revision 7689) +++ bin/repoman (working copy) @@ -104,6 +104,7 @@ "--commitmsg" : "Adds a commit message via the command line", "--commitmsgfile" : "Adds a commit message from the specified file", "--help" : "Show this screen", +"--force" : "Force commit to proceed, regardless of QA issues", "--ignore-arches" : "Ignore arch-specific failures (where arch != host)", "--ignore-masked" : "Ignore masked packages (not allowed with commit mode)", "--pretend" : "Don't commit or fix anything; just show what would be done", @@ -148,6 +149,7 @@ "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", @@ -779,6 +781,13 @@ 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 = {} @@ -1097,6 +1106,26 @@ 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 @@ -1549,7 +1578,11 @@ if quiet < 1: print else: - if dofail: + if dofail and "--force" in myoptions and "--pretend" not in myoptions: + print green("RepoMan sez:") + \ + " \"You want commit even with these QA issues?\n" + \ + " I'll take it this time, but I'm not happy.\"\n" + elif dofail: print turquoise("Please fix these important QA issues first.") print green("RepoMan sez:"),"\"Make your QA payment on time and you'll never see the likes of me.\"\n" sys.exit(1)