mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 11:00:10 +01:00
Merge branch 'master' into verbose-rewrite
This commit is contained in:
commit
5b613292c3
@ -8,7 +8,7 @@ script "setup-android-sdk" do
|
|||||||
user user
|
user user
|
||||||
cwd "/tmp"
|
cwd "/tmp"
|
||||||
code "
|
code "
|
||||||
tar zxvf /vagrant/cache/android-sdk_r22.2.1-linux.tgz
|
tar zxvf /vagrant/cache/android-sdk_r22.3-linux.tgz
|
||||||
mv android-sdk-linux #{sdk_loc}
|
mv android-sdk-linux #{sdk_loc}
|
||||||
#{sdk_loc}/tools/android update sdk --no-ui -t platform-tool
|
#{sdk_loc}/tools/android update sdk --no-ui -t platform-tool
|
||||||
#{sdk_loc}/tools/android update sdk --no-ui -t tool
|
#{sdk_loc}/tools/android update sdk --no-ui -t tool
|
||||||
@ -72,7 +72,8 @@ X
|
|||||||
end
|
end
|
||||||
|
|
||||||
%w{android-3 android-4 android-7 android-8 android-10 android-11
|
%w{android-3 android-4 android-7 android-8 android-10 android-11
|
||||||
android-12 android-13 android-14 android-15 android-16 android-17 android-18
|
android-12 android-13 android-14 android-15 android-16 android-17
|
||||||
|
android-18 android-19
|
||||||
extra-android-support extra-android-m2repository}.each do |sdk|
|
extra-android-support extra-android-m2repository}.each do |sdk|
|
||||||
|
|
||||||
script "add_sdk_#{sdk}" do
|
script "add_sdk_#{sdk}" do
|
||||||
|
@ -1904,7 +1904,7 @@ def FDroidPopen(commands, cwd,
|
|||||||
sys.stderr.write(line)
|
sys.stderr.write(line)
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
result.stderr += line
|
result.stderr += line
|
||||||
time.sleep(0.5)
|
time.sleep(0.2)
|
||||||
|
|
||||||
p.communicate()
|
p.communicate()
|
||||||
result.returncode = p.returncode
|
result.returncode = p.returncode
|
||||||
|
@ -295,7 +295,7 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
|||||||
vercode_pat = re.compile(".*versionCode='([0-9]*)'.*")
|
vercode_pat = re.compile(".*versionCode='([0-9]*)'.*")
|
||||||
vername_pat = re.compile(".*versionName='([^']*)'.*")
|
vername_pat = re.compile(".*versionName='([^']*)'.*")
|
||||||
label_pat = re.compile(".*label='(.*?)'(\n| [a-z]*?=).*")
|
label_pat = re.compile(".*label='(.*?)'(\n| [a-z]*?=).*")
|
||||||
icon_pat = re.compile(".*icon='([^']*)'.*")
|
icon_pat = re.compile(".*icon='([^']+?)'.*")
|
||||||
sdkversion_pat = re.compile(".*'([0-9]*)'.*")
|
sdkversion_pat = re.compile(".*'([0-9]*)'.*")
|
||||||
string_pat = re.compile(".*'([^']*)'.*")
|
string_pat = re.compile(".*'([^']*)'.*")
|
||||||
for apkfile in glob.glob(os.path.join(repodir, '*.apk')):
|
for apkfile in glob.glob(os.path.join(repodir, '*.apk')):
|
||||||
@ -343,7 +343,9 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
elif line.startswith("application:"):
|
elif line.startswith("application:"):
|
||||||
thisinfo['name'] = re.match(label_pat, line).group(1)
|
thisinfo['name'] = re.match(label_pat, line).group(1)
|
||||||
thisinfo['iconsrc'] = re.match(icon_pat, line).group(1)
|
match = re.match(icon_pat, line)
|
||||||
|
if match:
|
||||||
|
thisinfo['iconsrc'] = match.group(1)
|
||||||
elif line.startswith("sdkVersion:"):
|
elif line.startswith("sdkVersion:"):
|
||||||
thisinfo['sdkversion'] = re.match(sdkversion_pat, line).group(1)
|
thisinfo['sdkversion'] = re.match(sdkversion_pat, line).group(1)
|
||||||
elif line.startswith("native-code:"):
|
elif line.startswith("native-code:"):
|
||||||
@ -384,10 +386,8 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
|||||||
thisinfo['sha256'] = sha.hexdigest()
|
thisinfo['sha256'] = sha.hexdigest()
|
||||||
|
|
||||||
# Get the signature (or md5 of, to be precise)...
|
# Get the signature (or md5 of, to be precise)...
|
||||||
p = subprocess.Popen(['java', 'getsig',
|
p = subprocess.Popen(['java', '-cp', os.path.join(os.path.dirname(__file__), 'getsig'),
|
||||||
os.path.join(os.getcwd(), apkfile)],
|
'getsig', os.path.join(os.getcwd(), apkfile)], stdout=subprocess.PIPE)
|
||||||
cwd=os.path.join(os.path.dirname(__file__), 'getsig'),
|
|
||||||
stdout=subprocess.PIPE)
|
|
||||||
output = p.communicate()[0]
|
output = p.communicate()[0]
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
print output
|
print output
|
||||||
@ -397,6 +397,7 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
|||||||
thisinfo['sig'] = output[7:].strip()
|
thisinfo['sig'] = output[7:].strip()
|
||||||
|
|
||||||
# Extract the icon file...
|
# Extract the icon file...
|
||||||
|
if 'iconsrc' in thisinfo:
|
||||||
apk = zipfile.ZipFile(apkfile, 'r')
|
apk = zipfile.ZipFile(apkfile, 'r')
|
||||||
thisinfo['icon'] = (thisinfo['id'] + '.' +
|
thisinfo['icon'] = (thisinfo['id'] + '.' +
|
||||||
str(thisinfo['versioncode']) + '.png')
|
str(thisinfo['versioncode']) + '.png')
|
||||||
@ -517,6 +518,7 @@ def make_index(apps, apks, repodir, archive, categories):
|
|||||||
addElement('lastupdated', time.strftime('%Y-%m-%d', app['lastupdated']), doc, apel)
|
addElement('lastupdated', time.strftime('%Y-%m-%d', app['lastupdated']), doc, apel)
|
||||||
addElement('name', app['Name'], doc, apel)
|
addElement('name', app['Name'], doc, apel)
|
||||||
addElement('summary', app['Summary'], doc, apel)
|
addElement('summary', app['Summary'], doc, apel)
|
||||||
|
if app['icon'] is not None:
|
||||||
addElement('icon', app['icon'], doc, apel)
|
addElement('icon', app['icon'], doc, apel)
|
||||||
def linkres(link):
|
def linkres(link):
|
||||||
for app in apps:
|
for app in apps:
|
||||||
@ -786,13 +788,13 @@ def main():
|
|||||||
if bestver == 0:
|
if bestver == 0:
|
||||||
if app['Name'] is None:
|
if app['Name'] is None:
|
||||||
app['Name'] = app['id']
|
app['Name'] = app['id']
|
||||||
app['icon'] = ''
|
app['icon'] = None
|
||||||
if app['Disabled'] is None:
|
if app['Disabled'] is None:
|
||||||
print "WARNING: Application " + app['id'] + " has no packages"
|
print "WARNING: Application " + app['id'] + " has no packages"
|
||||||
else:
|
else:
|
||||||
if app['Name'] is None:
|
if app['Name'] is None:
|
||||||
app['Name'] = bestapk['name']
|
app['Name'] = bestapk['name']
|
||||||
app['icon'] = bestapk['icon']
|
app['icon'] = bestapk['icon'] if 'icon' in bestapk else None
|
||||||
|
|
||||||
# Sort the app list by name, then the web site doesn't have to by default.
|
# Sort the app list by name, then the web site doesn't have to by default.
|
||||||
# (we had to wait until we'd scanned the apks to do this, because mostly the
|
# (we had to wait until we'd scanned the apks to do this, because mostly the
|
||||||
@ -852,6 +854,7 @@ def main():
|
|||||||
for app in apps:
|
for app in apps:
|
||||||
if app['id'] == appid:
|
if app['id'] == appid:
|
||||||
data += app['Name'] + "\t"
|
data += app['Name'] + "\t"
|
||||||
|
if app['icon'] is not None:
|
||||||
data += app['icon'] + "\t"
|
data += app['icon'] + "\t"
|
||||||
data += app['License'] + "\n"
|
data += app['License'] + "\n"
|
||||||
break
|
break
|
||||||
|
@ -61,9 +61,9 @@ cachedir = os.path.join('buildserver', 'cache')
|
|||||||
if not os.path.exists(cachedir):
|
if not os.path.exists(cachedir):
|
||||||
os.mkdir(cachedir)
|
os.mkdir(cachedir)
|
||||||
cachefiles = [
|
cachefiles = [
|
||||||
('android-sdk_r22.2.1-linux.tgz',
|
('android-sdk_r22.3-linux.tgz',
|
||||||
'http://dl.google.com/android/android-sdk_r22.2.1-linux.tgz',
|
'http://dl.google.com/android/android-sdk_r22.3-linux.tgz',
|
||||||
'17ea4610008985eb1454b3b25ad00c59300cee3141f7ea3deec98f45d862faa5'),
|
'4077575c98075480e0156c10e48a1521e31c7952768271a206870e6813057f4f'),
|
||||||
('gradle-1.8-bin.zip',
|
('gradle-1.8-bin.zip',
|
||||||
'http://services.gradle.org/distributions/gradle-1.8-bin.zip',
|
'http://services.gradle.org/distributions/gradle-1.8-bin.zip',
|
||||||
'a342bbfa15fd18e2482287da4959588f45a41b60910970a16e6d97959aea5703')]
|
'a342bbfa15fd18e2482287da4959588f45a41b60910970a16e6d97959aea5703')]
|
||||||
|
Loading…
Reference in New Issue
Block a user