summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2012-10-01 16:12:28 -0700
committerConley Owens <cco3@android.com>2012-10-25 17:48:35 -0700
commitc9129d90deb7377324b5178a231657e3d8c74019 (patch)
treef0dd3f9ade22e48f4ab9cb8447a360e2e01a5aca /main.py
parent57365c98cc227255f50ab3d71462204c804eb975 (diff)
downloadgit-repo-c9129d90deb7377324b5178a231657e3d8c74019.tar.gz
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
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/main.py b/main.py
index d993ee4e..ba40d56b 100755
--- a/main.py
+++ b/main.py
@@ -23,6 +23,7 @@ if __name__ == '__main__':
23del magic 23del magic
24 24
25import getpass 25import getpass
26import imp
26import netrc 27import netrc
27import optparse 28import optparse
28import os 29import os
@@ -167,16 +168,15 @@ def _MyRepoPath():
167def _MyWrapperPath(): 168def _MyWrapperPath():
168 return os.path.join(os.path.dirname(__file__), 'repo') 169 return os.path.join(os.path.dirname(__file__), 'repo')
169 170
171_wrapper_module = None
172def WrapperModule():
173 global _wrapper_module
174 if not _wrapper_module:
175 _wrapper_module = imp.load_source('wrapper', _MyWrapperPath())
176 return _wrapper_module
177
170def _CurrentWrapperVersion(): 178def _CurrentWrapperVersion():
171 VERSION = None 179 return WrapperModule().VERSION
172 pat = re.compile(r'^VERSION *=')
173 fd = open(_MyWrapperPath())
174 for line in fd:
175 if pat.match(line):
176 fd.close()
177 exec line
178 return VERSION
179 raise NameError, 'No VERSION in repo script'
180 180
181def _CheckWrapperVersion(ver, repo_path): 181def _CheckWrapperVersion(ver, repo_path):
182 if not repo_path: 182 if not repo_path: