replace $$srclib$$ with an absolute path

closes #725
This commit is contained in:
Hans-Christoph Steiner 2020-06-24 20:50:21 +02:00
parent b3f5176654
commit d0f426e076
No known key found for this signature in database
GPG key ID: 3E177817BA1B9BFA
3 changed files with 55 additions and 5 deletions

View file

@ -2116,8 +2116,7 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
# Substitute source library paths into prebuild commands
for name, number, libpath in srclibpaths:
libpath = os.path.relpath(libpath, root_dir)
cmd = cmd.replace('$$' + name + '$$', libpath)
cmd = cmd.replace('$$' + name + '$$', os.path.join(os.getcwd(), libpath))
p = FDroidPopen(['bash', '-x', '-c', '--', cmd], cwd=root_dir)
if p.returncode != 0:
@ -2744,7 +2743,7 @@ def set_FDroidPopen_env(build=None):
def replace_build_vars(cmd, build):
cmd = cmd.replace('$$COMMIT$$', build.commit)
cmd = cmd.replace('$$VERSION$$', build.versionName)
cmd = cmd.replace('$$VERCODE$$', build.versionCode)
cmd = cmd.replace('$$VERCODE$$', str(build.versionCode))
return cmd