1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-17 10:40:12 +02:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Tovok7 2012-01-14 15:26:57 +01:00
commit 475517c3a0
22 changed files with 105 additions and 231 deletions

View File

@ -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 <http://www.gnu.org/licenses/>.
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)

View File

@ -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."

View File

@ -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()

View File

@ -1 +0,0 @@
*.class

View File

@ -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/

Binary file not shown.

View File

@ -1,2 +0,0 @@
#!/bin/sh
javac -classpath androidmarketapi-0.6.jar test.java

Binary file not shown.

View File

@ -1,2 +0,0 @@
#!/bin/sh
java -classpath ".:androidmarketapi-0.6.jar" test $1 $2 $3

View File

@ -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<String> apps = new ArrayList<String>();
String[] metafiles = dir.list();
for (int i=0; i<metafiles.length; i++) {
String metafile = metafiles[i];
if(metafile.endsWith(".txt")) {
String pkg = metafile.substring(0,
metafile.length() - 4);
apps.add(pkg);
}
}
System.out.println("Apps to check: " + apps.size());
MarketSession session = new MarketSession();
session.getContext().setAndroidId(deviceid);
session.getContext().setDeviceAndSdkVersion("sapphire:7");
System.out.println("Login...");
session.login(login,password);
System.out.println("Login done");
MarketSession.Callback callback = new MarketSession.Callback() {
@Override
public void onResult(ResponseContext context, Object oresp) {
try {
AppsResponse response = (AppsResponse)oresp;
if(response == null) {
System.out.println("No response");
}
if(response.getAppCount() != 1) {
System.out.println("Not in market, or multiple results");
} else {
App app = response.getAppList().get(0);
String filespec = "../metadata/" + app.getPackageName() + ".txt";
FileInputStream fi = new FileInputStream(filespec);
InputStreamReader isr = new InputStreamReader(fi, "UTF-8");
BufferedReader br = new BufferedReader(isr);
StringBuilder output = new StringBuilder();
boolean changed = false;
boolean vercodefound = false;
boolean versionfound = false;
String line, newline;
while (br.ready()) {
line = br.readLine();
if (line.startsWith("Market Version:")) {
versionfound = true;
newline="Market Version:" + app.getVersion();
if (!newline.equals(line)) {
changed = true;
line = newline;
}
} else if (line.startsWith("Market Version Code:")) {
vercodefound = true;
newline="Market Version Code:" + app.getVersionCode();
if (!newline.equals(line)) {
changed = true;
line = newline;
}
}
output.append(line + "\n");
}
br.close();
isr.close();
fi.close();
if(!versionfound) {
changed = true;
output.append("Market Version:" + app.getVersion() + "\n");
}
if(!vercodefound) {
changed = true;
output.append("Market Version Code:" + app.getVersionCode() + "\n");
}
if (changed) {
System.out.println("..updating");
FileOutputStream fo = new FileOutputStream(filespec);
OutputStreamWriter osr = new OutputStreamWriter(fo, "UTF-8");
BufferedWriter wi = new BufferedWriter(osr);
wi.write(output.toString());
wi.close();
osr.close();
fo.close();
}
}
} catch (Exception ex) {
System.out.println("...Exception");
ex.printStackTrace();
}
}
};
for(String pkg : apps) {
System.out.println("Checking: " + pkg);
AppsRequest appsRequest = AppsRequest.newBuilder()
.setQuery("pname:" + pkg)
.setStartIndex(0).setEntriesCount(10)
.setWithExtendedInfo(true)
.build();
session.append(appsRequest, callback);
session.flush();
// Pause to avoid rate limit...
Thread.sleep(5000);
}
} catch(Exception ex) {
ex.printStackTrace();
}
}
}

View File

@ -0,0 +1,17 @@
Category:Office
License:GPLv3
Web Site:http://aarddict.org/android/
Source Code:https://github.com/aarddict/android
Issue Tracker:https://github.com/aarddict/android/issues
Donate:http://aarddict.org/android/
Summary:Offline dictionary
Description:
An offline dictionary and wikipedia reader.
.
Repo Type:git
Repo:git://github.com/aarddict/android.git
Build Version:1.3.1,10,1.3.1,prebuild=mv lib libs

View File

@ -15,6 +15,7 @@ Repo:https://github.com/k9mail/k-9.git
#Note - k9 is currently developer's binary only
#Build Version:3.906,14006,3.906,oldsdkloc=yes,patch=target9to10.patch,target=android-10
Market Version:4.002
Market Version Code:14020
Update Check Mode:Market
Market Version:4.003
Market Version Code:14021

View File

@ -14,3 +14,7 @@ Repo:https://git.gitorious.org/chesswalk/chesswalk.git
Build Version:1.5,7,4007173d,buildjni=yes
Update Check Mode:Market
Market Version:1.4
Market Version Code:6

View File

@ -21,3 +21,7 @@ Repo:http://androgames-sample.googlecode.com/svn/Market-apps/Level/trunk/
Build Version:1.8.0,27,75
Update Check Mode:Market
Market Version:1.8.0
Market Version Code:27

View File

@ -23,6 +23,7 @@ Repo:http://sharemyposition.googlecode.com/svn/trunk/
Build Version:1.0.11,16,64,subdir=ShareMyPosition-android
Build Version:1.1.0-beta3,20,70,subdir=ShareMyPosition-android,target=android-11,prebuild=mv lib libs
Market Version:1.1.0-beta3
Market Version Code:20
Update Check Mode:Market
Market Version:1.1.0-beta4
Market Version Code:21

View File

@ -14,6 +14,7 @@ Repo:https://github.com/AnderWeb/android_packages_apps_Launcher.git
Build Version:1.3.6 Standalone,34,b28e9e417c81857cfd2e0265c3c6d409d6c8d0f1
Update Check Mode:None
Market Version:1.3.6 Standalone
Market Version Code:34

View File

@ -52,7 +52,9 @@ Build Version:3.0.54-9,279,cr3.0.54-9,subdir=android,rm=android/build.properties
Build Version:3.0.54-33,303,cr3.0.54-33,subdir=android,rm=android/build.properties,buildjni=yes
Build Version:3.0.54-38,308,cr3.0.54-38,subdir=android,rm=android/build.properties,buildjni=yes
Build Version:3.0.54-47,447,cr3.0.54-47,subdir=android,rm=android/build.properties,buildjni=yes
Build Version:3.0.55-5,505,cr3.0.55-5,subdir=android,rm=android/build.properties,buildjni=yes
Market Version:3.0.54-47
Market Version Code:447
Update Check Mode:Market
Market Version:3.0.55-5
Market Version Code:505

View File

@ -17,9 +17,9 @@ Repo:git://xwords.git.sourceforge.net/gitroot/xwords/xwords
#Build Version:4.4 beta 18,11,android_beta_18,subdir=xwords4/android/XWords4,fixtrans=yes
#Build Version:4.4 beta 23,16,!Translation files are not valid
#Build Version:4.4 beta 26,19,!Missing resources? android_beta_26,subdir=xwords4/android/XWords4
Build Version:4.4 beta 33,26,android_beta_33,subdir=xwords4/android/XWords4
Build Version:4.4 beta 38,30,android_beta_38,subdir=xwords4/android/XWords4
Build Version:4.4 beta 39,31,android_beta_39,subdir=xwords4/android/XWords4,target=android-8,prebuild=cd .. && ./scripts/genvers.sh >ant_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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)