1 |
On 01/30/2018 10:53 AM, Michał Górny wrote: |
2 |
> Fix sync-rsync-verify-metamanifest to correctly parse yes|no. Also |
3 |
> correct the manpage to use those two terms as they were the ones used |
4 |
> in repos.conf and the news item. |
5 |
> --- |
6 |
> man/portage.5 | 4 ++-- |
7 |
> pym/portage/sync/modules/rsync/rsync.py | 5 +++-- |
8 |
> 2 files changed, 5 insertions(+), 4 deletions(-) |
9 |
> |
10 |
> diff --git a/man/portage.5 b/man/portage.5 |
11 |
> index 1f6259715..d4f755f51 100644 |
12 |
> --- a/man/portage.5 |
13 |
> +++ b/man/portage.5 |
14 |
> @@ -1086,9 +1086,9 @@ directories if appropriate. |
15 |
> Number of parallel jobs to use when verifying nested Manifests. Defaults |
16 |
> to the apparent number of processors. |
17 |
> .TP |
18 |
> -.B sync\-rsync\-verify\-metamanifest = true|false |
19 |
> +.B sync\-rsync\-verify\-metamanifest = yes|no |
20 |
> Require the repository to contain a signed MetaManifest and verify |
21 |
> -it using \fBapp\-portage/gemato\fR. Defaults to false. |
22 |
> +it using \fBapp\-portage/gemato\fR. Defaults to no. |
23 |
> |
24 |
> .RE |
25 |
> |
26 |
> diff --git a/pym/portage/sync/modules/rsync/rsync.py b/pym/portage/sync/modules/rsync/rsync.py |
27 |
> index d9d7d56f2..651e2d9f9 100644 |
28 |
> --- a/pym/portage/sync/modules/rsync/rsync.py |
29 |
> +++ b/pym/portage/sync/modules/rsync/rsync.py |
30 |
> @@ -83,10 +83,11 @@ class RsyncSync(NewBase): |
31 |
> self.repo.module_specific_options['sync-rsync-extra-opts'])) |
32 |
> |
33 |
> # Process GLEP74 verification options. |
34 |
> - # Default verification to 'on' for ::gentoo, 'off' otherwise. |
35 |
> + # Default verification to 'no'; it's enabled for ::gentoo |
36 |
> + # via default repos.conf though. |
37 |
> self.verify_metamanifest = ( |
38 |
> self.repo.module_specific_options.get( |
39 |
> - 'sync-rsync-verify-metamanifest', False)) |
40 |
> + 'sync-rsync-verify-metamanifest', 'no') == 'yes') |
41 |
|
42 |
Many of our repos.conf options are currently using true|false, so this |
43 |
seems a lot more friendly: |
44 |
|
45 |
self.repo.module_specific_options.get( |
46 |
'sync-rsync-verify-metamanifest', 'no') in ('true', 'yes') |
47 |
|
48 |
> # Support overriding job count. |
49 |
> self.verify_jobs = self.repo.module_specific_options.get( |
50 |
> 'sync-rsync-verify-jobs', None) |
51 |
> |
52 |
|
53 |
|
54 |
-- |
55 |
Thanks, |
56 |
Zac |