diff --git a/slpkg/grep_md5.py b/slpkg/grep_md5.py index 5f90e2a0..6a3dd651 100644 --- a/slpkg/grep_md5.py +++ b/slpkg/grep_md5.py @@ -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