public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Thomas Sachau" <tommy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:multilib commit in: pym/portage/package/ebuild/_config/
Date: Sun,  6 Feb 2011 13:09:53 +0000 (UTC)	[thread overview]
Message-ID: <c5d64577c61c1e8b17353f1c1e6e063f5148012f.tommy@gentoo> (raw)

commit:     c5d64577c61c1e8b17353f1c1e6e063f5148012f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 31 06:07:38 2011 +0000
Commit:     Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Mon Jan 31 06:07:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c5d64577

KeywordsManager: use lists where order matters

Also remove x.lstrip('~') code from from getRawMissingKeywords() since
I don't understand it (was only recently added, and we can add back
later if appropriate).

---
 .../package/ebuild/_config/KeywordsManager.py      |   23 ++++++++++---------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/pym/portage/package/ebuild/_config/KeywordsManager.py b/pym/portage/package/ebuild/_config/KeywordsManager.py
index d153e95..247dcb4 100644
--- a/pym/portage/package/ebuild/_config/KeywordsManager.py
+++ b/pym/portage/package/ebuild/_config/KeywordsManager.py
@@ -118,11 +118,11 @@ class KeywordsManager(object):
 
 		mygroups = self.getKeywords(cpv, slot, keywords, repo)
 		# Repoman may modify this attribute as necessary.
-		pgroups = set(global_accept_keywords.split())
+		pgroups = global_accept_keywords.split()
 
 		unmaskgroups = self.getPKeywords(cpv, slot, repo,
 				global_accept_keywords)
-		pgroups.update(unmaskgroups)
+		pgroups.extend(unmaskgroups)
 
 		# Hack: Need to check the env directly here as otherwise stacking
 		# doesn't work properly as negative values are lost in the config
@@ -130,7 +130,9 @@ class KeywordsManager(object):
 		egroups = backuped_accept_keywords.split()
 
 		if unmaskgroups or egroups:
-			pgroups = self._getEgroups(egroups, pgroups.copy())
+			pgroups = self._getEgroups(egroups, pgroups)
+		else:
+			pgroups = set(pgroups)
 
 		return self._getMissingKeywords(cpv, pgroups, mygroups)
 
@@ -166,18 +168,16 @@ class KeywordsManager(object):
 
 		mygroups = self.getKeywords(cpv, slot, keywords, repo)
 		# Repoman may modify this attribute as necessary.
-		pgroups = set(global_accept_keywords.split())
+		pgroups = global_accept_keywords.split()
 
 		# 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)
-		# 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
 		if backuped_accept_keywords:
 			egroups = self._getEgroups(backuped_accept_keywords.split(),
-					pgroups.copy())
-			pgroups = set([x.lstrip('~') for x in egroups])
+					pgroups)
+		else:
+			pgroups = set(pgroups)
 
 		missing = self._getMissingKeywords(cpv, pgroups, mygroups)
 
@@ -193,10 +193,11 @@ class KeywordsManager(object):
 		@rtype: List
 		@return: list of KEYWORDS that have been accepted
 		"""
-		mygroups.update(egroups)
+		mygroups = list(mygroups)
+		mygroups.extend(egroups)
 		inc_pgroups = set()
 		for x in mygroups:
-			if x.startswith("-"):
+			if x[:1] == "-":
 				if x == "-*":
 					inc_pgroups.clear()
 				else:



             reply	other threads:[~2011-02-06 13:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-06 13:09 Thomas Sachau [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-02-06 13:09 [gentoo-commits] proj/portage:multilib commit in: pym/portage/package/ebuild/_config/ Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c5d64577c61c1e8b17353f1c1e6e063f5148012f.tommy@gentoo \
    --to=tommy@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox