1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

Merge branch 'master' of gitorious.org:f-droid/fdroidserver

This commit is contained in:
Ciaran Gultnieks 2013-06-17 21:50:00 +01:00
commit a87129f902

View File

@ -294,7 +294,7 @@ def scan_apks(apps, apkcache, repodir, knownapks):
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:"):
thisinfo['nativecode'] = re.match(string_pat, line).group(1) thisinfo['nativecode'] = line[14:-1].split("' '")
elif line.startswith("uses-permission:"): elif line.startswith("uses-permission:"):
perm = re.match(string_pat, line).group(1) perm = re.match(string_pat, line).group(1)
if perm.startswith("android.permission."): if perm.startswith("android.permission."):
@ -531,19 +531,12 @@ def make_index(apps, apks, repodir, archive, categories):
if 'added' in apk: if 'added' in apk:
addElement('added', time.strftime('%Y-%m-%d', apk['added']), doc, apkel) addElement('added', time.strftime('%Y-%m-%d', apk['added']), doc, apkel)
perms = "" perms = ""
for p in apk['permissions']: if len(apk['permissions']) > 0:
if len(perms) > 0: addElement('permissions', ','.join(apk['permissions']), doc, apkel)
perms += "," if len(apk['nativecode']) > 0:
perms += p addElement('nativecode', ','.join(apk['nativecode']), doc, apkel)
if len(perms) > 0: if len(apk['features']) > 0:
addElement('permissions', perms, doc, apkel) addElement('features', ','.join(apk['features']), doc, apkel)
features = ""
for f in apk['features']:
if len(features) > 0:
features += ","
features += f
if len(features) > 0:
addElement('features', features, doc, apkel)
of = open(os.path.join(repodir, 'index.xml'), 'wb') of = open(os.path.join(repodir, 'index.xml'), 'wb')
if options.pretty: if options.pretty: