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
This commit is contained in:
Conley Owens
2012-10-01 16:12:28 -07:00
parent 57365c98cc
commit c9129d90de
3 changed files with 22 additions and 18 deletions

View File

@ -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()