mirror of
https://github.com/f-droid/fdroidserver.git
synced 2026-03-02 05:47:31 -05:00
make config optional when using common.set_FDroidPopen_env()
common.set_FDroidPopen_env() is used to call git and other tools that are not part of the Android SDK nor require Java, so the items that are being set from the config are optional. This lets plugins do quite a bit without ever setting up a config.
This commit is contained in:
@@ -14,10 +14,6 @@ fdroid_summary = 'prepare the srclibs for `fdroid build --on-server`'
|
||||
|
||||
|
||||
def main():
|
||||
common.config = {
|
||||
'sdk_path': os.getenv('ANDROID_HOME'),
|
||||
}
|
||||
common.fill_config_defaults(common.config)
|
||||
parser = argparse.ArgumentParser(usage="%(prog)s [options] [APPID[:VERCODE] [APPID[:VERCODE] ...]]")
|
||||
common.setup_global_opts(parser)
|
||||
parser.add_argument("appid", nargs='*', help=_("applicationId with optional versionCode in the form APPID[:VERCODE]"))
|
||||
|
||||
@@ -2741,10 +2741,12 @@ def set_FDroidPopen_env(build=None):
|
||||
if env is None:
|
||||
env = os.environ
|
||||
orig_path = env['PATH']
|
||||
for n in ['ANDROID_HOME', 'ANDROID_SDK']:
|
||||
env[n] = config['sdk_path']
|
||||
for k, v in config['java_paths'].items():
|
||||
env['JAVA%s_HOME' % k] = v
|
||||
if config:
|
||||
if config.get('sdk_path'):
|
||||
for n in ['ANDROID_HOME', 'ANDROID_SDK']:
|
||||
env[n] = config['sdk_path']
|
||||
for k, v in config.get('java_paths', {}).items():
|
||||
env['JAVA%s_HOME' % k] = v
|
||||
|
||||
missinglocale = True
|
||||
for k, v in env.items():
|
||||
|
||||
Reference in New Issue
Block a user