1 |
Since commit 496ff326dc18890889d1ea5d2aec590394635960, invalid repos.conf |
2 |
settings or failure of the pre_sync method caused SyncManager.sync to |
3 |
return an incorrect number of values. |
4 |
|
5 |
Fixes: 496ff326dc18 ("sync repositories in parallel (bug 557426)") |
6 |
X-Gentoo-Bug: 567932 |
7 |
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=567932 |
8 |
--- |
9 |
pym/portage/sync/controller.py | 6 +++--- |
10 |
1 file changed, 3 insertions(+), 3 deletions(-) |
11 |
|
12 |
diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py |
13 |
index e71ba67..92be3cb 100644 |
14 |
--- a/pym/portage/sync/controller.py |
15 |
+++ b/pym/portage/sync/controller.py |
16 |
@@ -129,16 +129,17 @@ class SyncManager(object): |
17 |
self.repo = repo |
18 |
self.exitcode = 1 |
19 |
self.updatecache_flg = False |
20 |
+ hooks_enabled = master_hooks or not repo.sync_hooks_only_on_change |
21 |
if repo.sync_type in self.module_names: |
22 |
tasks = [self.module_controller.get_class(repo.sync_type)] |
23 |
else: |
24 |
msg = "\n%s: Sync module '%s' is not an installed/known type'\n" \ |
25 |
% (bad("ERROR"), repo.sync_type) |
26 |
- return self.exitcode, msg |
27 |
+ return self.exitcode, msg, self.updatecache_flg, hooks_enabled |
28 |
|
29 |
rval = self.pre_sync(repo) |
30 |
if rval != os.EX_OK: |
31 |
- return rval, None |
32 |
+ return rval, None, self.updatecache_flg, hooks_enabled |
33 |
|
34 |
# need to pass the kwargs dict to the modules |
35 |
# so they are available if needed. |
36 |
@@ -157,7 +158,6 @@ class SyncManager(object): |
37 |
taskmaster = TaskHandler(callback=self.do_callback) |
38 |
taskmaster.run_tasks(tasks, func, status, options=task_opts) |
39 |
|
40 |
- hooks_enabled = False |
41 |
if (master_hooks or self.updatecache_flg or |
42 |
not repo.sync_hooks_only_on_change): |
43 |
hooks_enabled = True |
44 |
-- |
45 |
2.4.10 |