From c9129d90deb7377324b5178a231657e3d8c74019 Mon Sep 17 00:00:00 2001 From: Conley Owens Date: Mon, 1 Oct 2012 16:12:28 -0700 Subject: Update PGP keys during _PostRepoUpgrade in `sync` Previously, if a key was added, a client wouldn't add the key during the sync step. This would cause issues if a new key were added and a subsequent release were signed by that key. Change-Id: I4fac317573cd9d0e8da62aa42e00faf08bfeb26c --- subcmds/sync.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'subcmds/sync.py') diff --git a/subcmds/sync.py b/subcmds/sync.py index a4ca344a..a7df7c89 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -46,6 +46,7 @@ except ImportError: from git_command import GIT from git_refs import R_HEADS, HEAD +from main import WrapperModule from project import Project from project import RemoteSpec from command import Command, MirrorSafeCommand @@ -537,7 +538,7 @@ uncommitted changes are present' % project.relpath mp.PreSync() if opt.repo_upgraded: - _PostRepoUpgrade(self.manifest) + _PostRepoUpgrade(self.manifest, opt) if not opt.local_only: mp.Sync_NetworkHalf(quiet=opt.quiet, @@ -611,7 +612,10 @@ uncommitted changes are present' % project.relpath if self.manifest.notice: print self.manifest.notice -def _PostRepoUpgrade(manifest): +def _PostRepoUpgrade(manifest, opt): + wrapper = WrapperModule() + if wrapper.NeedSetupGnuPG(): + wrapper.SetupGnuPG(opt.quiet) for project in manifest.projects.values(): if project.Exists: project.PostRepoUpgrade() -- cgit v1.2.3-54-g00ecf