summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-02-17 01:59:25 +0000
committerZac Medico <zmedico@gentoo.org>2008-02-17 01:59:25 +0000
commita01a40e8dca76b83009fc9479a7021314b8b06ab (patch)
treec3a17392a2c49a17e7e4058d235ca350f83b494d
parentc02949f253b584d516344b2130da88f482dcad47 (diff)
downloadportage-a01a40e8dca76b83009fc9479a7021314b8b06ab.tar.gz
portage-a01a40e8dca76b83009fc9479a7021314b8b06ab.tar.bz2
portage-a01a40e8dca76b83009fc9479a7021314b8b06ab.zip
Now that unmerge() preserves the order that it's given, if two different
slots of the same package are being unmerged then they are not necessarily unmerged consecutively. To make the display less confusing, never display packages as "protected" or "omitted" when they actually belong to the overall set of "selected" packages to be unmerged. svn path=/main/trunk/; revision=9348
-rw-r--r--pym/_emerge/__init__.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index be53f71b8..6d4ddb3de 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -5048,15 +5048,24 @@ def unmerge(root_config, myopts, unmerge_action,
finally:
if vdb_lock:
portage.locks.unlockdir(vdb_lock)
+ all_selected = set()
+ for x in pkgmap:
+ all_selected.update(x["selected"])
for x in xrange(len(pkgmap)):
selected = pkgmap[x]["selected"]
if not selected:
continue
+ for mytype, mylist in pkgmap[x].iteritems():
+ if mytype == "selected":
+ continue
+ pkgmap[x][mytype] = \
+ [cpv for cpv in mylist if cpv not in all_selected]
cp = portage.cpv_getkey(selected[0])
for y in localtree.dep_match(cp):
if y not in pkgmap[x]["omitted"] and \
y not in pkgmap[x]["selected"] and \
- y not in pkgmap[x]["protected"]:
+ y not in pkgmap[x]["protected"] and \
+ y not in all_selected:
pkgmap[x]["omitted"].append(y)
if global_unmerge and not pkgmap[x]["selected"]:
#avoid cluttering the preview printout with stuff that isn't getting unmerged