mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
nightly: only use read_config to load final, generated config.py
This needs to use the config loading routine to find Java `keytool`, but since it doesn't need to fully load the config, isolate that usage in the function. Then read_config() is only ever called once, as is it meant to be used, once the config.py is generated. Using `from . import common; common.config = foo` will not always work, due to some oddities to how the `from` imports work. So the full module has to be imported in order to make sure its always properly set.
This commit is contained in:
parent
8a61b0b945
commit
bf913703c5
@ -51,7 +51,9 @@ def _ssh_key_from_debug_keystore():
|
||||
privkey = os.path.join(tmp_dir, '.privkey')
|
||||
key_pem = os.path.join(tmp_dir, '.key.pem')
|
||||
p12 = os.path.join(tmp_dir, '.keystore.p12')
|
||||
subprocess.check_call([common.config['keytool'], '-importkeystore',
|
||||
_config = dict()
|
||||
common.fill_config_defaults(_config)
|
||||
subprocess.check_call([_config['keytool'], '-importkeystore',
|
||||
'-srckeystore', KEYSTORE_FILE, '-srcalias', KEY_ALIAS,
|
||||
'-srcstorepass', PASSWORD, '-srckeypass', PASSWORD,
|
||||
'-destkeystore', p12, '-destalias', KEY_ALIAS,
|
||||
@ -91,7 +93,6 @@ def main():
|
||||
help=_("Don't use rsync checksums"))
|
||||
# TODO add --with-btlog
|
||||
options = parser.parse_args()
|
||||
common.read_config(None)
|
||||
|
||||
# force a tighter umask since this writes private key material
|
||||
umask = os.umask(0o077)
|
||||
|
Loading…
Reference in New Issue
Block a user