mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-12-14 00:24:05 +08:00
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:
18
main.py
18
main.py
@@ -23,6 +23,7 @@ if __name__ == '__main__':
|
||||
del magic
|
||||
|
||||
import getpass
|
||||
import imp
|
||||
import netrc
|
||||
import optparse
|
||||
import os
|
||||
@@ -167,16 +168,15 @@ def _MyRepoPath():
|
||||
def _MyWrapperPath():
|
||||
return os.path.join(os.path.dirname(__file__), 'repo')
|
||||
|
||||
_wrapper_module = None
|
||||
def WrapperModule():
|
||||
global _wrapper_module
|
||||
if not _wrapper_module:
|
||||
_wrapper_module = imp.load_source('wrapper', _MyWrapperPath())
|
||||
return _wrapper_module
|
||||
|
||||
def _CurrentWrapperVersion():
|
||||
VERSION = None
|
||||
pat = re.compile(r'^VERSION *=')
|
||||
fd = open(_MyWrapperPath())
|
||||
for line in fd:
|
||||
if pat.match(line):
|
||||
fd.close()
|
||||
exec line
|
||||
return VERSION
|
||||
raise NameError, 'No VERSION in repo script'
|
||||
return WrapperModule().VERSION
|
||||
|
||||
def _CheckWrapperVersion(ver, repo_path):
|
||||
if not repo_path:
|
||||
|
||||
Reference in New Issue
Block a user