diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-02-19 20:21:23 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-02-19 20:21:23 +0000 |
commit | 332b3fa43b80117a485959f55c98c08b8a1504ca (patch) | |
tree | 9ec36845c4f78f9925893fcf763a7c2155472999 | |
parent | bb14921cd21ec8366b6c974aa09dd1ec00a4729a (diff) | |
download | portage-332b3fa43b80117a485959f55c98c08b8a1504ca.tar.gz portage-332b3fa43b80117a485959f55c98c08b8a1504ca.tar.bz2 portage-332b3fa43b80117a485959f55c98c08b8a1504ca.zip |
Bug #268724 - Show a warning message for --unmerge operations and suggest
--depclean <atom> instead.
svn path=/main/trunk/; revision=15393
-rw-r--r-- | pym/_emerge/actions.py | 9 |
1 files changed, 9 insertions, 0 deletions
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 <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. |