commit: a4fdaa55d21e6904cd686a5da96e3afc0d98758c Author: Florian Schmaus <flow <AT> gentoo <DOT> org> AuthorDate: Thu Dec 18 09:36:34 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Feb 15 13:12:07 2026 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a4fdaa55
Scheduler: No background mode if there is just one merge job Hiding the build/test output if there is just one merge job results in a bad package testing experience (for users who have --jobs enabled by default). Therefore, do not go in background mode if there is just one merge job and --quiet was not requested. Closes: https://bugs.gentoo.org/339579 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> Part-of: https://github.com/gentoo/portage/pull/1529 Closes: https://github.com/gentoo/portage/pull/1529 Signed-off-by: Sam James <sam <AT> gentoo.org> lib/_emerge/Scheduler.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py index f74c0e4589..c3f6cb8b50 100644 --- a/lib/_emerge/Scheduler.py +++ b/lib/_emerge/Scheduler.py @@ -446,11 +446,10 @@ class Scheduler(PollScheduler): @return: True if background mode is enabled, False otherwise. """ parallel_jobs = self._max_jobs is True or self._max_jobs > 1 - background = ( - parallel_jobs - or "--quiet" in self.myopts - or self.myopts.get("--quiet-build") == "y" - ) and not bool(self._opts_no_background.intersection(self.myopts)) + quiet = "--quiet" in self.myopts or self.myopts.get("--quiet-build") == "y" + background = (parallel_jobs or quiet) and not bool( + self._opts_no_background.intersection(self.myopts) + ) if background: interactive_tasks = self._get_interactive_tasks() @@ -489,6 +488,10 @@ class Scheduler(PollScheduler): level=logging.INFO, noiselevel=-1, ) + elif len(self._mergelist) <= 1 and not quiet: + self._set_max_jobs(1) + background = False + self._status_display.quiet = not background or ( "--quiet" in self.myopts and "--verbose" not in self.myopts )
