aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-04-09 13:27:36 -0700
committerZac Medico <zmedico@gentoo.org>2020-04-09 13:47:08 -0700
commitad325eb10bc6e8ec2a8248f8e9173911f957c0da (patch)
tree52e986b116aebfd7dc996f85997e8ba5f1387243 /lib/_emerge
parentUpdates for portage-2.3.98 release (diff)
downloadportage-ad325eb10bc6e8ec2a8248f8e9173911f957c0da.tar.gz
portage-ad325eb10bc6e8ec2a8248f8e9173911f957c0da.tar.bz2
portage-ad325eb10bc6e8ec2a8248f8e9173911f957c0da.zip
_schedule_merge_wakeup: handle main loop exit
Detect main loop exit and do not attempt to schedule in this case. Fixes: 389429d798a1 ("Scheduler: wakeup for empty merge queue (bug 711322)") Reported-by: Rick Farina <zerochaos@gentoo.org> Bug: https://bugs.gentoo.org/711322 Bug: https://bugs.gentoo.org/716636 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge')
-rw-r--r--lib/_emerge/Scheduler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py
index 2c0483230..6f4564000 100644
--- a/lib/_emerge/Scheduler.py
+++ b/lib/_emerge/Scheduler.py
@@ -1635,7 +1635,8 @@ class Scheduler(PollScheduler):
def _schedule_merge_wakeup(self, future):
if not future.cancelled():
future.result()
- self._schedule()
+ if self._main_exit is not None and not self._main_exit.done():
+ self._schedule()
def _sigcont_handler(self, signum, frame):
self._sigcont_time = time.time()