Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH 1/2] openpgp_key_path -> sync_openpgp_key_path
Date: Thu, 01 Feb 2018 20:25:38
Message-Id: 20180201202528.19023-1-mgorny@gentoo.org
1 Rename the openpgp_key_path attribute to sync_openpgp_key_path since
2 Portage code assumes that attribute name matches config key.
3 ---
4 pym/portage/repository/config.py | 6 +++---
5 pym/portage/sync/modules/rsync/rsync.py | 4 ++--
6 2 files changed, 5 insertions(+), 5 deletions(-)
7
8 diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
9 index d3a622f7c..a71047d9b 100644
10 --- a/pym/portage/repository/config.py
11 +++ b/pym/portage/repository/config.py
12 @@ -1,4 +1,4 @@
13 -# Copyright 2010-2017 Gentoo Foundation
14 +# Copyright 2010-2018 Gentoo Foundation
15 # Distributed under the terms of the GNU General Public License v2
16
17 from __future__ import unicode_literals
18 @@ -86,7 +86,7 @@ class RepoConfig(object):
19 'sync_type', 'sync_umask', 'sync_uri', 'sync_user', 'thin_manifest',
20 'update_changelog', '_eapis_banned', '_eapis_deprecated',
21 '_masters_orig', 'module_specific_options', 'manifest_required_hashes',
22 - 'openpgp_key_path',
23 + 'sync_openpgp_key_path',
24 )
25
26 def __init__(self, name, repo_opts, local_config=True):
27 @@ -183,7 +183,7 @@ class RepoConfig(object):
28 self.strict_misc_digests = repo_opts.get(
29 'strict-misc-digests', 'true').lower() == 'true'
30
31 - self.openpgp_key_path = repo_opts.get(
32 + self.sync_openpgp_key_path = repo_opts.get(
33 'sync-openpgp-key-path', None)
34
35 self.module_specific_options = {}
36 diff --git a/pym/portage/sync/modules/rsync/rsync.py b/pym/portage/sync/modules/rsync/rsync.py
37 index e2e6d0658..4471f5bbe 100644
38 --- a/pym/portage/sync/modules/rsync/rsync.py
39 +++ b/pym/portage/sync/modules/rsync/rsync.py
40 @@ -277,8 +277,8 @@ class RsyncSync(NewBase):
41 # if synced successfully, verify now
42 if exitcode == 0 and not local_state_unchanged and self.verify_metamanifest:
43 command = ['gemato', 'verify', '-s', self.repo.location]
44 - if self.repo.openpgp_key_path is not None:
45 - command += ['-K', self.repo.openpgp_key_path]
46 + if self.repo.sync_openpgp_key_path is not None:
47 + command += ['-K', self.repo.sync_openpgp_key_path]
48 if self.verify_jobs is not None:
49 command += ['-j', self.verify_jobs]
50 try:
51 --
52 2.16.1

Replies