From: Gokdeniz Karadag Date: Fri, 18 Feb 2011 15:57:25 +0000 (-0800) Subject: emerge: support post_emerge hook like post_sync X-Git-Tag: v2.1.9.41~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1afe920761e010d9bb4fc028895a8868de007775;p=portage.git emerge: support post_emerge hook like post_sync This will fix bug #355447. --- diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 40266943f..0267f11e6 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -367,6 +367,14 @@ def post_emerge(root_config, myopts, mtimedb, retval): if retval in (None, os.EX_OK) or (not "--pretend" in myopts): display_preserved_libs(vardbapi, myopts) + from portage.output import red, bold + postemerge = os.path.join(settings["PORTAGE_CONFIGROOT"], + portage.USER_CONFIG_PATH, "bin", "post_emerge") + if os.access(postemerge, os.X_OK): + retval = portage.process.spawn( + [postemerge], env=settings.environ()) + if retval != os.EX_OK: + print(red(" * ") + bold("spawn failed of " + postemerge)) sys.exit(retval) def multiple_actions(action1, action2):