summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/__init__.py12
-rw-r--r--pym/portage/__init__.py4
2 files changed, 13 insertions, 3 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 9bbd89dd2..36bf4a10c 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2736,7 +2736,17 @@ class EbuildPhase(CompositeTask):
def _ebuild_exit(self, ebuild_process):
if self.phase == "install":
- portage._check_build_log(self.settings)
+ out = None
+ log_path = self.settings.get("PORTAGE_LOG_FILE")
+ log_file = None
+ if self.background and log_path is not None:
+ log_file = open(log_path, 'a')
+ out = log_file
+ try:
+ portage._check_build_log(self.settings, out=out)
+ finally:
+ if log_file is not None:
+ log_file.close()
if self._default_exit(ebuild_process) != os.EX_OK:
self.wait()
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 71fa0c6d5..66e3377ac 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4292,7 +4292,7 @@ def _post_src_install_checks(mysettings):
noiselevel=-1)
return retval
-def _check_build_log(mysettings):
+def _check_build_log(mysettings, out=None):
"""
Search the content of $PORTAGE_LOG_FILE if it exists
and generate the following QA Notices when appropriate:
@@ -4337,7 +4337,7 @@ def _check_build_log(mysettings):
from portage.elog.messages import eqawarn
def _eqawarn(lines):
for line in lines:
- eqawarn(line, phase="install", key=mysettings.mycpv)
+ eqawarn(line, phase="install", key=mysettings.mycpv, out=out)
from textwrap import wrap
wrap_width = 70