Gentoo Archives: gentoo-commits

From: Thomas Sachau <tommy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:multilib commit in: pym/portage/package/ebuild/_config/
Date: Sun, 06 Feb 2011 13:17:19
Message-Id: 42d9f2ffd47101f279299df026d27026e816f8c7.tommy@gentoo
1 commit: 42d9f2ffd47101f279299df026d27026e816f8c7
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 31 01:54:16 2011 +0000
4 Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 31 01:54:16 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=42d9f2ff
7
8 getRawMaskAtom: handle user negative incrementals
9
10 ---
11 pym/portage/package/ebuild/_config/MaskManager.py | 14 +++++++++++---
12 1 files changed, 11 insertions(+), 3 deletions(-)
13
14 diff --git a/pym/portage/package/ebuild/_config/MaskManager.py b/pym/portage/package/ebuild/_config/MaskManager.py
15 index 66278ec..be7a212 100644
16 --- a/pym/portage/package/ebuild/_config/MaskManager.py
17 +++ b/pym/portage/package/ebuild/_config/MaskManager.py
18 @@ -1,4 +1,4 @@
19 -# Copyright 2010 Gentoo Foundation
20 +# Copyright 2010-2011 Gentoo Foundation
21 # Distributed under the terms of the GNU General Public License v2
22
23 __all__ = (
24 @@ -16,6 +16,9 @@ class MaskManager(object):
25 user_config=True, strict_umatched_removal=False):
26 self._punmaskdict = ExtendedAtomDict(list)
27 self._pmaskdict = ExtendedAtomDict(list)
28 + # Preserves atoms that are eliminated by negative
29 + # incrementals in user_pkgmasklines.
30 + self._pmaskdict_raw = ExtendedAtomDict(list)
31
32 #Read profile/package.mask from every repo.
33 #Repositories inherit masks from their parent profiles and
34 @@ -89,18 +92,23 @@ class MaskManager(object):
35
36 #Stack everything together. At this point, only user_pkgmasklines may contain -atoms.
37 #Don't warn for unmatched -atoms here, since we don't do it for any other user config file.
38 + raw_pkgmasklines = stack_lists([repo_pkgmasklines, profile_pkgmasklines], \
39 + incremental=1, remember_source_file=True, warn_for_unmatched_removal=False, ignore_repo=True)
40 pkgmasklines = stack_lists([repo_pkgmasklines, profile_pkgmasklines, user_pkgmasklines], \
41 incremental=1, remember_source_file=True, warn_for_unmatched_removal=False, ignore_repo=True)
42 pkgunmasklines = stack_lists([repo_pkgunmasklines, profile_pkgunmasklines, user_pkgunmasklines], \
43 incremental=1, remember_source_file=True, warn_for_unmatched_removal=False, ignore_repo=True)
44
45 + for x, source_file in raw_pkgmasklines:
46 + self._pmaskdict_raw.setdefault(x.cp, []).append(x)
47 +
48 for x, source_file in pkgmasklines:
49 self._pmaskdict.setdefault(x.cp, []).append(x)
50
51 for x, source_file in pkgunmasklines:
52 self._punmaskdict.setdefault(x.cp, []).append(x)
53
54 - for d in (self._pmaskdict, self._punmaskdict):
55 + for d in (self._pmaskdict_raw, self._pmaskdict, self._punmaskdict):
56 for k, v in d.items():
57 d[k] = tuple(v)
58
59 @@ -152,7 +160,7 @@ class MaskManager(object):
60 """
61
62 cp = cpv_getkey(cpv)
63 - mask_atoms = self._pmaskdict.get(cp)
64 + mask_atoms = self._pmaskdict_raw.get(cp)
65 if mask_atoms:
66 pkg = "".join((cpv, _slot_separator, slot))
67 if repo: