summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-03-02 20:38:11 +0000
committerZac Medico <zmedico@gentoo.org>2010-03-02 20:38:11 +0000
commitdb2e0704e508893bf56c45c9f9cf0b70eb029317 (patch)
tree6ecd3e55caf8012a5031ee519d51c843d6be6e3f
parent4899e3306e52f1eb365d09e95dd4754397f5de79 (diff)
downloadportage-db2e0704e508893bf56c45c9f9cf0b70eb029317.tar.gz
portage-db2e0704e508893bf56c45c9f9cf0b70eb029317.tar.bz2
portage-db2e0704e508893bf56c45c9f9cf0b70eb029317.zip
Bug #268724 - Show a warning message for --unmerge operations and suggest
--depclean <atom> instead. (trunk r15393) svn path=/main/branches/2.1.7/; revision=15615
-rw-r--r--pym/_emerge/actions.py9
1 files changed, 9 insertions, 0 deletions
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 <atom>` 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.