mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
Allow for leading and trailing whitespaces in ';'-separated lists (e.g. update= abc ; def ; ...)
This commit is contained in:
parent
fba8fb839c
commit
9257690f95
2 changed files with 9 additions and 4 deletions
|
|
@ -240,6 +240,7 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, sdk_path, force):
|
||||||
if 'extlibs' in thisbuild:
|
if 'extlibs' in thisbuild:
|
||||||
ftp.chdir('/home/vagrant/build/extlib')
|
ftp.chdir('/home/vagrant/build/extlib')
|
||||||
for lib in thisbuild['extlibs'].split(';'):
|
for lib in thisbuild['extlibs'].split(';'):
|
||||||
|
lib = lib.strip()
|
||||||
lp = lib.split('/')
|
lp = lib.split('/')
|
||||||
for d in lp[:-1]:
|
for d in lp[:-1]:
|
||||||
if d not in ftp.listdir():
|
if d not in ftp.listdir():
|
||||||
|
|
@ -252,6 +253,7 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, sdk_path, force):
|
||||||
srclibpaths = []
|
srclibpaths = []
|
||||||
if 'srclibs' in thisbuild:
|
if 'srclibs' in thisbuild:
|
||||||
for lib in thisbuild['srclibs'].split(';'):
|
for lib in thisbuild['srclibs'].split(';'):
|
||||||
|
lib = lib.strip()
|
||||||
name, _ = lib.split('@')
|
name, _ = lib.split('@')
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
print "Processing srclib '" + name + "'"
|
print "Processing srclib '" + name + "'"
|
||||||
|
|
@ -399,7 +401,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||||
if jni_components == 'yes':
|
if jni_components == 'yes':
|
||||||
jni_components = ['']
|
jni_components = ['']
|
||||||
else:
|
else:
|
||||||
jni_components = jni_components.split(';')
|
jni_components = [c.strip() for c in jni_components.split(';')]
|
||||||
ndkbuild = os.path.join(ndk_path, "ndk-build")
|
ndkbuild = os.path.join(ndk_path, "ndk-build")
|
||||||
for d in jni_components:
|
for d in jni_components:
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
|
|
|
||||||
|
|
@ -1194,7 +1194,7 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, sdk_path,
|
||||||
if 'target' in build:
|
if 'target' in build:
|
||||||
parms.append('-t')
|
parms.append('-t')
|
||||||
parms.append(build['target'])
|
parms.append(build['target'])
|
||||||
update_dirs = updatemode.split(';')
|
update_dirs = [d.strip() for d in updatemode.split(';')]
|
||||||
# Force build.xml update if necessary...
|
# Force build.xml update if necessary...
|
||||||
if updatemode == 'force' or 'target' in build:
|
if updatemode == 'force' or 'target' in build:
|
||||||
if updatemode == 'force':
|
if updatemode == 'force':
|
||||||
|
|
@ -1266,7 +1266,7 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, sdk_path,
|
||||||
# Delete unwanted file...
|
# Delete unwanted file...
|
||||||
if 'rm' in build:
|
if 'rm' in build:
|
||||||
for part in build['rm'].split(';'):
|
for part in build['rm'].split(';'):
|
||||||
dest = os.path.join(build_dir, part)
|
dest = os.path.join(build_dir, part.strip())
|
||||||
if os.path.exists(dest):
|
if os.path.exists(dest):
|
||||||
os.remove(dest)
|
os.remove(dest)
|
||||||
|
|
||||||
|
|
@ -1327,6 +1327,7 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, sdk_path,
|
||||||
if not os.path.exists(libsdir):
|
if not os.path.exists(libsdir):
|
||||||
os.mkdir(libsdir)
|
os.mkdir(libsdir)
|
||||||
for lib in build['extlibs'].split(';'):
|
for lib in build['extlibs'].split(';'):
|
||||||
|
lib = lib.strip()
|
||||||
libf = os.path.basename(lib)
|
libf = os.path.basename(lib)
|
||||||
shutil.copyfile(os.path.join(extlib_dir, lib),
|
shutil.copyfile(os.path.join(extlib_dir, lib),
|
||||||
os.path.join(libsdir, libf))
|
os.path.join(libsdir, libf))
|
||||||
|
|
@ -1336,6 +1337,7 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, sdk_path,
|
||||||
if 'srclibs' in build:
|
if 'srclibs' in build:
|
||||||
print "Collecting source libraries..."
|
print "Collecting source libraries..."
|
||||||
for lib in build['srclibs'].split(';'):
|
for lib in build['srclibs'].split(';'):
|
||||||
|
lib = lib.strip()
|
||||||
name, _ = lib.split('@')
|
name, _ = lib.split('@')
|
||||||
srclibpaths.append((name, getsrclib(lib, srclib_dir, sdk_path, ndk_path, mvn3, preponly=onserver)))
|
srclibpaths.append((name, getsrclib(lib, srclib_dir, sdk_path, ndk_path, mvn3, preponly=onserver)))
|
||||||
basesrclib = vcs.getsrclib()
|
basesrclib = vcs.getsrclib()
|
||||||
|
|
@ -1353,6 +1355,7 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, sdk_path,
|
||||||
# Apply patches if any
|
# Apply patches if any
|
||||||
if 'patch' in build:
|
if 'patch' in build:
|
||||||
for patch in build['patch'].split(';'):
|
for patch in build['patch'].split(';'):
|
||||||
|
patch = patch.strip()
|
||||||
print "Applying " + patch
|
print "Applying " + patch
|
||||||
patch_path = os.path.join('metadata', app['id'], patch)
|
patch_path = os.path.join('metadata', app['id'], patch)
|
||||||
if subprocess.call(['patch', '-p1',
|
if subprocess.call(['patch', '-p1',
|
||||||
|
|
@ -1516,7 +1519,7 @@ def scan_source(build_dir, root_dir, thisbuild):
|
||||||
'jpct-ae']
|
'jpct-ae']
|
||||||
|
|
||||||
if 'scanignore' in thisbuild:
|
if 'scanignore' in thisbuild:
|
||||||
ignore = thisbuild['scanignore'].split(';')
|
ignore = [p.strip() for p in thisbuild['scanignore'].split(';')]
|
||||||
else:
|
else:
|
||||||
ignore = []
|
ignore = []
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue