From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QUflQ-0004iI-GU for garchives@archives.gentoo.org; Thu, 09 Jun 2011 13:59:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5D1361C004; Thu, 9 Jun 2011 13:58:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2A4761C004 for ; Thu, 9 Jun 2011 13:58:59 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B78A11B4026 for ; Thu, 9 Jun 2011 13:58:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 2A23F8003C for ; Thu, 9 Jun 2011 13:58:58 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <786bb1096c704f03b6c677726ef0b9142a8d38a7.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/package/ebuild/getmaskingstatus.py X-VCS-Directories: pym/portage/package/ebuild/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 786bb1096c704f03b6c677726ef0b9142a8d38a7 Date: Thu, 9 Jun 2011 13:58:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: b76eea03d23b4630ce818b44c96ae1e5 commit: 786bb1096c704f03b6c677726ef0b9142a8d38a7 Author: Zac Medico gentoo org> AuthorDate: Thu Jun 9 13:58:37 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Jun 9 13:58:37 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D786bb109 getmaskingstatus: fix keywords logic This will fix bug #370477. --- pym/portage/package/ebuild/getmaskingstatus.py | 38 ++++++------------= ----- 1 files changed, 10 insertions(+), 28 deletions(-) diff --git a/pym/portage/package/ebuild/getmaskingstatus.py b/pym/portage= /package/ebuild/getmaskingstatus.py index 5901e57..4c65fcc 100644 --- a/pym/portage/package/ebuild/getmaskingstatus.py +++ b/pym/portage/package/ebuild/getmaskingstatus.py @@ -93,40 +93,22 @@ def _getmaskingstatus(mycpv, settings, portdb, myrepo= =3DNone): return [_MaskReason("EAPI", "EAPI %s" % eapi)] egroups =3D settings.configdict["backupenv"].get( "ACCEPT_KEYWORDS", "").split() - pgroups =3D settings["ACCEPT_KEYWORDS"].split() + global_accept_keywords =3D settings.get("ACCEPT_KEYWORDS", "") + pgroups =3D global_accept_keywords.split() myarch =3D settings["ARCH"] if pgroups and myarch not in pgroups: """For operating systems other than Linux, ARCH is not necessarily a valid keyword.""" myarch =3D pgroups[0].lstrip("~") =20 - cp =3D cpv_getkey(mycpv) - pkgdict =3D settings._keywords_manager.pkeywordsdict.get(cp) - matches =3D False - if pkgdict: - pkg =3D "".join((mycpv, _slot_separator, metadata["SLOT"])) - if myrepo is None: - myrepo =3D metadata.get("repository") - if myrepo is not None and myrepo !=3D Package.UNKNOWN_REPO: - pkg =3D "".join((pkg, _repo_separator, myrepo)) - cpv_slot_list =3D [pkg] - for atom, pkgkeywords in pkgdict.items(): - if match_from_list(atom, cpv_slot_list): - matches =3D True - pgroups.extend(pkgkeywords) - if matches or egroups: - pgroups.extend(egroups) - inc_pgroups =3D set() - for x in pgroups: - if x.startswith("-"): - if x =3D=3D "-*": - inc_pgroups.clear() - else: - inc_pgroups.discard(x[1:]) - else: - inc_pgroups.add(x) - pgroups =3D inc_pgroups - del inc_pgroups + # NOTE: This logic is copied from KeywordsManager.getMissingKeywords(). + unmaskgroups =3D settings._keywords_manager.getPKeywords(mycpv, + metadata["SLOT"], metadata["repository"], global_accept_keywords) + pgroups.extend(unmaskgroups) + if unmaskgroups or egroups: + pgroups =3D settings._keywords_manager._getEgroups(egroups, pgroups) + else: + pgroups =3D set(pgroups) =20 kmask =3D "missing" kmask_hint =3D None