From: Zac Medico Date: Tue, 2 Mar 2010 20:38:11 +0000 (-0000) Subject: Bug #268724 - Show a warning message for --unmerge operations and suggest X-Git-Tag: v2.1.8~107 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=db2e0704e508893bf56c45c9f9cf0b70eb029317;p=portage.git Bug #268724 - Show a warning message for --unmerge operations and suggest --depclean instead. (trunk r15393) svn path=/main/branches/2.1.7/; revision=15615 --- diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 66a47da8f..b9a5b1c53 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2104,6 +2104,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.