1 |
On 03/24/2015 02:10 AM, Michał Górny wrote: |
2 |
> Add an option to safely allow committing ebuilds straight to stable. |
3 |
> Before, this required either round trips with multiple commits or |
4 |
> --force option that ignored valid QA concerns and (surprisingly to many |
5 |
> developers) skipped some expensive QA checks. |
6 |
> --- |
7 |
> bin/repoman | 28 ++++++++++++++++------------ |
8 |
> 1 file changed, 16 insertions(+), 12 deletions(-) |
9 |
> |
10 |
> diff --git a/bin/repoman b/bin/repoman |
11 |
> index 13c220d..03664bd 100755 |
12 |
> --- a/bin/repoman |
13 |
> +++ b/bin/repoman |
14 |
> @@ -191,6 +191,9 @@ def ParseArgs(argv, qahelp): |
15 |
> parser.add_argument('-f', '--force', dest='force', default=False, action='store_true', |
16 |
> help='Commit with QA violations') |
17 |
> |
18 |
> + parser.add_argument('-S', '--straight-to-stable', dest='straight_to_stable', default=False, |
19 |
> + action='store_true', help='Allow committing straight to stable') |
20 |
> + |
21 |
> parser.add_argument('--vcs', dest='vcs', |
22 |
> help='Force using specific VCS instead of autodetection') |
23 |
> |
24 |
> @@ -1908,18 +1911,19 @@ for x in effective_scanlist: |
25 |
> (relative_path, len(myaux['DESCRIPTION']), max_desc_len)) |
26 |
> |
27 |
> keywords = myaux["KEYWORDS"].split() |
28 |
> - stable_keywords = [] |
29 |
> - for keyword in keywords: |
30 |
> - if not keyword.startswith("~") and \ |
31 |
> - not keyword.startswith("-"): |
32 |
> - stable_keywords.append(keyword) |
33 |
> - if stable_keywords: |
34 |
> - if ebuild_path in new_ebuilds and catdir != "virtual": |
35 |
> - stable_keywords.sort() |
36 |
> - stats["KEYWORDS.stable"] += 1 |
37 |
> - fails["KEYWORDS.stable"].append( |
38 |
> - x + "/" + y + ".ebuild added with stable keywords: %s" % \ |
39 |
> - " ".join(stable_keywords)) |
40 |
> + if not options.straight_to_stable: |
41 |
> + stable_keywords = [] |
42 |
> + for keyword in keywords: |
43 |
> + if not keyword.startswith("~") and \ |
44 |
> + not keyword.startswith("-"): |
45 |
> + stable_keywords.append(keyword |
46 |
|
47 |
The indents above mix spaces with tabs. |
48 |
|
49 |
> + if stable_keywords: |
50 |
> + if ebuild_path in new_ebuilds and catdir != "virtual": |
51 |
> + stable_keywords.sort() |
52 |
> + stats["KEYWORDS.stable"] += 1 |
53 |
> + fails["KEYWORDS.stable"].append( |
54 |
> + x + "/" + y + ".ebuild added with stable keywords: %s" % \ |
55 |
> + " ".join(stable_keywords)) |
56 |
|
57 |
In this scope, the relative_path variable is equivalent to x + "/" + y + |
58 |
".ebuild", so you could use that instead. |
59 |
|
60 |
> |
61 |
> ebuild_archs = set(kw.lstrip("~") for kw in keywords \ |
62 |
> if not kw.startswith("-")) |
63 |
> |
64 |
|
65 |
|
66 |
-- |
67 |
Thanks, |
68 |
Zac |