public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: man/, pym/portage/sync/modules/rsync/
@ 2018-01-30 19:17 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2018-01-30 19:17 UTC (permalink / raw
  To: gentoo-commits

commit:     e27762011461e8fb4761412a96ede630740684eb
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 30 16:39:58 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 19:15:55 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=e2776201

rsync: Support overriding number of jobs for verification

Requested-by: Ulrich Müller <ulm <AT> gentoo.org>
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 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)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/portage:master commit in: man/, pym/portage/sync/modules/rsync/
@ 2018-01-30 19:39 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2018-01-30 19:39 UTC (permalink / raw
  To: gentoo-commits

commit:     79c21efb36cb45a2586c5141abbf9e4dc65c8ac7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 30 18:52:19 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 19:39:20 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=79c21efb

rsync: Fix *-verify-metamanifest boolean parsing

Fix sync-rsync-verify-metamanifest to correctly parse yes|no. Also
correct the manpage to use those two terms as they were the ones used
in repos.conf and the news item.

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 man/portage.5                           | 4 ++--
 pym/portage/sync/modules/rsync/rsync.py | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/man/portage.5 b/man/portage.5
index 1f6259715..d4f755f51 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -1086,9 +1086,9 @@ directories if appropriate.
 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
+.B sync\-rsync\-verify\-metamanifest = yes|no
 Require the repository to contain a signed MetaManifest and verify
-it using \fBapp\-portage/gemato\fR. Defaults to false.
+it using \fBapp\-portage/gemato\fR. Defaults to no.
 
 .RE
 

diff --git a/pym/portage/sync/modules/rsync/rsync.py b/pym/portage/sync/modules/rsync/rsync.py
index d9d7d56f2..7c020a563 100644
--- a/pym/portage/sync/modules/rsync/rsync.py
+++ b/pym/portage/sync/modules/rsync/rsync.py
@@ -83,10 +83,11 @@ class RsyncSync(NewBase):
 				self.repo.module_specific_options['sync-rsync-extra-opts']))
 
 		# Process GLEP74 verification options.
-		# Default verification to 'on' for ::gentoo, 'off' otherwise.
+		# Default verification to 'no'; it's enabled for ::gentoo
+		# via default repos.conf though.
 		self.verify_metamanifest = (
 				self.repo.module_specific_options.get(
-					'sync-rsync-verify-metamanifest', False))
+					'sync-rsync-verify-metamanifest', 'no') in ('yes', 'true'))
 		# Support overriding job count.
 		self.verify_jobs = self.repo.module_specific_options.get(
 				'sync-rsync-verify-jobs', None)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-30 19:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-30 19:39 [gentoo-commits] proj/portage:master commit in: man/, pym/portage/sync/modules/rsync/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2018-01-30 19:17 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox