emerge: more helpful "non-existent set" message
authorZac Medico <zmedico@gentoo.org>
Tue, 3 Jul 2012 21:52:20 +0000 (14:52 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 3 Jul 2012 21:52:20 +0000 (14:52 -0700)
pym/_emerge/main.py

index 35401383f2b76f7883a34a53e64cd5b99a16b8e2..2a0e67f1d358efd2c6999aea7991f5181769a0cb 100644 (file)
@@ -1494,6 +1494,12 @@ def expand_set_arguments(myfiles, myaction, root_config):
                                        writemsg_level(("emerge: the given set '%s' " + \
                                                "contains a non-existent set named '%s'.\n") % \
                                                (s, e), level=logging.ERROR, noiselevel=-1)
+                                       if s in ('world', 'selected') and \
+                                               SETPREFIX + e.value in sets['selected']:
+                                               writemsg_level(("Use `emerge --deselect %s%s` to "
+                                                       "remove this set from world_sets.\n") %
+                                                       (SETPREFIX, e,), level=logging.ERROR,
+                                                       noiselevel=-1)
                                        return (None, 1)
                                if myaction in unmerge_actions and \
                                                not sets[s].supportsOperation("unmerge"):