diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-01-17 02:32:55 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-01-17 02:32:55 +0000 |
commit | ad5e7103aba7e4c2f92ed4c54f6a97f0a375b713 (patch) | |
tree | fddcc76e7df03ee3fb96f2e2c1221225c49f394d | |
parent | 1130281d35dce5cd86d7cce27e5a52ce3814ed88 (diff) | |
download | portage-ad5e7103aba7e4c2f92ed4c54f6a97f0a375b713.tar.gz portage-ad5e7103aba7e4c2f92ed4c54f6a97f0a375b713.tar.bz2 portage-ad5e7103aba7e4c2f92ed4c54f6a97f0a375b713.zip |
Fix elimination of duplicate virtuals between the binpkg repo and installed packages. (trunk r5684)
svn path=/main/branches/2.1.2/; revision=5685
-rw-r--r-- | pym/portage.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py index c8dc1dd94..2e6b571cf 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -3889,11 +3889,11 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/", match_atom = x if isblocker: match_atom = x[1:] - pkgs = [] + pkgs = {} for cpv in portdb.match(match_atom): # only use new-style matches if cpv.startswith("virtual/"): - pkgs.append((cpv, pkgsplit(cpv), portdb)) + pkgs[cpv] = (cpv, pkgsplit(cpv), portdb) if kwargs["use_binaries"] and "vartree" in trees[myroot]: vardb = trees[myroot]["vartree"].dbapi for cpv in vardb.match(match_atom): @@ -3901,7 +3901,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/", if cpv.startswith("virtual/"): if cpv in pkgs: continue - pkgs.append((cpv, pkgsplit(cpv), vardb)) + pkgs[cpv] = (cpv, pkgsplit(cpv), vardb) if not (pkgs or mychoices): # This one couldn't be expanded as a new-style virtual. Old-style # virtuals have already been expanded by dep_virtual, so this one @@ -3913,6 +3913,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/", if not pkgs and len(mychoices) == 1: newsplit.append(x.replace(mykey, mychoices[0])) continue + pkgs = pkgs.values() pkgs.sort(compare_pkgs) # Prefer higher versions. if isblocker: a = [] |