Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/_emerge/
Date: Tue, 22 Feb 2011 03:15:06
Message-Id: ac386e0247873bd40f2c79b94e5f41003b729e36.zmedico@gentoo
1 commit: ac386e0247873bd40f2c79b94e5f41003b729e36
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 22 02:07:07 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 22 03:12:54 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ac386e02
7
8 post_emerge: suggest depclean after world update
9
10 This is part of bug #354787.
11
12 ---
13 pym/_emerge/main.py | 13 +++++++++++++
14 1 files changed, 13 insertions(+), 0 deletions(-)
15
16 diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
17 index 267254c..b69a004 100644
18 --- a/pym/_emerge/main.py
19 +++ b/pym/_emerge/main.py
20 @@ -384,8 +384,21 @@ def post_emerge(myaction, myopts, myfiles,
21 writemsg_level(
22 " %s spawn failed of %s\n" % (bad("*"), postemerge,),
23 level=logging.ERROR, noiselevel=-1)
24 +
25 + if "--quiet" not in myopts and \
26 + myaction is None and "@world" in myfiles:
27 + show_depclean_suggestion()
28 +
29 sys.exit(retval)
30
31 +def show_depclean_suggestion():
32 + out = portage.output.EOutput()
33 + msg = "After world updates, it is important to remove " + \
34 + "obsolete packages with emerge --depclean. Refer " + \
35 + "to `man emerge` for more information."
36 + for line in textwrap.wrap(msg, 72):
37 + out.einfo(line)
38 +
39 def multiple_actions(action1, action2):
40 sys.stderr.write("\n!!! Multiple actions requested... Please choose one only.\n")
41 sys.stderr.write("!!! '%s' or '%s'\n\n" % (action1, action2))