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 5EFBB13888F for ; Sun, 25 Oct 2015 23:31:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5FFCEE07F4; Sun, 25 Oct 2015 23:31:19 +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 CA3CBE07EE for ; Sun, 25 Oct 2015 23:31:18 +0000 (UTC) Received: from localhost.localdomain (ip174-67-193-3.oc.oc.cox.net [174.67.193.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 3C330340751; Sun, 25 Oct 2015 23:31:15 +0000 (UTC) From: Zac Medico To: gentoo-portage-dev@lists.gentoo.org Cc: Zac Medico Subject: [gentoo-portage-dev] [PATCH] repoman: checks deps of stable ebuilds for unstable configurations (bug 563546) Date: Sun, 25 Oct 2015 16:30:49 -0700 Message-Id: <1445815849-26954-1-git-send-email-zmedico@gentoo.org> X-Mailer: git-send-email 2.4.9 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 X-Archives-Salt: ecb6a67d-ab6c-4f79-900b-c1d6f99536de X-Archives-Hash: c2b2e41933760a9e0326b06b8bf47586 For ebuilds with stable keywords, check if the dependencies are satisfiable for unstable configurations, since use.stable.mask is not applied for unstable configurations. Fix the KeywordsManager.isStable method to behave consistently for both repoman and emerge. X-Gentoo-Bug: 563546 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=563546 --- .../package/ebuild/_config/KeywordsManager.py | 35 ++++++++-------------- pym/repoman/scanner.py | 10 +++++++ 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/pym/portage/package/ebuild/_config/KeywordsManager.py b/pym/portage/package/ebuild/_config/KeywordsManager.py index 72e24b9..a4ffb62 100644 --- a/pym/portage/package/ebuild/_config/KeywordsManager.py +++ b/pym/portage/package/ebuild/_config/KeywordsManager.py @@ -112,29 +112,18 @@ class KeywordsManager(object): if self._getMissingKeywords(pkg, pgroups, mygroups): return False - if pkg.cpv._settings.local_config: - # If replacing all keywords with unstable variants would mask the - # package, then it's considered stable. - unstable = [] - for kw in mygroups: - if kw[:1] != "~": - kw = "~" + kw - unstable.append(kw) - - return bool(self._getMissingKeywords(pkg, pgroups, set(unstable))) - else: - # For repoman, if the package has an effective stable keyword that - # intersects with the effective ACCEPT_KEYWORDS for the current - # profile, then consider it stable. - for kw in pgroups: - if kw[:1] != "~": - if kw in mygroups or '*' in mygroups: - return True - if kw == '*': - for x in mygroups: - if x[:1] != "~": - return True - return False + # If replacing all keywords with unstable variants would mask the + # package, then it's considered stable for the purposes of + # use.stable.mask/force interpretation. For unstable configurations, + # this guarantees that the effective use.force/mask settings for a + # particular ebuild do not change when that ebuild is stabilized. + unstable = [] + for kw in mygroups: + if kw[:1] != "~": + kw = "~" + kw + unstable.append(kw) + + return bool(self._getMissingKeywords(pkg, pgroups, set(unstable))) def getMissingKeywords(self, cpv, diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py index df46144..9e5a313 100644 --- a/pym/repoman/scanner.py +++ b/pym/repoman/scanner.py @@ -379,14 +379,24 @@ class Scanner(object): else: arches.add((keyword, arch, (arch, keyword))) else: + # For ebuilds with stable keywords, check if the + # dependencies are satisfiable for unstable + # configurations, since use.stable.mask is not + # applied for unstable configurations (see bug + # 563546). if keyword == "*": for expanded_arch in self.profiles: if expanded_arch == "**": continue arches.add( (keyword, expanded_arch, (expanded_arch,))) + arches.add( + (keyword, expanded_arch, + (expanded_arch, "~" + expanded_arch))) else: arches.add((keyword, keyword, (keyword,))) + arches.add((keyword, keyword, + (keyword, "~" + keyword))) if not arches: # Use an empty profile for checking dependencies of # packages that have empty KEYWORDS. -- 2.4.9