diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-11-27 06:19:50 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-11-27 06:19:50 -0800 |
commit | 7f1749ce018453561246959edcaa76fb61800352 (patch) | |
tree | 2268b57ff7ac1ddb7e7b29b99524436559f7d117 | |
parent | efbe1b636fd40c4d41d1fee1bf8b7d6996e5e4ce (diff) | |
download | portage-7f1749ce018453561246959edcaa76fb61800352.tar.gz portage-7f1749ce018453561246959edcaa76fb61800352.tar.bz2 portage-7f1749ce018453561246959edcaa76fb61800352.zip |
stack_lists: optimize repo handling more
-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 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 |