1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-14 02:50:12 +01:00

Fixes to srclibs with paths

This commit is contained in:
Daniel Martí 2013-11-20 19:00:22 +01:00
parent 47ec7bff2d
commit c4a5ced10a
2 changed files with 9 additions and 25 deletions

View File

@ -285,18 +285,8 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
srclibpaths = []
if 'srclibs' in thisbuild:
for lib in thisbuild['srclibs'].split(';'):
number = None
subdir = None
lib = lib.strip()
name, ref = lib.split('@')
if ':' in name:
number, name = name.split(':', 1)
if '/' in name:
name, subdir = name.split('/',1)
if options.verbose:
print "Processing srclib '" + name + "'"
libpath = common.getsrclib(name+'@'+ref, 'build/srclib', srclibpaths, subdir, basepath=True, prepare=False)
srclibpaths.append((name, number, libpath))
srclibpaths.append(common.getsrclib(lib, 'build/srclib', srclibpaths,
basepath=True, prepare=False))
# If one was used for the main source, add that too.
basesrclib = vcs.getsrclib()

View File

@ -719,8 +719,9 @@ def getsrclib(spec, srclib_dir, srclibpaths=[], subdir=None, basepath=False,
remove_signing_keys(libdir)
if basepath:
return sdir
return libdir
libdir = sdir
return (name, number, libdir)
# Prepare the source code for a particular build
@ -985,16 +986,9 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
if 'srclibs' in build:
print "Collecting source libraries..."
for lib in build['srclibs'].split(';'):
number = None
subdir = None
lib = lib.strip()
name, ref = lib.split('@')
if ':' in name:
number, name = name.split(':', 1)
if '/' in name:
name, subdir = name.split('/',1)
libpath = getsrclib(name+'@'+ref, srclib_dir, srclibpaths, subdir, preponly=onserver)
srclibpaths.append((name, number, libpath))
srclibpaths.append(getsrclib(lib, srclib_dir, srclibpaths, preponly=onserver))
for name, number, libpath in srclibpaths:
place_srclib(root_dir, int(number) if number else None, libpath)
basesrclib = vcs.getsrclib()