From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4B657138CC5 for ; Tue, 24 Mar 2015 18:07:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 97D0BE0986; Tue, 24 Mar 2015 18:07:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 07552E097E for ; Tue, 24 Mar 2015 18:06:58 +0000 (UTC) Received: from [10.0.31.59] (unknown [100.42.98.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id CA83B340A0B for ; Tue, 24 Mar 2015 18:06:57 +0000 (UTC) Message-ID: <5511A7BA.80207@gentoo.org> Date: Tue, 24 Mar 2015 11:06:50 -0700 From: Zac Medico User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] repoman: add --straight-to-stable (-S) option References: <1427188244-27377-1-git-send-email-mgorny@gentoo.org> In-Reply-To: <1427188244-27377-1-git-send-email-mgorny@gentoo.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: edbb86ee-39f5-4949-8a33-ecf8ff605383 X-Archives-Hash: 58f200d0531da6a5aaee319671223bb0 On 03/24/2015 02:10 AM, Michał Górny wrote: > Add an option to safely allow committing ebuilds straight to stable. > Before, this required either round trips with multiple commits or > --force option that ignored valid QA concerns and (surprisingly to many > developers) skipped some expensive QA checks. > --- > bin/repoman | 28 ++++++++++++++++------------ > 1 file changed, 16 insertions(+), 12 deletions(-) > > diff --git a/bin/repoman b/bin/repoman > index 13c220d..03664bd 100755 > --- a/bin/repoman > +++ b/bin/repoman > @@ -191,6 +191,9 @@ def ParseArgs(argv, qahelp): > parser.add_argument('-f', '--force', dest='force', default=False, action='store_true', > help='Commit with QA violations') > > + parser.add_argument('-S', '--straight-to-stable', dest='straight_to_stable', default=False, > + action='store_true', help='Allow committing straight to stable') > + > parser.add_argument('--vcs', dest='vcs', > help='Force using specific VCS instead of autodetection') > > @@ -1908,18 +1911,19 @@ for x in effective_scanlist: > (relative_path, len(myaux['DESCRIPTION']), max_desc_len)) > > 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: > - if ebuild_path in new_ebuilds and catdir != "virtual": > - stable_keywords.sort() > - stats["KEYWORDS.stable"] += 1 > - fails["KEYWORDS.stable"].append( > - x + "/" + y + ".ebuild added with stable keywords: %s" % \ > - " ".join(stable_keywords)) > + if not options.straight_to_stable: > + stable_keywords = [] > + for keyword in keywords: > + if not keyword.startswith("~") and \ > + not keyword.startswith("-"): > + stable_keywords.append(keyword The indents above mix spaces with tabs. > + if stable_keywords: > + if ebuild_path in new_ebuilds and catdir != "virtual": > + stable_keywords.sort() > + stats["KEYWORDS.stable"] += 1 > + fails["KEYWORDS.stable"].append( > + x + "/" + y + ".ebuild added with stable keywords: %s" % \ > + " ".join(stable_keywords)) In this scope, the relative_path variable is equivalent to x + "/" + y + ".ebuild", so you could use that instead. > > ebuild_archs = set(kw.lstrip("~") for kw in keywords \ > if not kw.startswith("-")) > -- Thanks, Zac