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 1Pm4R1-0007CI-C0 for garchives@archives.gentoo.org; Sun, 06 Feb 2011 13:13:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BA344E0B7D; Sun, 6 Feb 2011 13:09:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 70A90E0B75 for ; Sun, 6 Feb 2011 13:09:55 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0FC5C1B4192 for ; Sun, 6 Feb 2011 13:09:55 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 7D73880080 for ; Sun, 6 Feb 2011 13:09:53 +0000 (UTC) From: "Thomas Sachau" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Sachau" Message-ID: <60ffb9adc463f62663095a5d7588f9ae7edd097f.tommy@gentoo> Subject: [gentoo-commits] proj/portage:multilib commit in: pym/portage/package/ebuild/_config/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/package/ebuild/_config/KeywordsManager.py X-VCS-Directories: pym/portage/package/ebuild/_config/ X-VCS-Committer: tommy X-VCS-Committer-Name: Thomas Sachau X-VCS-Revision: 60ffb9adc463f62663095a5d7588f9ae7edd097f Date: Sun, 6 Feb 2011 13:09:53 +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: e701aa9180c45ee53c554f1ab9b83136 commit: 60ffb9adc463f62663095a5d7588f9ae7edd097f Author: Brian Dolbec gmail com> AuthorDate: Mon Jan 31 04:36:45 2011 +0000 Commit: Thomas Sachau gentoo org> CommitDate: Mon Jan 31 05:38:21 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D60ffb9ad Properly fix my earlier breakage --- .../package/ebuild/_config/KeywordsManager.py | 59 +++++++-------= ------ 1 files changed, 21 insertions(+), 38 deletions(-) diff --git a/pym/portage/package/ebuild/_config/KeywordsManager.py b/pym/= portage/package/ebuild/_config/KeywordsManager.py index b01604e..d153e95 100644 --- a/pym/portage/package/ebuild/_config/KeywordsManager.py +++ b/pym/portage/package/ebuild/_config/KeywordsManager.py @@ -118,31 +118,19 @@ class KeywordsManager(object): =20 mygroups =3D self.getKeywords(cpv, slot, keywords, repo) # Repoman may modify this attribute as necessary. - pgroups =3D global_accept_keywords.split() + pgroups =3D set(global_accept_keywords.split()) =20 unmaskgroups =3D self.getPKeywords(cpv, slot, repo, global_accept_keywords) - pgroups.extend(unmaskgroups) + pgroups.update(unmaskgroups) =20 # Hack: Need to check the env directly here as otherwise stacking # doesn't work properly as negative values are lost in the config # object (bug #139600) - egroups =3D self._getEgroups(backuped_accept_keywords) - pgroups.extend(egroups) + egroups =3D backuped_accept_keywords.split() =20 if unmaskgroups or egroups: - inc_pgroups =3D set() - for x in pgroups: - if x[:1] =3D=3D "-": - if x =3D=3D "-*": - inc_pgroups.clear() - else: - inc_pgroups.discard(x[1:]) - else: - inc_pgroups.add(x) - pgroups =3D inc_pgroups - else: - pgroups =3D set(pgroups) + pgroups =3D self._getEgroups(egroups, pgroups.copy()) =20 return self._getMissingKeywords(cpv, pgroups, mygroups) =20 @@ -178,7 +166,7 @@ class KeywordsManager(object): =20 mygroups =3D self.getKeywords(cpv, slot, keywords, repo) # Repoman may modify this attribute as necessary. - pgroups =3D global_accept_keywords.split() + pgroups =3D set(global_accept_keywords.split()) =20 # Hack: Need to check the env directly here as otherwise stacking # doesn't work properly as negative values are lost in the config @@ -186,18 +174,18 @@ class KeywordsManager(object): # we want to use the environment keywords here, # but stripped to it's base arch # we want the raw keywords needed to be accepted from the ebuild - egroups =3D self._getEgroups(backuped_accept_keywords) - egroups =3D [x.lstrip('~') for x in egroups] - - pgroups.extend(egroups) + if backuped_accept_keywords: + egroups =3D self._getEgroups(backuped_accept_keywords.split(), + pgroups.copy()) + pgroups =3D set([x.lstrip('~') for x in egroups]) =20 missing =3D self._getMissingKeywords(cpv, pgroups, mygroups) =20 - return missing, pgroups + return missing, list(pgroups) =20 =20 @staticmethod - def _getEgroups(backuped_accept_keywords): + def _getEgroups(egroups, mygroups): """gets any keywords defined in the environment =20 @param backuped_accept_keywords: ACCEPT_KEYWORDS from the backup env @@ -205,22 +193,17 @@ class KeywordsManager(object): @rtype: List @return: list of KEYWORDS that have been accepted """ - egroups =3D backuped_accept_keywords.split() - pgroups =3D [] - if 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:]) + mygroups.update(egroups) + inc_pgroups =3D set() + for x in mygroups: + if x.startswith("-"): + if x =3D=3D "-*": + inc_pgroups.clear() else: - inc_pgroups.add(x) - pgroups =3D inc_pgroups - del inc_pgroups - return pgroups + inc_pgroups.discard(x[1:]) + else: + inc_pgroups.add(x) + return inc_pgroups =20 =20 @staticmethod