From bb87f96b0cd894083a4e878baaf1e94224a969a6 Mon Sep 17 00:00:00 2001 From: Gokdeniz Karadag Date: Fri, 18 Feb 2011 07:57:25 -0800 Subject: [PATCH] emerge: support post_emerge hook like post_sync This will fix bug #355447. --- pym/_emerge/main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 95174ccc0..47975e340 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): -- 2.26.2