From: Zac Medico Date: Tue, 18 Dec 2012 07:03:45 +0000 (-0800) Subject: depclean summary: count nested sets, bug #298298 X-Git-Tag: v2.2.0_alpha150~99 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=170e34e429313202fed52a95f3ee56203587d40d;p=portage.git depclean summary: count nested sets, bug #298298 --- diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 3f7a6d531..f3bf85897 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)))