aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-12-18 07:10:19 (GMT)
committerZac Medico <zmedico@gentoo.org>2012-12-18 07:10:19 (GMT)
commitefe5be143560dc608db276175508fd726b8f3621 (patch)
treea7a2b933df3ce3c3efcb13c8c2912d98a3afbb63
parentdepclean summary: count nested sets, bug #298298 (diff)
downloadportage-efe5be143560dc608db276175508fd726b8f3621.zip
portage-efe5be143560dc608db276175508fd726b8f3621.tar.gz
portage-efe5be143560dc608db276175508fd726b8f3621.tar.bz2
depclean warning: count nested sets, bug #298298
-rw-r--r--pym/_emerge/actions.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index f3bf858..982197b 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)