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:52 +0000 (UTC)	[thread overview]
Message-ID: <42d9f2ffd47101f279299df026d27026e816f8c7.tommy@gentoo> (raw)

commit:     42d9f2ffd47101f279299df026d27026e816f8c7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 31 01:54:16 2011 +0000
Commit:     Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Mon Jan 31 01:54:16 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=42d9f2ff

getRawMaskAtom: handle user negative incrementals

---
 pym/portage/package/ebuild/_config/MaskManager.py |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/pym/portage/package/ebuild/_config/MaskManager.py b/pym/portage/package/ebuild/_config/MaskManager.py
index 66278ec..be7a212 100644
--- a/pym/portage/package/ebuild/_config/MaskManager.py
+++ b/pym/portage/package/ebuild/_config/MaskManager.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__ = (
@@ -16,6 +16,9 @@ class MaskManager(object):
 		user_config=True, strict_umatched_removal=False):
 		self._punmaskdict = ExtendedAtomDict(list)
 		self._pmaskdict = ExtendedAtomDict(list)
+		# Preserves atoms that are eliminated by negative
+		# incrementals in user_pkgmasklines.
+		self._pmaskdict_raw = ExtendedAtomDict(list)
 
 		#Read profile/package.mask from every repo.
 		#Repositories inherit masks from their parent profiles and
@@ -89,18 +92,23 @@ class MaskManager(object):
 
 		#Stack everything together. At this point, only user_pkgmasklines may contain -atoms.
 		#Don't warn for unmatched -atoms here, since we don't do it for any other user config file.
+		raw_pkgmasklines = stack_lists([repo_pkgmasklines, profile_pkgmasklines], \
+			incremental=1, remember_source_file=True, warn_for_unmatched_removal=False, ignore_repo=True)
 		pkgmasklines = stack_lists([repo_pkgmasklines, profile_pkgmasklines, user_pkgmasklines], \
 			incremental=1, remember_source_file=True, warn_for_unmatched_removal=False, ignore_repo=True)
 		pkgunmasklines = stack_lists([repo_pkgunmasklines, profile_pkgunmasklines, user_pkgunmasklines], \
 			incremental=1, remember_source_file=True, warn_for_unmatched_removal=False, ignore_repo=True)
 
+		for x, source_file in raw_pkgmasklines:
+			self._pmaskdict_raw.setdefault(x.cp, []).append(x)
+
 		for x, source_file in pkgmasklines:
 			self._pmaskdict.setdefault(x.cp, []).append(x)
 
 		for x, source_file in pkgunmasklines:
 			self._punmaskdict.setdefault(x.cp, []).append(x)
 
-		for d in (self._pmaskdict, self._punmaskdict):
+		for d in (self._pmaskdict_raw, self._pmaskdict, self._punmaskdict):
 			for k, v in d.items():
 				d[k] = tuple(v)
 
@@ -152,7 +160,7 @@ class MaskManager(object):
 		"""
 
 		cp = cpv_getkey(cpv)
-		mask_atoms = self._pmaskdict.get(cp)
+		mask_atoms = self._pmaskdict_raw.get(cp)
 		if mask_atoms:
 			pkg = "".join((cpv, _slot_separator, slot))
 			if repo:



             reply	other threads:[~2011-02-06 13:17 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=42d9f2ffd47101f279299df026d27026e816f8c7.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