mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
Put source tarball names into the index where available
This commit is contained in:
parent
1e70d735fd
commit
85cbd3db9c
1 changed files with 5 additions and 0 deletions
|
@ -83,11 +83,14 @@ apks = []
|
|||
for apkfile in glob.glob(os.path.join('repo','*.apk')):
|
||||
|
||||
apkfilename = apkfile[5:]
|
||||
srcfilename = apkfilename[:-4] + "_src.tar.gz"
|
||||
|
||||
if not options.quiet:
|
||||
print "Processing " + apkfilename
|
||||
thisinfo = {}
|
||||
thisinfo['apkname'] = apkfilename
|
||||
if os.path.exists(os.path.join('repo', srcfilename)):
|
||||
thisinfo['srcname'] = srcfilename
|
||||
thisinfo['size'] = os.path.getsize(apkfile)
|
||||
thisinfo['permissions'] = []
|
||||
thisinfo['features'] = []
|
||||
|
@ -291,6 +294,8 @@ for app in apps:
|
|||
addElement('version', apk['version'], doc, apkel)
|
||||
addElement('versioncode', str(apk['versioncode']), doc, apkel)
|
||||
addElement('apkname', apk['apkname'], doc, apkel)
|
||||
if apk.has_key('srcname'):
|
||||
addElement('srcname', apk['srcname'], doc, apkel)
|
||||
addElement('hash', apk['md5'], doc, apkel)
|
||||
addElement('sig', apk['sig'], doc, apkel)
|
||||
addElement('size', str(apk['size']), doc, apkel)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue