mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-09 02:41:06 +03:00
Remove md5 sums from the index (fixes: #336)
This commit is contained in:
parent
622b2dd739
commit
377c9a9700
1 changed files with 2 additions and 5 deletions
|
@ -342,17 +342,14 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
||||||
if common.isApkDebuggable(apkfile):
|
if common.isApkDebuggable(apkfile):
|
||||||
print "WARNING: {0} is debuggable... {1}".format(apkfile, line)
|
print "WARNING: {0} is debuggable... {1}".format(apkfile, line)
|
||||||
|
|
||||||
# Calculate the md5 and sha256...
|
# Calculate the sha256...
|
||||||
m = hashlib.md5()
|
|
||||||
sha = hashlib.sha256()
|
sha = hashlib.sha256()
|
||||||
with open(apkfile, 'rb') as f:
|
with open(apkfile, 'rb') as f:
|
||||||
while True:
|
while True:
|
||||||
t = f.read(1024)
|
t = f.read(1024)
|
||||||
if len(t) == 0:
|
if len(t) == 0:
|
||||||
break
|
break
|
||||||
m.update(t)
|
|
||||||
sha.update(t)
|
sha.update(t)
|
||||||
thisinfo['md5'] = m.hexdigest()
|
|
||||||
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)...
|
||||||
|
@ -542,7 +539,7 @@ def make_index(apps, apks, repodir, archive, categories):
|
||||||
addElement('apkname', apk['apkname'], doc, apkel)
|
addElement('apkname', apk['apkname'], doc, apkel)
|
||||||
if 'srcname' in apk:
|
if 'srcname' in apk:
|
||||||
addElement('srcname', apk['srcname'], doc, apkel)
|
addElement('srcname', apk['srcname'], doc, apkel)
|
||||||
for hash_type in ('sha256', 'md5'):
|
for hash_type in ('sha256'):
|
||||||
if not hash_type in apk:
|
if not hash_type in apk:
|
||||||
continue
|
continue
|
||||||
hashel = doc.createElement("hash")
|
hashel = doc.createElement("hash")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue