1 |
commit: 1eda52d380b39095c6471db8025ab2202fedafc9 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 1 22:23:39 2021 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 1 22:27:41 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1eda52d3 |
7 |
|
8 |
_run_pkg_pretend: raise asyncio.CancelledError when terminated |
9 |
|
10 |
Bug: https://bugs.gentoo.org/787545 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
lib/_emerge/Scheduler.py | 6 +++++- |
14 |
1 file changed, 5 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py |
17 |
index 0ed2ee530..656d382dd 100644 |
18 |
--- a/lib/_emerge/Scheduler.py |
19 |
+++ b/lib/_emerge/Scheduler.py |
20 |
@@ -1,4 +1,4 @@ |
21 |
-# Copyright 1999-2020 Gentoo Authors |
22 |
+# Copyright 1999-2021 Gentoo Authors |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
from collections import deque |
26 |
@@ -791,6 +791,10 @@ class Scheduler(PollScheduler): |
27 |
if "pretend" not in x.defined_phases: |
28 |
continue |
29 |
|
30 |
+ self._termination_check() |
31 |
+ if self._terminated_tasks: |
32 |
+ raise asyncio.CancelledError |
33 |
+ |
34 |
out_str = "Running pre-merge checks for " + colorize("INFORM", x.cpv) |
35 |
self._status_msg(out_str) |