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