Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/
Date: Wed, 06 Jun 2018 04:33:04
Message-Id: 1528259200.1fc628eead43fa5da4b142479aa004ded8acceab.zmedico@gentoo
1 commit: 1fc628eead43fa5da4b142479aa004ded8acceab
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 6 04:26:40 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 6 04:26:40 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1fc628ee
7
8 AbstractEbuildProcess: handle SIGINT during dir lock (bug 657436)
9
10 When the build dir lock is interrupted by SIGINT/TERM, avoid raising
11 an unwanted CancelledError.
12
13 Bug: https://bugs.gentoo.org/657436
14
15 pym/_emerge/AbstractEbuildProcess.py | 7 +++++++
16 1 file changed, 7 insertions(+)
17
18 diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py
19 index af6429a00..bda0bd83f 100644
20 --- a/pym/_emerge/AbstractEbuildProcess.py
21 +++ b/pym/_emerge/AbstractEbuildProcess.py
22 @@ -171,6 +171,13 @@ class AbstractEbuildProcess(SpawnProcess):
23 if lock_future is not self._start_future:
24 raise AssertionError('lock_future is not self._start_future')
25 self._start_future = None
26 + if lock_future.cancelled():
27 + self._build_dir = None
28 + self.cancelled = True
29 + self._was_cancelled()
30 + self._async_wait()
31 + return
32 +
33 lock_future.result()
34
35 if start_ipc_daemon: