aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-12-18 07:03:45 (GMT)
committerZac Medico <zmedico@gentoo.org>2012-12-18 07:03:45 (GMT)
commit170e34e429313202fed52a95f3ee56203587d40d (patch)
treed98e3749780153c686226ab37e1b47cb02fe3664
parentrepoman: fix dep check for * and ~* keywords (diff)
downloadportage-170e34e429313202fed52a95f3ee56203587d40d.zip
portage-170e34e429313202fed52a95f3ee56203587d40d.tar.gz
portage-170e34e429313202fed52a95f3ee56203587d40d.tar.bz2
depclean summary: count nested sets, bug #298298
-rw-r--r--pym/_emerge/actions.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 3f7a6d5..f3bf858 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -619,11 +619,17 @@ def action_depclean(settings, trees, ldpath_mtimes,
if not cleanlist and "--quiet" in myopts:
return rval
+ set_atoms = {}
+ for k in ("system", "selected"):
+ try:
+ set_atoms[k] = root_config.setconfig.getSetAtoms(k)
+ except portage.exception.PackageSetNotFound:
+ # A nested set could not be resolved, so ignore nested sets.
+ set_atoms[k] = root_config.sets[k].getAtoms()
+
print("Packages installed: " + str(len(vardb.cpv_all())))
- print("Packages in world: " + \
- str(len(root_config.sets["selected"].getAtoms())))
- print("Packages in system: " + \
- str(len(root_config.sets["system"].getAtoms())))
+ print("Packages in world: %d" % len(set_atoms["selected"]))
+ print("Packages in system: %d" % len(set_atoms["system"]))
print("Required packages: "+str(req_pkg_count))
if "--pretend" in myopts:
print("Number to remove: "+str(len(cleanlist)))