From: Zac Medico Date: Tue, 18 Dec 2012 07:10:19 +0000 (-0800) Subject: depclean warning: count nested sets, bug #298298 X-Git-Tag: v2.2.0_alpha150~98 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=efe5be143560dc608db276175508fd726b8f3621;p=portage.git depclean warning: count nested sets, bug #298298 --- diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index f3bf85897..982197b70 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -662,13 +662,21 @@ def calc_depclean(settings, trees, ldpath_mtimes, required_sets[protected_set_name] = protected_set system_set = psets["system"] - if not system_set or not selected_set: + 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() + + if not set_atoms["system"] or not set_atoms["selected"]: - if not system_set: + if not set_atoms["system"]: writemsg_level("!!! You have no system list.\n", level=logging.ERROR, noiselevel=-1) - if not selected_set: + if not set_atoms["selected"]: writemsg_level("!!! You have no world file.\n", level=logging.WARNING, noiselevel=-1)