From 332b3fa43b80117a485959f55c98c08b8a1504ca Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 19 Feb 2010 20:21:23 +0000 Subject: Bug #268724 - Show a warning message for --unmerge operations and suggest --depclean instead. svn path=/main/trunk/; revision=15393 --- pym/_emerge/actions.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pym/_emerge/actions.py') 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. -- cgit v1.2.3-1-g7c22