Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r15393 - main/trunk/pym/_emerge
Date: Fri, 19 Feb 2010 20:21:27
Message-Id: E1NiZLo-0003Ts-CB@stork.gentoo.org
1 Author: zmedico
2 Date: 2010-02-19 20:21:23 +0000 (Fri, 19 Feb 2010)
3 New Revision: 15393
4
5 Modified:
6 main/trunk/pym/_emerge/actions.py
7 Log:
8 Bug #268724 - Show a warning message for --unmerge operations and suggest
9 --depclean <atom> instead.
10
11
12 Modified: main/trunk/pym/_emerge/actions.py
13 ===================================================================
14 --- main/trunk/pym/_emerge/actions.py 2010-02-19 11:00:14 UTC (rev 15392)
15 +++ main/trunk/pym/_emerge/actions.py 2010-02-19 20:21:23 UTC (rev 15393)
16 @@ -2280,6 +2280,15 @@
17 if files and not valid_atoms:
18 return 1
19
20 + if action == 'unmerge' and '--quiet' not in opts:
21 + msg = "This action can remove important packages! " + \
22 + "In order to be safer, use " + \
23 + "`emerge -pv --depclean <atom>` to check for " + \
24 + "reverse dependencies before removing packages."
25 + out = portage.output.EOutput()
26 + for line in textwrap.wrap(msg, 72):
27 + out.ewarn(line)
28 +
29 if action in ('clean', 'unmerge') or \
30 (action == 'prune' and "--nodeps" in opts):
31 # When given a list of atoms, unmerge them in the order given.