From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PrgGP-0002sj-Cy for garchives@archives.gentoo.org; Tue, 22 Feb 2011 00:38:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A05471C094; Tue, 22 Feb 2011 00:37:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5F2701C094 for ; Tue, 22 Feb 2011 00:37:52 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B15191B40A1 for ; Tue, 22 Feb 2011 00:37:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 275968006A for ; Tue, 22 Feb 2011 00:37:51 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/main.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: f69707ae4b344f77b36569a01494bfd11db78353 Date: Tue, 22 Feb 2011 00:37:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 90e16926f00de7535603b286a4527b00 commit: f69707ae4b344f77b36569a01494bfd11db78353 Author: Zac Medico gentoo org> AuthorDate: Tue Feb 22 00:35:14 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Feb 22 00:35:14 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Df69707ae post_emerge: pass in more info This makes it possible to do things like give special suggestions after world updates. --- pym/_emerge/main.py | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 0ddda85..e1ea33a 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -292,7 +292,8 @@ def display_preserved_libs(vardbapi, myopts): print(colorize("WARN", " * ") + " used by %d other files" % (le= n(consumers) - MAX_DISPLAY)) print("Use " + colorize("GOOD", "emerge @preserved-rebuild") + " to re= build packages using these libraries") =20 -def post_emerge(root_config, myopts, mtimedb, retval): +def post_emerge(myaction, myopts, myfiles, + target_root, trees, mtimedb, retval): """ Misc. things to run at the end of a merge session. =20 @@ -303,6 +304,14 @@ def post_emerge(root_config, myopts, mtimedb, retval= ): Display preserved libs warnings Exit Emerge =20 + @param myaction: The action returned from parse_opts() + @type myaction: String + @param myopts: emerge options + @type myopts: dict + @param myfiles: emerge arguments + @type myfiles: list + @param target_root: The target ROOT for myaction + @type target_root: String @param trees: A dictionary mapping each ROOT to it's package databases @type trees: dict @param mtimedb: The mtimeDB to store data needed across merge invocatio= ns @@ -314,8 +323,7 @@ def post_emerge(root_config, myopts, mtimedb, retval)= : 1. Calls sys.exit(retval) """ =20 - target_root =3D root_config.root - trees =3D { target_root : root_config.trees } + root_config =3D trees[target_root]["root_config"] vardbapi =3D trees[target_root]["vartree"].dbapi settings =3D vardbapi.settings info_mtimes =3D mtimedb["info"] @@ -1637,7 +1645,8 @@ def emerge_main(): rval =3D action_uninstall(settings, trees, mtimedb["ldpath"], myopts, myaction, myfiles, spinner) if not (myaction =3D=3D 'deselect' or buildpkgonly or fetchonly or pre= tend): - post_emerge(root_config, myopts, mtimedb, rval) + post_emerge(myaction, myopts, myfiles, settings["ROOT"], + trees, mtimedb, rval) return rval =20 elif myaction =3D=3D 'info': @@ -1708,7 +1717,7 @@ def emerge_main(): display_news_notification(root_config, myopts) retval =3D action_build(settings, trees, mtimedb, myopts, myaction, myfiles, spinner) - root_config =3D trees[settings["ROOT"]]["root_config"] - post_emerge(root_config, myopts, mtimedb, retval) + post_emerge(myaction, myopts, myfiles, settings["ROOT"], + trees, mtimedb, retval) =20 return retval