From db2e0704e508893bf56c45c9f9cf0b70eb029317 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 2 Mar 2010 20:38:11 +0000 Subject: Bug #268724 - Show a warning message for --unmerge operations and suggest --depclean instead. (trunk r15393) svn path=/main/branches/2.1.7/; revision=15615 --- pym/_emerge/actions.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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. -- cgit v1.2.3-1-g7c22