Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH v2] repoman: add --straight-to-stable (-S) option
Date: Wed, 25 Mar 2015 17:05:29
Message-Id: 20150325100522.6bb837ad.dolsen@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH v2] repoman: add --straight-to-stable (-S) option by "Michał Górny"
1 On Wed, 25 Mar 2015 09:12:24 +0100
2 Michał Górny <mgorny@g.o> wrote:
3
4 > Add an option to safely allow committing ebuilds straight to stable.
5 > Before, this required either round trips with multiple commits or
6 > --force option that ignored valid QA concerns and (surprisingly to
7 > many developers) skipped some expensive QA checks.
8 > ---
9 > bin/repoman | 28 ++++++++++++++++------------
10 > 1 file changed, 16 insertions(+), 12 deletions(-)
11 >
12 > diff --git a/bin/repoman b/bin/repoman
13 > index 13c220d..7101a00 100755
14 > --- a/bin/repoman
15 > +++ b/bin/repoman
16 > @@ -191,6 +191,9 @@ def ParseArgs(argv, qahelp):
17 > parser.add_argument('-f', '--force', dest='force',
18 > default=False, action='store_true', help='Commit with QA violations')
19 >
20 > + parser.add_argument('-S', '--straight-to-stable',
21 > dest='straight_to_stable', default=False,
22 > + action='store_true', help='Allow committing straight
23 > to stable') +
24 > parser.add_argument('--vcs', dest='vcs',
25 > help='Force using specific VCS instead of
26 > autodetection')
27 > @@ -1908,18 +1911,19 @@ for x in effective_scanlist:
28 > (relative_path,
29 > len(myaux['DESCRIPTION']), max_desc_len))
30 > keywords = myaux["KEYWORDS"].split()
31 > - stable_keywords = []
32 > - for keyword in keywords:
33 > - if not keyword.startswith("~") and \
34 > - not keyword.startswith("-"):
35 > - stable_keywords.append(keyword)
36 > - if stable_keywords:
37 > - if ebuild_path in new_ebuilds and catdir !=
38 > "virtual":
39 > - stable_keywords.sort()
40 > - stats["KEYWORDS.stable"] += 1
41 > - fails["KEYWORDS.stable"].append(
42 > - x + "/" + y + ".ebuild added
43 > with stable keywords: %s" % \
44 > - "
45 > ".join(stable_keywords))
46 > + if not options.straight_to_stable:
47 > + stable_keywords = []
48 > + for keyword in keywords:
49 > + if not keyword.startswith("~") and \
50 > + not keyword.startswith("-"):
51 > +
52 > stable_keywords.append(keyword)
53 > + if stable_keywords:
54 > + if ebuild_path in new_ebuilds and
55 > catdir != "virtual":
56 > + stable_keywords.sort()
57 > + stats["KEYWORDS.stable"] += 1
58 > +
59 > fails["KEYWORDS.stable"].append(
60 > + relative_path + "
61 > added with stable keywords: %s" % \
62 > + "
63 > ".join(stable_keywords))
64 > ebuild_archs = set(kw.lstrip("~") for kw in keywords
65 > \ if not kw.startswith("-"))
66
67 LGTM thanks
68
69 --
70 Brian Dolbec <dolsen>