diff --git a/checkmarket.py b/checkmarket.py deleted file mode 100755 index f8e5c80c..00000000 --- a/checkmarket.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# checkmarket.py - part of the FDroid server tools -# Copyright (C) 2011, Ciaran Gultnieks, ciaran@ciarang.com -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - -import subprocess - -#Read configuration... -repo_name = None -repo_description = None -repo_icon = None -repo_url = None -execfile('config.py') - -subprocess.call('./run.sh ' + market_user + ' ' + market_password - + ' ' + market_deviceid, - cwd='marketcheck', shell=True) - diff --git a/checkmarket2.py b/checkupdates.py similarity index 75% rename from checkmarket2.py rename to checkupdates.py index 0d631061..caa27c82 100755 --- a/checkmarket2.py +++ b/checkupdates.py @@ -31,20 +31,11 @@ import common execfile('config.py') -# Parse command line... -parser = OptionParser() -parser.add_option("-v", "--verbose", action="store_true", default=False, - help="Spew out even more information than normal") -(options, args) = parser.parse_args() - -# Get all apps... -apps = common.read_metadata(options.verbose) - -html_parser = HTMLParser.HTMLParser() - -for app in apps: - - print "Processing " + app['id'] +# Check for a new version by looking at the Google market. +# Returns (None, "a message") if this didn't work, or (version, vercode) for +# the details of the current version. +def check_market(app): + time.sleep(5) url = 'http://market.android.com/details?id=' + app['id'] page = urllib.urlopen(url).read() @@ -60,9 +51,41 @@ for app in apps: vercode = m.group(1) if not vercode: - print "...couldn't find version code" - elif not version: - print "...couldn't find version" + return (None, "Couldn't find version code") + if not version: + return (None, "Couldn't find version") + return (version, vercode) + + + + +# Parse command line... +parser = OptionParser() +parser.add_option("-v", "--verbose", action="store_true", default=False, + help="Spew out even more information than normal") +(options, args) = parser.parse_args() + +# Get all apps... +apps = common.read_metadata(options.verbose) + +html_parser = HTMLParser.HTMLParser() + +for app in apps: + + print "Processing " + app['id'] + '...' + + mode = app['Update Check Mode'] + if mode == 'Market': + (version, vercode) = check_market(app) + elif mode == 'None': + version = None + vercode = 'Checking disabled' + else: + version = None + vercode = 'Invalid update check method' + + if not version: + print "..." + vercode elif vercode == app['Market Version Code'] and version == app['Market Version']: print "...up to date" else: @@ -72,7 +95,5 @@ for app in apps: metafile = os.path.join('metadata', app['id'] + '.txt') common.write_metadata(metafile, app) - time.sleep(5) - print "Finished." diff --git a/common.py b/common.py index 5aea8db2..358ba824 100644 --- a/common.py +++ b/common.py @@ -325,6 +325,7 @@ def parse_metadata(metafile, **kw): thisinfo['Donate'] = None thisinfo['Disabled'] = None thisinfo['AntiFeatures'] = None + thisinfo['Update Check Mode'] = 'Market' thisinfo['Market Version'] = '' thisinfo['Market Version Code'] = '0' thisinfo['Repo Type'] = '' @@ -472,10 +473,11 @@ def write_metadata(dest, app): mf.write('\\\n'.join(build['origlines']) + '\n') if len(app['builds']) > 0: mf.write('\n') + writefield('Update Check Mode') if len(app['Market Version']) > 0: writefield('Market Version') writefield('Market Version Code') - mf.write('\n') + mf.write('\n') writecomments(None) mf.close() @@ -553,8 +555,6 @@ def prepare_source(vcs, app, build, build_dir, sdk_path, ndk_path, javacc_path, # Optionally, the actual app source can be in a subdirectory... if build.has_key('subdir'): root_dir = os.path.join(build_dir, build['subdir']) - if not os.path.exists(root_dir): - raise BuildException('Missing subdir ' + root_dir) else: root_dir = build_dir @@ -562,6 +562,11 @@ def prepare_source(vcs, app, build, build_dir, sdk_path, ndk_path, javacc_path, print "Resetting repository to " + build['commit'] vcs.reset(build['commit']) + # Check that a subdir (if we're using one) exists. This has to happen + # after the checkout, since it might not exist elsewhere... + if not os.path.exists(root_dir): + raise BuildException('Missing subdir ' + root_dir) + # Initialise submodules if requred... if build.get('submodules', 'no') == 'yes': vcs.initsubmodules() diff --git a/marketcheck/.gitignore b/marketcheck/.gitignore deleted file mode 100644 index 6b468b62..00000000 --- a/marketcheck/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.class diff --git a/marketcheck/README.txt b/marketcheck/README.txt deleted file mode 100644 index 009014c3..00000000 --- a/marketcheck/README.txt +++ /dev/null @@ -1,11 +0,0 @@ - -=Libraries= - -androidmarketapi-x.x.jar is Apache 2.0 licensed - source from: - - http://code.google.com/p/android-market-api/ - -https://code.google.com/p/protobuf/ is New BSD licensed - source from: - - https://code.google.com/p/protobuf/ - diff --git a/marketcheck/androidmarketapi-0.6.jar b/marketcheck/androidmarketapi-0.6.jar deleted file mode 100644 index b7f54192..00000000 Binary files a/marketcheck/androidmarketapi-0.6.jar and /dev/null differ diff --git a/marketcheck/make.sh b/marketcheck/make.sh deleted file mode 100755 index aec4fb1f..00000000 --- a/marketcheck/make.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -javac -classpath androidmarketapi-0.6.jar test.java diff --git a/marketcheck/protobuf-java-2.2.0.jar b/marketcheck/protobuf-java-2.2.0.jar deleted file mode 100644 index 7a0ccde1..00000000 Binary files a/marketcheck/protobuf-java-2.2.0.jar and /dev/null differ diff --git a/marketcheck/run.sh b/marketcheck/run.sh deleted file mode 100755 index 59515a84..00000000 --- a/marketcheck/run.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -java -classpath ".:androidmarketapi-0.6.jar" test $1 $2 $3 diff --git a/marketcheck/test.java b/marketcheck/test.java deleted file mode 100644 index 28431806..00000000 --- a/marketcheck/test.java +++ /dev/null @@ -1,147 +0,0 @@ - -import java.io.*; -import java.util.*; - -import com.gc.android.market.api.MarketSession.Callback; -import com.gc.android.market.api.MarketSession; -import com.gc.android.market.api.model.Market.App; -import com.gc.android.market.api.model.Market.AppsResponse; -import com.gc.android.market.api.model.Market.AppsRequest; -import com.gc.android.market.api.model.Market.CommentsRequest; -import com.gc.android.market.api.model.Market.GetImageRequest; -import com.gc.android.market.api.model.Market.GetImageResponse; -import com.gc.android.market.api.model.Market.ResponseContext; -import com.gc.android.market.api.model.Market.GetImageRequest.AppImageUsage; - -class test { - - /** - * @param args - */ - public static void main(String[] args) { - try { - if(args.length < 3) { - System.out.println("Parameters :\n" + - "email password deviceid"); - return; - } - String login = args[0]; - String password = args[1]; - String deviceid = args[2]; - - // Get a list of apps we want to check - i.e. those that - // we have metadata files for... - File dir = new File("../metadata"); - List apps = new ArrayList(); - String[] metafiles = dir.list(); - for (int i=0; iant_out.txt +Build Version:4.4 beta 33,26,android_beta_33,subdir=xwords4/android/XWords4,buildjni=yes +Build Version:4.4 beta 38,30,android_beta_38,subdir=xwords4/android/XWords4,buildjni=yes +Build Version:4.4 beta 39,31,android_beta_39,subdir=xwords4/android/XWords4,buildjni=yes,target=android-8,prebuild=cd .. && ./scripts/genvers.sh >ant_out.txt Market Version:4.4 Market Version Code:33 diff --git a/metadata/org.fdroid.fdroid.txt b/metadata/org.fdroid.fdroid.txt index 299b2d9a..9c68ac5f 100644 --- a/metadata/org.fdroid.fdroid.txt +++ b/metadata/org.fdroid.fdroid.txt @@ -27,3 +27,5 @@ Build Version:0.23,14,aa58a8aad1a1c3832eafb9f1bdd6db8292d2c172 Build Version:0.24,15,9b5fe2976443255b95027abd412f1c1e7f3d27b2 Build Version:0.25,16,43977cc493e47a4dc841c4192ae8a40fb14b639b +Update Check Mode:None + diff --git a/metadata/org.torproject.android.txt b/metadata/org.torproject.android.txt index f65c7920..79082fc4 100644 --- a/metadata/org.torproject.android.txt +++ b/metadata/org.torproject.android.txt @@ -10,6 +10,7 @@ A Tor client allowing private internet access via a local SOCKS or HTTP proxy. O device, the proxying can be completely transparent. . -Market Version:0.2.3.7-alpha-orbot-1.0.6 -Market Version Code:21 +Update Check Mode:Market +Market Version:0.2.3.10-alpha-orbot-1.0.7-RC1 +Market Version Code:23 diff --git a/metadata/tkj.android.homecontrol.mythmote.txt b/metadata/tkj.android.homecontrol.mythmote.txt index 7ee80013..92a64389 100644 --- a/metadata/tkj.android.homecontrol.mythmote.txt +++ b/metadata/tkj.android.homecontrol.mythmote.txt @@ -12,7 +12,9 @@ A network remote control for MythTV. Repo Type:svn Repo:http://mythmote.googlecode.com/svn/trunk/ -Market Version:1.5.1 -Market Version Code:10 - #Build Version:1.4.0,8,126,rm=src/tkj/android/homecontrol/mythmote/R.java + +Update Check Mode:Market +Market Version:1.6.0 +Market Version Code:11 + diff --git a/scanner.py b/scanner.py index f4d63e35..2f30b439 100755 --- a/scanner.py +++ b/scanner.py @@ -102,6 +102,14 @@ for app in apps: msg += ' in ' + app['id'] + ' ' + thisbuild['version'] problems.append(msg) + # Presence of a jni directory without buildjni=yes might + # indicate a problem... + if (os.path.exists(os.path.join(root_dir, 'jni')) and + thisbuild.get('buildjni', 'no') != 'yes'): + msg = 'Found jni directory, but buildjni is not enabled' + msg += ' in ' + app['id'] + ' ' + thisbuild['version'] + problems.append(msg) + except BuildException as be: msg = "Could not scan app %s due to BuildException: %s" % (app['id'], be) problems.append(msg)