logging.info('Try running `fdroid init` in an empty directory.')
raise FDroidException('Repository already exists.')
- if 'aapt' not in test_config or not os.path.isfile(test_config['aapt']):
+ if common.use_androguard():
+ pass
+ elif 'aapt' not in test_config or not os.path.isfile(test_config['aapt']):
# try to find a working aapt, in all the recent possible paths
build_tools = os.path.join(test_config['sdk_path'], 'build-tools')
aaptdirs = []
if os.path.isfile(os.path.join(d, 'aapt')):
aapt = os.path.join(d, 'aapt')
break
- if os.path.isfile(aapt):
+ if aapt and os.path.isfile(aapt):
dirname = os.path.basename(os.path.dirname(aapt))
if dirname == 'build-tools':
# this is the old layout, before versioned build-tools
+ '" does not exist, creating a new keystore there.')
common.write_to_config(test_config, 'keystore', keystore)
repo_keyalias = None
+ keydname = None
if options.repo_keyalias:
repo_keyalias = options.repo_keyalias
common.write_to_config(test_config, 'repo_keyalias', repo_keyalias)
flags=re.MULTILINE)
with open('opensc-fdroid.cfg', 'w') as f:
f.write(opensc_fdroid)
- elif not os.path.exists(keystore):
+ elif os.path.exists(keystore):
+ to_set = ['keystorepass', 'keypass', 'repo_keyalias', 'keydname']
+ if repo_keyalias:
+ to_set.remove('repo_keyalias')
+ if keydname:
+ to_set.remove('keydname')
+ logging.warning('\n' + _('Using existing keystore "{path}"').format(path=keystore)
+ + '\n' + _('Now set these in config.py:') + ' '
+ + ', '.join(to_set) + '\n')
+ else:
password = common.genpassword()
c = dict(test_config)
c['keystorepass'] = password