From: Daniel Martí Date: Sun, 3 Nov 2013 13:00:09 +0000 (+0100) Subject: Merge branch 'master' into verbose-rewrite X-Git-Tag: 0.1~237 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=65e708908e02a09a4cfb506bc2c240d10842caa4;p=fdroidserver.git Merge branch 'master' into verbose-rewrite Conflicts: fdroidserver/common.py --- 65e708908e02a09a4cfb506bc2c240d10842caa4 diff --cc fdroidserver/common.py index 174878d1,9364d70f..5845ecc5 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@@ -1387,7 -1372,22 +1388,22 @@@ def prepare_source(vcs, app, build, bui if 'target' in build: parms.append('-t') parms.append(build['target']) - update_dirs = [d.strip() for d in updatemode.split(';')] + update_dirs = None + if updatemode == 'auto': + update_dirs = ['.'] + with open(os.path.join(root_dir, 'project.properties')) as f: + for line in f.readlines(): + if not line.startswith('android.library.reference.'): + continue + path = line.split('=')[1].strip() + relpath = os.path.join(root_dir, path) + if not os.path.isdir(relpath): + continue - if verbose: ++ if options.verbose: + print "Found subproject %s..." % path + update_dirs.append(path) + else: + update_dirs = [d.strip() for d in updatemode.split(';')] # Force build.xml update if necessary... if updatemode == 'force' or 'target' in build: if updatemode == 'force': @@@ -1409,13 -1408,16 +1424,16 @@@ if os.path.exists(badpath): print "Removing '%s'" % badpath shutil.rmtree(badpath) + dparms = parms + ['-p', d] - if verbose: + if options.verbose: - print "Update of '%s': exec '%s' in '%s'"%\ - (d," ".join(parms),cwd) - p = FDroidPopen(parms, cwd=cwd) + if d == '.': + print "Updating main project..." + else: + print "Updating subproject %s..." % d - p = FDroidPopen(dparms, cwd=root_dir, verbose=verbose) ++ p = FDroidPopen(dparms, cwd=root_dir) # check to see whether an error was returned without a proper exit code (this is the case for the 'no target set or target invalid' error) if p.returncode != 0 or (p.stderr != "" and p.stderr.startswith("Error: ")): - raise BuildException("Failed to update project at %s" % cwd, + raise BuildException("Failed to update project at %s" % d, p.stdout, p.stderr) # If the app has ant set up to sign the release, we need to switch