Requested by Ulrich Müller.
---
 man/portage.5                              | 4 ++++
 pym/portage/sync/modules/rsync/__init__.py | 1 +
 pym/portage/sync/modules/rsync/rsync.py    | 5 +++++
 3 files changed, 10 insertions(+)

diff --git a/man/portage.5 b/man/portage.5
index 2d444a86f..84999bd2f 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -1081,6 +1081,10 @@ Ignore vcs directories that may be present in the 
repository. It is the
 user's responsibility to set sync-rsync-extra-opts to protect vcs
 directories if appropriate.
 .TP
+.B sync\-rsync\-verify\-jobs
+Number of parallel jobs to use when verifying nested Manifests. Defaults
+to the apparent number of processors.
+.TP
 .B sync\-rsync\-verify\-metamanifest = true|false
 Require the repository to contain a signed MetaManifest and verify
 it using \fBapp\-portage/gemato\fR. Defaults to false.
diff --git a/pym/portage/sync/modules/rsync/__init__.py 
b/pym/portage/sync/modules/rsync/__init__.py
index df9a1995a..14af2120c 100644
--- a/pym/portage/sync/modules/rsync/__init__.py
+++ b/pym/portage/sync/modules/rsync/__init__.py
@@ -29,6 +29,7 @@ module_spec = {
                                'sync-rsync-extra-opts',
                                'sync-rsync-openpgp-key-path',
                                'sync-rsync-vcs-ignore',
+                               'sync-rsync-verify-jobs',
                                'sync-rsync-verify-metamanifest',
                                ),
                        }
diff --git a/pym/portage/sync/modules/rsync/rsync.py 
b/pym/portage/sync/modules/rsync/rsync.py
index 47f0e1ea3..552ac6f6b 100644
--- a/pym/portage/sync/modules/rsync/rsync.py
+++ b/pym/portage/sync/modules/rsync/rsync.py
@@ -91,6 +91,9 @@ class RsyncSync(NewBase):
                self.openpgp_key_path = (
                                self.repo.module_specific_options.get(
                                        'sync-rsync-openpgp-key-path', None))
+               # Support overriding job count.
+               self.verify_jobs = self.repo.module_specific_options.get(
+                               'sync-rsync-verify-jobs', None)
 
                # Real local timestamp file.
                self.servertimestampfile = os.path.join(
@@ -275,6 +278,8 @@ class RsyncSync(NewBase):
                        command = ['gemato', 'verify', '-s', self.repo.location]
                        if self.openpgp_key_path is not None:
                                command += ['-K', self.openpgp_key_path]
+                       if self.verify_jobs is not None:
+                               command += ['-j', self.verify_jobs]
                        exitcode = portage.process.spawn(command, 
**self.spawn_kwargs)
 
                return (exitcode, updatecache_flg)
-- 
2.16.1


Reply via email to