summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-03-04 00:34:57 +0000
committerZac Medico <zmedico@gentoo.org>2007-03-04 00:34:57 +0000
commitd01320af8b9f35e98bd3d7e104cfef799ad4b45a (patch)
tree3609fbd7b6a4992261d4096cd81dd6854a7c695a /bin
parent6eea746f3bed4e3ceaef5915e6191b712490ba20 (diff)
downloadportage-d01320af8b9f35e98bd3d7e104cfef799ad4b45a.tar.gz
portage-d01320af8b9f35e98bd3d7e104cfef799ad4b45a.tar.bz2
portage-d01320af8b9f35e98bd3d7e104cfef799ad4b45a.zip
For bug #169187, make --depclean prune unneeded slots such that it is consistent with the world update algorithm. (trunk r6159:6160)
svn path=/main/branches/2.1.2/; revision=6161
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/emerge b/bin/emerge
index bd0831fd4..0bc8b2395 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -4598,6 +4598,8 @@ def action_depclean(settings, trees, ldpath_mtimes,
dep_check_trees[myroot]["porttree"] = dep_check_trees[myroot]["vartree"]
syslist = getlist(settings, "system")
worldlist = getlist(settings, "world")
+ system_world_dict = genericdict(worldlist)
+ system_world_dict.update(genericdict(syslist))
fakedb = portage.fakedbapi(settings=settings)
myvarlist = vardb.cpv_all()
@@ -4634,8 +4636,12 @@ def action_depclean(settings, trees, ldpath_mtimes,
if not atom.startswith("!") and priority == hard:
unresolveable.setdefault(atom, []).append(parent)
continue
- # Could put slot checking here to ensure that there aren't two
- # packages with the same slot...
+ if portage.dep_getkey(atom) not in system_world_dict:
+ # Prune all but the best matching slot, since that's all that a
+ # deep world update would pull in. Don't prune if the cpv is in
+ # system or world though, since those sets trigger greedy update
+ # of all slots.
+ pkgs = [portage.best(pkgs)]
for pkg in pkgs:
if fakedb.cpv_exists(pkg):
continue