From: Zac Medico Date: Sun, 30 Jan 2011 23:08:22 +0000 (-0800) Subject: Fix keywords breakage from last 2 commits. X-Git-Tag: v2.2.0_alpha20~66 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a512ab7996d7346dc4d058ba49f8442dc5c0e705;p=portage.git Fix keywords breakage from last 2 commits. --- diff --git a/pym/portage/package/ebuild/_config/KeywordsManager.py b/pym/portage/package/ebuild/_config/KeywordsManager.py index 8a6b4bd6e..b01604e66 100644 --- a/pym/portage/package/ebuild/_config/KeywordsManager.py +++ b/pym/portage/package/ebuild/_config/KeywordsManager.py @@ -1,4 +1,4 @@ -# Copyright 2010 Gentoo Foundation +# Copyright 2010-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 __all__ = ( @@ -130,6 +130,20 @@ class KeywordsManager(object): egroups = self._getEgroups(backuped_accept_keywords) pgroups.extend(egroups) + if unmaskgroups or egroups: + inc_pgroups = set() + for x in pgroups: + if x[:1] == "-": + if x == "-*": + inc_pgroups.clear() + else: + inc_pgroups.discard(x[1:]) + else: + inc_pgroups.add(x) + pgroups = inc_pgroups + else: + pgroups = set(pgroups) + return self._getMissingKeywords(cpv, pgroups, mygroups) diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 2cb63c19d..74dcb3dc4 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -1,4 +1,4 @@ -# Copyright 2010 Gentoo Foundation +# Copyright 2010-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 __all__ = [ @@ -1476,6 +1476,11 @@ class config(object): metadata.get("KEYWORDS", ""), metadata.get('repository'), \ self["ARCH"], backuped_accept_keywords) + def _getPKeywords(self, cpv, metadata): + global_accept_keywords = self.get("ACCEPT_KEYWORDS", "") + + return self._keywords_manager.getPKeywords(cpv, metadata["SLOT"], \ + metadata.get('repository'), global_accept_keywords) def _getMissingLicenses(self, cpv, metadata): """