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 1PqT1g-0003j3-Ef for garchives@archives.gentoo.org; Fri, 18 Feb 2011 16:17:48 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 128061C021; Fri, 18 Feb 2011 16:17:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C773B1C021 for ; Fri, 18 Feb 2011 16:17:40 +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 60AB01B401D for ; Fri, 18 Feb 2011 16:17:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BA6228006A for ; Fri, 18 Feb 2011 16:17:39 +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: <60e195bbafef6c55711f3cd218d3a2b9929a313e.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master 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: 60e195bbafef6c55711f3cd218d3a2b9929a313e Date: Fri, 18 Feb 2011 16:17:39 +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: f6286b492e06e877c02a6d00ca53cf97 commit: 60e195bbafef6c55711f3cd218d3a2b9929a313e Author: Zac Medico gentoo org> AuthorDate: Fri Feb 18 16:16:31 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Feb 18 16:16:31 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D60e195bb 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 79d70ba..5aa4f24 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2453,7 +2453,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 47975e3..0ddda85 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):