From 1a4b18e2e8ec8919156ccfcdf705b571e3fa7133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 29 Oct 2013 09:55:15 +0100 Subject: [PATCH 1/5] Retrieve app and version name from the same tag in UCM:Tags --- fdroidserver/checkupdates.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/fdroidserver/checkupdates.py b/fdroidserver/checkupdates.py index 1ffec342..fa014958 100644 --- a/fdroidserver/checkupdates.py +++ b/fdroidserver/checkupdates.py @@ -106,6 +106,7 @@ def check_tags(app, sdk_path): if 'gradle' in app['builds'][-1]: flavour = app['builds'][-1]['gradle'] + htag = None hver = None hcode = "0" @@ -118,22 +119,23 @@ def check_tags(app, sdk_path): if package and package == app['id'] and version and vercode: print "Manifest exists. Found version %s" % version if int(vercode) > int(hcode): + htag = tag hcode = str(int(vercode)) hver = version if hver: - return (hver, hcode) - return (None, "Couldn't find any version information") + return (hver, hcode, htag) + return (None, "Couldn't find any version information", None) except BuildException as be: msg = "Could not scan app %s due to BuildException: %s" % (app['id'], be) - return (None, msg) + return (None, msg, None) except VCSException as vcse: msg = "VCS error while scanning app %s: %s" % (app['id'], vcse) - return (None, msg) + return (None, msg, None) except Exception: msg = "Could not scan app %s due to unknown error: %s" % (app['id'], traceback.format_exc()) - return (None, msg) + return (None, msg, None) # Check for a new version by looking at the AndroidManifest.xml at the HEAD # of the source repo. Whether this can be used reliably or not depends on @@ -329,9 +331,10 @@ def main(): writeit = False logmsg = None + tag = None mode = app['Update Check Mode'] if mode == 'Tags': - (version, vercode) = check_tags(app, sdk_path) + (version, vercode, tag) = check_tags(app, sdk_path) elif mode == 'RepoManifest': (version, vercode) = check_repomanifest(app, sdk_path) elif mode.startswith('RepoManifest/'): @@ -372,7 +375,7 @@ def main(): app_dir = os.path.join('build/', app['id']) vcs = common.getvcs(app["Repo Type"], app["Repo"], app_dir, sdk_path) - vcs.gotorevision(None) + vcs.gotorevision(tag) flavour = None if len(app['builds']) > 0: From 5455576b6b210b6331730f80328039b8652735a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 29 Oct 2013 12:03:37 +0100 Subject: [PATCH 2/5] Some fixes to the scanner algorithm --- fdroidserver/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 9db778a7..a05f1811 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1711,7 +1711,7 @@ def scan_source(build_dir, root_dir, thisbuild): for suspect in usual_suspects: if suspect in curfile.lower(): - problems.append('Found probable non-free blob ' + fp) + problems.append('Found usual supect in filename ' + fp) mime = ms.file(fp) if mime == 'application/x-sharedlib': @@ -1720,7 +1720,7 @@ def scan_source(build_dir, root_dir, thisbuild): problems.append('Found static library at %s' % fd) elif mime == 'application/x-executable': problems.append('Found binary executable at %s' % fd) - elif fp.endswith('.apk'): + elif mime == 'application/jar' and fp.endswith('.apk'): problems.append('Found apk archive at %s' % fd) elif curfile.endswith('.java'): From fd50903c502a93ad8e35a8a748790d08baa11b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 29 Oct 2013 13:36:06 +0100 Subject: [PATCH 3/5] Don't include '!' in disabled= when converting to new syntax --- fdroidserver/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index a05f1811..53021e9e 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -475,7 +475,7 @@ def parse_metadata(metafile, verbose=False): if parts[2].startswith('!'): # For backwards compatibility, handle old-style disabling, # including attempting to extract the commit from the message - thisbuild['disable'] = parts[2] + thisbuild['disable'] = parts[2][1:] commit = 'unknown - see disabled' index = parts[2].rfind('at ') if index != -1: From 237f7a2a0e5cea61142ed3436940a01884573cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 29 Oct 2013 13:45:41 +0100 Subject: [PATCH 4/5] have commitupdates show the diff (commit -v) --- tools/commitupdates | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/commitupdates b/tools/commitupdates index d0f97e1c..bd448003 100755 --- a/tools/commitupdates +++ b/tools/commitupdates @@ -36,7 +36,7 @@ while read line; do [ -d metadata/$id ] && extra=metadata/$id [ -n "$name" ] && id="$name ($id)" - commands+=("git commit -m 'Update $id to $version ($vercode)' -e -- $file $extra") + commands+=("git commit -m 'Update $id to $version ($vercode)' -e -v -- $file $extra") fi done < <(git status --porcelain) From bdb168990b7f497c0e931feeb4b45d45126ecc12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 29 Oct 2013 14:19:27 +0100 Subject: [PATCH 5/5] Add package realpath to buildserver --- buildserver/cookbooks/fdroidbuild-general/recipes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb b/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb index 6a8f78f8..c5701474 100644 --- a/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb +++ b/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb @@ -1,7 +1,7 @@ user = node[:settings][:user] -%w{ant ant-contrib autoconf autopoint bison cmake expect libtool libsaxonb-java libssl1.0.0 libssl-dev maven openjdk-7-jdk javacc python python-magic git-core mercurial subversion bzr git-svn make perlmagick pkg-config zip ruby rubygems librmagick-ruby yasm imagemagick gettext}.each do |pkg| +%w{ant ant-contrib autoconf autopoint bison cmake expect libtool libsaxonb-java libssl1.0.0 libssl-dev maven openjdk-7-jdk javacc python python-magic git-core mercurial subversion bzr git-svn make perlmagick pkg-config zip ruby rubygems librmagick-ruby yasm imagemagick gettext realpath}.each do |pkg| package pkg do action :install end