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 = [] srclibpaths = []
if 'srclibs' in thisbuild: if 'srclibs' in thisbuild:
for lib in thisbuild['srclibs'].split(';'): for lib in thisbuild['srclibs'].split(';'):
number = None srclibpaths.append(common.getsrclib(lib, 'build/srclib', srclibpaths,
subdir = None basepath=True, prepare=False))
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))
# If one was used for the main source, add that too. # If one was used for the main source, add that too.
basesrclib = vcs.getsrclib() basesrclib = vcs.getsrclib()

View File

@ -719,8 +719,9 @@ def getsrclib(spec, srclib_dir, srclibpaths=[], subdir=None, basepath=False,
remove_signing_keys(libdir) remove_signing_keys(libdir)
if basepath: if basepath:
return sdir libdir = sdir
return libdir
return (name, number, libdir)
# Prepare the source code for a particular build # Prepare the source code for a particular build
@ -985,17 +986,10 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
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(';'):
number = None srclibpaths.append(getsrclib(lib, srclib_dir, srclibpaths, preponly=onserver))
subdir = None
lib = lib.strip() for name, number, libpath in srclibpaths:
name, ref = lib.split('@') place_srclib(root_dir, int(number) if number else None, libpath)
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))
place_srclib(root_dir, int(number) if number else None, libpath)
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.