diff --git a/fdroidserver/build.py b/fdroidserver/build.py index 79b40155..9de4d322 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -611,8 +611,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d commands = [config['gradle']] if 'preassemble' in thisbuild: - for task in thisbuild['preassemble'].split(): - commands.append(task) + commands += thisbuild['preassemble'].split() commands += ['assemble'+''.join(flavours)+'Release'] p = FDroidPopen(commands, cwd=gradle_dir) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 2cc1bf1f..4d1f50eb 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -454,9 +454,21 @@ class vcs_gitsvn(vcs): else: # No tag found, normal svn rev translation # Translate svn rev into git format - p = subprocess.Popen(['git', 'svn', 'find-rev', 'r' + rev], + rev_split = rev.split('/') + if len(rev_split) > 1: + treeish = rev_split[0] + svn_rev = rev_split[1] + + else: + # if no branch is specified, then assume trunk (ie. 'master' + # branch): + treeish = 'master' + svn_rev = rev + + p = subprocess.Popen(['git', 'svn', 'find-rev', 'r' + svn_rev, treeish], cwd=self.local, stdout=subprocess.PIPE) git_rev = p.communicate()[0].rstrip() + if p.returncode != 0 or not git_rev: # Try a plain git checkout as a last resort p = subprocess.Popen(['git', 'checkout', rev], cwd=self.local, @@ -475,6 +487,7 @@ class vcs_gitsvn(vcs): print out else: raise VCSException("Git svn checkout failed") + # Get rid of any uncontrolled files left behind... if subprocess.call(['git', 'clean', '-dffx'], cwd=self.local) != 0: raise VCSException("Git clean failed") diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index 501532fd..1142818a 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -80,6 +80,9 @@ def main(): appid = app['id'] lastcommit = '' + if app['Disabled']: + continue + for build in app['builds']: if 'commit' in build and 'disable' not in build: lastcommit = build['commit'] diff --git a/fdroidserver/update.py b/fdroidserver/update.py index b71d9782..bf3eed32 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -532,7 +532,12 @@ def scan_apks(apps, apkcache, repodir, knownapks): get_icon_dir(repodir, last_density), iconfilename) iconpath = os.path.join( get_icon_dir(repodir, density), iconfilename) - im = Image.open(last_iconpath) + try: + im = Image.open(last_iconpath) + except: + print "WARNING: Invalid image file at %s" % last_iconpath + continue + size = dpi_to_px(density) im.thumbnail((size, size), Image.ANTIALIAS)