Prevent a potential KeyError when removing world from the digraph for --prune display...
authorZac Medico <zmedico@gentoo.org>
Sun, 22 Jul 2007 06:39:35 +0000 (06:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 22 Jul 2007 06:39:35 +0000 (06:39 -0000)
svn path=/main/branches/2.1.2/; revision=7347

bin/emerge

index f3952ea596bd1d898e61e73aaf90ea28a2d31238..84cd16a5db3b947f665f73b89fee679f73a8873a 100755 (executable)
@@ -5504,7 +5504,8 @@ def action_depclean(settings, trees, ldpath_mtimes,
        elif action == "prune":
                # Prune really uses all installed instead of world.  It's not a real
                # reverse dependency so don't display it as such.
-               graph.remove("world")
+               if graph.contains("world"):
+                       graph.remove("world")
                for atom in args_set:
                        for pkg in vardb.match(atom):
                                if not fakedb.cpv_exists(pkg):