From 0ecd5172b17496dd11506297256d04a0ba8f56f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Mon, 17 Feb 2014 13:07:13 +0100 Subject: [PATCH] Make the 'update' flag a list too --- docs/fdroid.texi | 14 +++++++------- fdroidserver/common.py | 8 ++++---- fdroidserver/metadata.py | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/fdroid.texi b/docs/fdroid.texi index 08b8f3fc..665fedd7 100644 --- a/docs/fdroid.texi +++ b/docs/fdroid.texi @@ -852,7 +852,7 @@ possibly sub-projects. This is likely to cause the whole build.xml to be rewritten, which is fine if it's a 'standard' android file or doesn't already exist, but not a good idea if it's heavily customised. -@item update=xxx +@item update= By default, 'android update project' is used to generate or update the project and all its referenced projects. Specifying update=no bypasses that. Note that this only matters in ant build recipes. @@ -860,7 +860,7 @@ Note that this only matters in ant build recipes. Default value is '@code{auto}', which uses the paths used in the project.properties file to find out what project paths to update. -Otherwise, value can be a semicolon-separated list of directories in +Otherwise, value can be a comma-separated list of directories in which to run 'android update project' relative to the main application directory (which may include '@code{subdir}' parameter). @@ -895,14 +895,14 @@ Multiple files/directories can be specified by separating them with ','. Directories will be recursively deleted. @item extlibs=a,b,... -Specifies a list of external libraries (jar files) from the +Comma-separated list of external libraries (jar files) from the @code{build/extlib} library, which will be placed in the @code{libs} directory -of the project. Separate items with semicolons. +of the project. @item srclibs=[n:]a@@r,[n:]b@@r1,... -Specifies a list of source libraries or Android projects. Separate items with -semicolons, and each item is of the form name@@rev where name is the predefined -source library name and rev is the revision or tag in source control to use. +Comma-separated list of source libraries or Android projects. Each item is of +the form name@@rev where name is the predefined source library name and rev is +the revision or tag to use in the respective source control. For ant projects, you can optionally append a number with a colon at the beginning of a srclib item to automatically place it in project.properties as diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 6e2c1b1f..b52562b2 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1055,9 +1055,9 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver= raise BuildException("Error running prebuild command for %s:%s" % (app['id'], build['version']), p.stdout) - updatemode = build.get('update', 'auto') + updatemode = build.get('update', ['auto']) # Generate (or update) the ant build file, build.xml... - if updatemode != 'no' and build['type'] == 'ant': + if updatemode != ['no'] and build['type'] == 'ant': parms = [os.path.join(config['sdk_path'], 'tools', 'android'), 'update'] lparms = parms + ['lib-project'] parms = parms + ['project'] @@ -1065,10 +1065,10 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver= if 'target' in build and build['target']: parms += ['-t', build['target']] lparms += ['-t', build['target']] - if updatemode == 'auto': + if updatemode == ['auto']: update_dirs = ant_subprojects(root_dir) + ['.'] else: - update_dirs = [d.strip() for d in updatemode.split(';')] + update_dirs = updatemode for d in update_dirs: subdir = os.path.join(root_dir, d) diff --git a/fdroidserver/metadata.py b/fdroidserver/metadata.py index 12c99bf6..ef6e8e8e 100644 --- a/fdroidserver/metadata.py +++ b/fdroidserver/metadata.py @@ -452,7 +452,7 @@ def metafieldtype(name): def flagtype(name): if name in ['extlibs', 'srclibs', 'patch', 'rm', 'buildjni', - 'scanignore', 'scandelete']: + 'update', 'scanignore', 'scandelete']: return 'list' if name in ['init', 'prebuild', 'build']: return 'script' -- 2.30.2