summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/util/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py
index e8b60fbfd..4db33498c 100644
--- a/pym/portage/util/__init__.py
+++ b/pym/portage/util/__init__.py
@@ -272,7 +272,14 @@ def stack_lists(lists, incremental=1, remember_source_file=False,
to_be_removed = []
token_slice = token[1:]
for atom in new_list:
- if atom.without_repo == token_slice:
+ atom_without_repo = atom
+ if atom.repo is not None:
+ # Atom.without_repo instantiates a new Atom,
+ # which is unnecessary here, so use string
+ # replacement instead.
+ atom_without_repo = \
+ atom.replace("::" + atom.repo, "", 1)
+ if atom_without_repo == token_slice:
to_be_removed.append(atom)
if to_be_removed:
matched = True