From: Zac Medico Date: Fri, 19 Feb 2010 20:21:23 +0000 (-0000) Subject: Bug #268724 - Show a warning message for --unmerge operations and suggest X-Git-Tag: v2.2_rc63~14 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=332b3fa43b80117a485959f55c98c08b8a1504ca;p=portage.git Bug #268724 - Show a warning message for --unmerge operations and suggest --depclean instead. svn path=/main/trunk/; revision=15393 --- diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 2def0e89e..702ccff98 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2280,6 +2280,15 @@ def action_uninstall(settings, trees, ldpath_mtimes, if files and not valid_atoms: return 1 + if action == 'unmerge' and '--quiet' not in opts: + msg = "This action can remove important packages! " + \ + "In order to be safer, use " + \ + "`emerge -pv --depclean ` to check for " + \ + "reverse dependencies before removing packages." + out = portage.output.EOutput() + for line in textwrap.wrap(msg, 72): + out.ewarn(line) + if action in ('clean', 'unmerge') or \ (action == 'prune' and "--nodeps" in opts): # When given a list of atoms, unmerge them in the order given.