aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-01-30 17:39:58 +0100
committerMichał Górny <mgorny@gentoo.org>2018-01-30 20:15:55 +0100
commite27762011461e8fb4761412a96ede630740684eb (patch)
tree06cae34696ffae6edbfb273ebd820efbab8d1936
parentUpdates for portage-2.3.21 release (diff)
downloadportage-e2776201.tar.gz
portage-e2776201.tar.bz2
portage-e2776201.zip
rsync: Support overriding number of jobs for verification
Requested-by: Ulrich Müller <ulm@gentoo.org> Reviewed-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--man/portage.54
-rw-r--r--pym/portage/sync/modules/rsync/__init__.py1
-rw-r--r--pym/portage/sync/modules/rsync/rsync.py5
3 files changed, 10 insertions, 0 deletions
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)