1 |
On 01/30/2018 08:54 AM, Michał Górny wrote: |
2 |
> Requested by Ulrich Müller. |
3 |
> --- |
4 |
> man/portage.5 | 4 ++++ |
5 |
> pym/portage/sync/modules/rsync/__init__.py | 1 + |
6 |
> pym/portage/sync/modules/rsync/rsync.py | 5 +++++ |
7 |
> 3 files changed, 10 insertions(+) |
8 |
> |
9 |
> diff --git a/man/portage.5 b/man/portage.5 |
10 |
> index 2d444a86f..84999bd2f 100644 |
11 |
> --- a/man/portage.5 |
12 |
> +++ b/man/portage.5 |
13 |
> @@ -1081,6 +1081,10 @@ Ignore vcs directories that may be present in the repository. It is the |
14 |
> user's responsibility to set sync-rsync-extra-opts to protect vcs |
15 |
> directories if appropriate. |
16 |
> .TP |
17 |
> +.B sync\-rsync\-verify\-jobs |
18 |
> +Number of parallel jobs to use when verifying nested Manifests. Defaults |
19 |
> +to the apparent number of processors. |
20 |
> +.TP |
21 |
> .B sync\-rsync\-verify\-metamanifest = true|false |
22 |
> Require the repository to contain a signed MetaManifest and verify |
23 |
> it using \fBapp\-portage/gemato\fR. Defaults to false. |
24 |
> diff --git a/pym/portage/sync/modules/rsync/__init__.py b/pym/portage/sync/modules/rsync/__init__.py |
25 |
> index df9a1995a..14af2120c 100644 |
26 |
> --- a/pym/portage/sync/modules/rsync/__init__.py |
27 |
> +++ b/pym/portage/sync/modules/rsync/__init__.py |
28 |
> @@ -29,6 +29,7 @@ module_spec = { |
29 |
> 'sync-rsync-extra-opts', |
30 |
> 'sync-rsync-openpgp-key-path', |
31 |
> 'sync-rsync-vcs-ignore', |
32 |
> + 'sync-rsync-verify-jobs', |
33 |
> 'sync-rsync-verify-metamanifest', |
34 |
> ), |
35 |
> } |
36 |
> diff --git a/pym/portage/sync/modules/rsync/rsync.py b/pym/portage/sync/modules/rsync/rsync.py |
37 |
> index 47f0e1ea3..552ac6f6b 100644 |
38 |
> --- a/pym/portage/sync/modules/rsync/rsync.py |
39 |
> +++ b/pym/portage/sync/modules/rsync/rsync.py |
40 |
> @@ -91,6 +91,9 @@ class RsyncSync(NewBase): |
41 |
> self.openpgp_key_path = ( |
42 |
> self.repo.module_specific_options.get( |
43 |
> 'sync-rsync-openpgp-key-path', None)) |
44 |
> + # Support overriding job count. |
45 |
> + self.verify_jobs = self.repo.module_specific_options.get( |
46 |
> + 'sync-rsync-verify-jobs', None) |
47 |
> |
48 |
> # Real local timestamp file. |
49 |
> self.servertimestampfile = os.path.join( |
50 |
> @@ -275,6 +278,8 @@ class RsyncSync(NewBase): |
51 |
> command = ['gemato', 'verify', '-s', self.repo.location] |
52 |
> if self.openpgp_key_path is not None: |
53 |
> command += ['-K', self.openpgp_key_path] |
54 |
> + if self.verify_jobs is not None: |
55 |
> + command += ['-j', self.verify_jobs] |
56 |
> exitcode = portage.process.spawn(command, **self.spawn_kwargs) |
57 |
> |
58 |
> return (exitcode, updatecache_flg) |
59 |
> |
60 |
|
61 |
Looks good. |
62 |
-- |
63 |
Thanks, |
64 |
Zac |