mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-16 03:41:11 +01:00
Fixed checksum #23
This commit is contained in:
parent
bd64c798ff
commit
749bfe0f21
2 changed files with 3 additions and 14 deletions
|
@ -42,8 +42,6 @@ from slpkg.get_version import get_installed_version
|
||||||
from slpkg.pkg.find import find_package
|
from slpkg.pkg.find import find_package
|
||||||
from slpkg.pkg.manager import PackageManager
|
from slpkg.pkg.manager import PackageManager
|
||||||
|
|
||||||
from slpkg.slack.slack_version import slack_ver
|
|
||||||
|
|
||||||
from greps import repo_data
|
from greps import repo_data
|
||||||
from repo_init import RepoInit
|
from repo_init import RepoInit
|
||||||
from dependency import Dependencies
|
from dependency import Dependencies
|
||||||
|
@ -181,14 +179,7 @@ class BinaryInstall(object):
|
||||||
"""
|
"""
|
||||||
Checksums before install
|
Checksums before install
|
||||||
"""
|
"""
|
||||||
if self.repo == "alien" and self.version == "stable":
|
check_md5(pkg_checksum(install, self.repo), self.tmp_path + install)
|
||||||
check_md5(pkg_checksum("/" + slack_ver() + "/" + install,
|
|
||||||
self.repo), self.tmp_path + install)
|
|
||||||
elif self.repo == "alien" and self.version == "current":
|
|
||||||
check_md5(pkg_checksum("/" + self.version + "/" + install,
|
|
||||||
self.repo), self.tmp_path + install)
|
|
||||||
else:
|
|
||||||
check_md5(pkg_checksum(install, self.repo), self.tmp_path + install)
|
|
||||||
|
|
||||||
def resolving_deps(self):
|
def resolving_deps(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -32,7 +32,7 @@ def pkg_checksum(binary, repo):
|
||||||
"""
|
"""
|
||||||
Return checksum from CHECKSUMS.md5 file by repository
|
Return checksum from CHECKSUMS.md5 file by repository
|
||||||
"""
|
"""
|
||||||
md5, end = "None", "/"
|
md5 = "None"
|
||||||
if repo == "slack_patches" and _meta_.slack_rel == "stable":
|
if repo == "slack_patches" and _meta_.slack_rel == "stable":
|
||||||
CHECKSUMS_md5 = URL(mirrors("CHECKSUMS.md5", "patches/")).reading()
|
CHECKSUMS_md5 = URL(mirrors("CHECKSUMS.md5", "patches/")).reading()
|
||||||
elif repo == "slack_patches" and _meta_.slack_rel == "current":
|
elif repo == "slack_patches" and _meta_.slack_rel == "current":
|
||||||
|
@ -44,9 +44,7 @@ def pkg_checksum(binary, repo):
|
||||||
f = open(lib, "r")
|
f = open(lib, "r")
|
||||||
CHECKSUMS_md5 = f.read()
|
CHECKSUMS_md5 = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
if repo == "alien":
|
|
||||||
end = ""
|
|
||||||
for line in CHECKSUMS_md5.splitlines():
|
for line in CHECKSUMS_md5.splitlines():
|
||||||
if line.endswith("%s%s" % (end, binary)):
|
if line.endswith("/{0}".format(binary)):
|
||||||
md5 = line.split()[0]
|
md5 = line.split()[0]
|
||||||
return md5
|
return md5
|
||||||
|
|
Loading…
Reference in a new issue