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