1 |
commit: f0b974c4839d3713fdeecf11eda46a2aeee233c8 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 24 09:00:04 2015 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 25 08:00:11 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f0b974c4 |
7 |
|
8 |
repoman: add --straight-to-stable (-S) option |
9 |
|
10 |
Add an option to safely allow committing ebuilds straight to stable. |
11 |
Before, this required either round trips with multiple commits or |
12 |
--force option that ignored valid QA concerns and (surprisingly to many |
13 |
developers) skipped some expensive QA checks. |
14 |
|
15 |
bin/repoman | 28 ++++++++++++++++------------ |
16 |
1 file changed, 16 insertions(+), 12 deletions(-) |
17 |
|
18 |
diff --git a/bin/repoman b/bin/repoman |
19 |
index 13c220d..7101a00 100755 |
20 |
--- a/bin/repoman |
21 |
+++ b/bin/repoman |
22 |
@@ -191,6 +191,9 @@ def ParseArgs(argv, qahelp): |
23 |
parser.add_argument('-f', '--force', dest='force', default=False, action='store_true', |
24 |
help='Commit with QA violations') |
25 |
|
26 |
+ parser.add_argument('-S', '--straight-to-stable', dest='straight_to_stable', default=False, |
27 |
+ action='store_true', help='Allow committing straight to stable') |
28 |
+ |
29 |
parser.add_argument('--vcs', dest='vcs', |
30 |
help='Force using specific VCS instead of autodetection') |
31 |
|
32 |
@@ -1908,18 +1911,19 @@ for x in effective_scanlist: |
33 |
(relative_path, len(myaux['DESCRIPTION']), max_desc_len)) |
34 |
|
35 |
keywords = myaux["KEYWORDS"].split() |
36 |
- stable_keywords = [] |
37 |
- for keyword in keywords: |
38 |
- if not keyword.startswith("~") and \ |
39 |
- not keyword.startswith("-"): |
40 |
- stable_keywords.append(keyword) |
41 |
- if stable_keywords: |
42 |
- if ebuild_path in new_ebuilds and catdir != "virtual": |
43 |
- stable_keywords.sort() |
44 |
- stats["KEYWORDS.stable"] += 1 |
45 |
- fails["KEYWORDS.stable"].append( |
46 |
- x + "/" + y + ".ebuild added with stable keywords: %s" % \ |
47 |
- " ".join(stable_keywords)) |
48 |
+ if not options.straight_to_stable: |
49 |
+ stable_keywords = [] |
50 |
+ for keyword in keywords: |
51 |
+ if not keyword.startswith("~") and \ |
52 |
+ not keyword.startswith("-"): |
53 |
+ stable_keywords.append(keyword) |
54 |
+ if stable_keywords: |
55 |
+ if ebuild_path in new_ebuilds and catdir != "virtual": |
56 |
+ stable_keywords.sort() |
57 |
+ stats["KEYWORDS.stable"] += 1 |
58 |
+ fails["KEYWORDS.stable"].append( |
59 |
+ relative_path + " added with stable keywords: %s" % \ |
60 |
+ " ".join(stable_keywords)) |
61 |
|
62 |
ebuild_archs = set(kw.lstrip("~") for kw in keywords \ |
63 |
if not kw.startswith("-")) |