fix alien repository checksums

This commit is contained in:
Dimitris Zlatanidis 2015-02-24 21:59:11 +02:00
parent a49fae0225
commit b3b2058c06

View file

@ -31,7 +31,7 @@ def pkg_checksum(binary, repo):
'''
Return checksum from CHECKSUMS.md5 file by repository
'''
md5 = "None"
md5, end = "None", "/"
if repo == "slack_patches" and _m.slack_rel == "stable":
CHECKSUMS_md5 = URL(mirrors("CHECKSUMS.md5", "patches/")).reading()
elif repo == "slack_patches" and _m.slack_rel == "current":
@ -43,7 +43,9 @@ def pkg_checksum(binary, repo):
f = open(lib, "r")
CHECKSUMS_md5 = f.read()
f.close()
if repo == "alien":
end = ""
for line in CHECKSUMS_md5.splitlines():
if line.split('/')[-1] == binary:
if line.endswith("%s%s" % (end, binary)):
md5 = line.split()[0]
return md5