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 1Pqwnb-0003Kj-QU for garchives@archives.gentoo.org; Sun, 20 Feb 2011 00:05:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0B8B61C064; Sun, 20 Feb 2011 00:04:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C898E1C064 for ; Sun, 20 Feb 2011 00:04:18 +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 89DAE1B407D for ; Sun, 20 Feb 2011 00:04:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id EE88180072 for ; Sun, 20 Feb 2011 00:04:17 +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:2.1.9 commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py pym/_emerge/main.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: d1e1f74aa4bdc0f01e065bcdb99fe27cd8d92ada Date: Sun, 20 Feb 2011 00:04:17 +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: 3baee648f9a9ee4addeca356ba2fa068 commit: d1e1f74aa4bdc0f01e065bcdb99fe27cd8d92ada Author: Zac Medico gentoo org> AuthorDate: Fri Feb 18 16:16:31 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Feb 20 00:02:55 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dd1e1f74a emerge: warn to stderr if post_* hooks fail --- pym/_emerge/actions.py | 4 +++- pym/_emerge/main.py | 11 ++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 7562430..e8a38ad 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2432,7 +2432,9 @@ def action_sync(settings, trees, mtimedb, myopts, m= yaction): retval =3D portage.process.spawn( [postsync, dosyncuri], env=3Dsettings.environ()) if retval !=3D os.EX_OK: - print(red(" * ") + bold("spawn failed of " + postsync)) + writemsg_level( + " %s spawn failed of %s\n" % (bad("*"), postsync,), + level=3Dlogging.ERROR, noiselevel=3D-1) =20 if(mybestpv !=3D mypvs) and not "--quiet" in myopts: print() diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 0267f11..f0f44b5 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -367,14 +367,15 @@ def post_emerge(root_config, myopts, mtimedb, retva= l): if retval in (None, os.EX_OK) or (not "--pretend" in myopts): display_preserved_libs(vardbapi, myopts)=09 =20 - from portage.output import red, bold postemerge =3D os.path.join(settings["PORTAGE_CONFIGROOT"], - portage.USER_CONFIG_PATH, "bin", "post_emerge") + portage.USER_CONFIG_PATH, "bin", "post_emerge") if os.access(postemerge, os.X_OK): - retval =3D portage.process.spawn( + hook_retval =3D portage.process.spawn( [postemerge], env=3Dsettings.environ()) - if retval !=3D os.EX_OK: - print(red(" * ") + bold("spawn failed of " + postemerge)) + if hook_retval !=3D os.EX_OK: + writemsg_level( + " %s spawn failed of %s\n" % (bad("*"), postemerge,), + level=3Dlogging.ERROR, noiselevel=3D-1) sys.exit(retval) =20 def multiple_actions(action1, action2):