diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-14 20:38:38 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-14 20:38:38 -0700 |
commit | 86dc8c4f89029478e5ec07c2f99527287307d118 (patch) | |
tree | 17d364539481d2da28d5f09dd6880123d14def71 /pym/portage | |
parent | b01d94925297c924365364e82f34e20509130210 (diff) | |
download | portage-86dc8c4f89029478e5ec07c2f99527287307d118.tar.gz portage-86dc8c4f89029478e5ec07c2f99527287307d118.tar.bz2 portage-86dc8c4f89029478e5ec07c2f99527287307d118.zip |
Bug #336692 - When stack_lists() detects unmatched removal atoms,
account for cases in which the same profile is inherited multiple times
in the same stack.
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/util/__init__.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index 8bbc15b92..4cd394b63 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -236,9 +236,11 @@ def stack_lists(lists, incremental=1, remember_source_file=False, warn_for_unmat distinct values using '-value' notation. Higher index is preferenced. all elements must be hashable.""" + matched_removals = set() new_list = {} for sub_list in lists: for token in sub_list: + token_key = token if remember_source_file: token, source_file = token else: @@ -254,9 +256,14 @@ def stack_lists(lists, incremental=1, remember_source_file=False, warn_for_unmat try: new_list.pop(token[1:]) except KeyError: - if warn_for_unmatched_removal: + if warn_for_unmatched_removal and \ + not (source_file and token_key in matched_removals): writemsg(_("--- Unmatch removal atom in %s: %s\n") % (source_file, token), noiselevel=-1) + else: + # Remember this match, in case this profile is + # inherited multiple times in this stack. + matched_removals.add(token_key) else: new_list[token] = source_file else: |