mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
Substitute variables in Prepare for srclibs too
This commit is contained in:
parent
90c953871f
commit
9c3b4a9daa
1 changed files with 8 additions and 4 deletions
|
@ -989,7 +989,7 @@ def parse_srclib(metafile, **kw):
|
||||||
# Returns the path to it. Normally this is the path to be used when referencing
|
# Returns the path to it. Normally this is the path to be used when referencing
|
||||||
# it, which may be a subdirectory of the actual project. If you want the base
|
# it, which may be a subdirectory of the actual project. If you want the base
|
||||||
# directory of the project, pass 'basepath=True'.
|
# directory of the project, pass 'basepath=True'.
|
||||||
def getsrclib(spec, srclib_dir, sdk_path, basepath=False, raw=False, prepare=True, preponly=False):
|
def getsrclib(spec, srclib_dir, sdk_path, ndk_path="", mvn3="", basepath=False, raw=False, prepare=True, preponly=False):
|
||||||
|
|
||||||
if raw:
|
if raw:
|
||||||
name = spec
|
name = spec
|
||||||
|
@ -1028,8 +1028,12 @@ def getsrclib(spec, srclib_dir, sdk_path, basepath=False, raw=False, prepare=Tru
|
||||||
if prepare:
|
if prepare:
|
||||||
|
|
||||||
if srclib["Prepare"] is not None:
|
if srclib["Prepare"] is not None:
|
||||||
print "******************************* PREPARE " + srclib["Prepare"] + " **************"
|
cmd = srclib["Prepare"].replace('$$SDK$$', sdk_path)
|
||||||
p = subprocess.Popen(['bash', '-c', srclib["Prepare"]], cwd=libdir,
|
cmd = cmd.replace('$$NDK$$', ndk_path).replace('$$MVN$$', mvn3)
|
||||||
|
|
||||||
|
print "******************************* PREPARE " + cmd + " **************"
|
||||||
|
|
||||||
|
p = subprocess.Popen(['bash', '-c', cmd], cwd=libdir,
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
out, err = p.communicate()
|
out, err = p.communicate()
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
|
@ -1242,7 +1246,7 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, sdk_path,
|
||||||
if 'srclibs' in build:
|
if 'srclibs' in build:
|
||||||
for lib in build['srclibs'].split(';'):
|
for lib in build['srclibs'].split(';'):
|
||||||
name, _ = lib.split('@')
|
name, _ = lib.split('@')
|
||||||
srclibpaths.append((name, getsrclib(lib, srclib_dir, sdk_path, preponly=onserver)))
|
srclibpaths.append((name, getsrclib(lib, srclib_dir, sdk_path, ndk_path, mvn3, preponly=onserver)))
|
||||||
basesrclib = vcs.getsrclib()
|
basesrclib = vcs.getsrclib()
|
||||||
# If one was used for the main source, add that too.
|
# If one was used for the main source, add that too.
|
||||||
if basesrclib:
|
if basesrclib:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue