summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-15 23:46:41 -0700
committerZac Medico <zmedico@gentoo.org>2012-10-15 23:47:09 -0700
commit84ea673c632dea0bc9af61c371f71ca86cc19e1a (patch)
tree749746b7e6a93abf3e6d268dd22246ab46460926 /bin
parent54e206ac6901b2f469638378e039d207f5024622 (diff)
downloadportage-84ea673c632dea0bc9af61c371f71ca86cc19e1a.tar.gz
portage-84ea673c632dea0bc9af61c371f71ca86cc19e1a.tar.bz2
portage-84ea673c632dea0bc9af61c371f71ca86cc19e1a.zip
egencache --update-manifests: re-sign when needed
If the Manifest is signed with a different key from the one specified by --gpg-key or PORTAGE_GPG_KEY, strip the existing signature and re-sign the Manifest.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/egencache4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/egencache b/bin/egencache
index 15571cbdc..9d88237a3 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -969,6 +969,7 @@ def egencache_main(args):
gpg_cmd = None
gpg_vars = None
+ force_sign_key = None
if options.update_manifests:
if repo_config.sign_manifest:
@@ -1024,6 +1025,8 @@ def egencache_main(args):
if v is not None:
gpg_vars[k] = v
+ force_sign_key = gpg_vars.get("PORTAGE_GPG_KEY")
+
ret = [os.EX_OK]
if options.update:
@@ -1050,6 +1053,7 @@ def egencache_main(args):
event_loop = global_event_loop()
scheduler = ManifestScheduler(portdb, cp_iter=cp_iter,
gpg_cmd=gpg_cmd, gpg_vars=gpg_vars,
+ force_sign_key=force_sign_key,
max_jobs=options.jobs,
max_load=options.load_average,
event_loop=event_loop)