1 |
commit: efc4905546f505f69d5b1355aaa0c80e665a6f4a |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 28 20:18:06 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 28 20:18:06 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=efc49055 |
7 |
|
8 |
MetadataRegen: fix deprecated _wait usage (bug 653856) |
9 |
|
10 |
Override PollScheduler._cleanup() instead of AsynchronousTask._wait(), |
11 |
since AsynchronousTask._wait() is deprecated. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/653856 |
14 |
|
15 |
pym/_emerge/MetadataRegen.py | 14 +++++--------- |
16 |
1 file changed, 5 insertions(+), 9 deletions(-) |
17 |
|
18 |
diff --git a/pym/_emerge/MetadataRegen.py b/pym/_emerge/MetadataRegen.py |
19 |
index d92b6a06e..8eb110a46 100644 |
20 |
--- a/pym/_emerge/MetadataRegen.py |
21 |
+++ b/pym/_emerge/MetadataRegen.py |
22 |
@@ -1,4 +1,4 @@ |
23 |
-# Copyright 1999-2013 Gentoo Foundation |
24 |
+# Copyright 1999-2018 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
import portage |
28 |
@@ -77,18 +77,15 @@ class MetadataRegen(AsyncScheduler): |
29 |
settings=portdb.doebuild_settings, |
30 |
write_auxdb=self._write_auxdb) |
31 |
|
32 |
- def _wait(self): |
33 |
- |
34 |
- AsyncScheduler._wait(self) |
35 |
+ def _cleanup(self): |
36 |
+ super(MetadataRegen, self)._cleanup() |
37 |
|
38 |
portdb = self._portdb |
39 |
dead_nodes = {} |
40 |
|
41 |
- self._termination_check() |
42 |
- if self._terminated_tasks: |
43 |
+ if self._terminated.is_set(): |
44 |
portdb.flush_cache() |
45 |
- self.returncode = self._cancelled_returncode |
46 |
- return self.returncode |
47 |
+ return |
48 |
|
49 |
if self._global_cleanse: |
50 |
for mytree in portdb.porttrees: |
51 |
@@ -132,7 +129,6 @@ class MetadataRegen(AsyncScheduler): |
52 |
pass |
53 |
|
54 |
portdb.flush_cache() |
55 |
- return self.returncode |
56 |
|
57 |
def _task_exit(self, metadata_process): |