mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-27 19:58:21 +01:00
Renamed url attribute
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
a5af3006ab
commit
f9a2a983a9
6 changed files with 14 additions and 13 deletions
|
@ -33,11 +33,11 @@ def pkg_checksum(binary, repo):
|
|||
"""
|
||||
md5 = "None"
|
||||
if repo == "slack_patches" and _meta_.slack_rel == "stable":
|
||||
CHECKSUMS_md5 = URL(mirrors("CHECKSUMS.md5", "patches/")).reading()
|
||||
CHECKSUMS_md5 = URL(mirrors("CHECKSUMS.md5", "patches/")).get_request()
|
||||
elif repo == "slack_patches" and _meta_.slack_rel == "current":
|
||||
CHECKSUMS_md5 = URL(mirrors("CHECKSUMS.md5", "")).reading()
|
||||
CHECKSUMS_md5 = URL(mirrors("CHECKSUMS.md5", "")).get_request()
|
||||
elif repo == "slpkg":
|
||||
CHECKSUMS_md5 = URL(_meta_.CHECKSUMS_link).reading()
|
||||
CHECKSUMS_md5 = URL(_meta_.CHECKSUMS_link).get_request()
|
||||
else:
|
||||
lib = f"{_meta_.lib_path}{repo}_repo/CHECKSUMS.md5"
|
||||
f = open(lib, "r")
|
||||
|
|
|
@ -40,7 +40,8 @@ class BuildNumber(Utils):
|
|||
def get(self):
|
||||
num = "NO_BUILD"
|
||||
if self.sbo_url:
|
||||
SlackBuild = URL(f"{self.sbo_url}{self.pkg}.SlackBuild").reading()
|
||||
SlackBuild = URL(f"{self.sbo_url}"
|
||||
f"{self.pkg}.SlackBuild").get_request()
|
||||
else:
|
||||
SlackBuild = self.read_file(f"{self.meta.build_path}{self.pkg}/"
|
||||
f"{self.pkg}.SlackBuild")
|
||||
|
|
|
@ -34,19 +34,19 @@ class ReadSBo:
|
|||
def readme(self, sbo_readme):
|
||||
"""Read SlackBuild README file
|
||||
"""
|
||||
return URL(self.sbo_url + sbo_readme).reading()
|
||||
return URL(self.sbo_url + sbo_readme).get_request()
|
||||
|
||||
def info(self, name, sbo_file):
|
||||
"""Read info file
|
||||
"""
|
||||
return URL(self.sbo_url + name + sbo_file).reading()
|
||||
return URL(self.sbo_url + name + sbo_file).get_request()
|
||||
|
||||
def slackbuild(self, name, sbo_file):
|
||||
"""Read SlackBuild file
|
||||
"""
|
||||
return URL(self.sbo_url + name + sbo_file).reading()
|
||||
return URL(self.sbo_url + name + sbo_file).get_request()
|
||||
|
||||
def doinst(self, doinst_sh):
|
||||
"""Read SlackBuild doinst.sh
|
||||
"""
|
||||
return URL(self.sbo_url + doinst_sh).reading()
|
||||
return URL(self.sbo_url + doinst_sh).get_request()
|
||||
|
|
|
@ -80,9 +80,9 @@ class Patches(BlackList, Utils):
|
|||
self.msg.checking()
|
||||
if self.version == "stable":
|
||||
self.PACKAGES_TXT = URL(mirrors("PACKAGES.TXT",
|
||||
"patches/")).reading()
|
||||
"patches/")).get_request()
|
||||
else:
|
||||
self.PACKAGES_TXT = URL(mirrors("PACKAGES.TXT", "")).reading()
|
||||
self.PACKAGES_TXT = URL(mirrors("PACKAGES.TXT", "")).get_request()
|
||||
|
||||
def start(self):
|
||||
"""Install new patches from official Slackware mirrors
|
||||
|
@ -268,7 +268,7 @@ class Patches(BlackList, Utils):
|
|||
"""This replace slackpkg ChangeLog.txt file with new
|
||||
from Slackware official mirrors after update distribution.
|
||||
"""
|
||||
NEW_ChangeLog_txt = URL(mirrors("ChangeLog.txt", "")).reading()
|
||||
NEW_ChangeLog_txt = URL(mirrors("ChangeLog.txt", "")).get_request()
|
||||
if os.path.isfile(f"{self.meta.slackpkg_lib_path}ChangeLog.txt.old"):
|
||||
os.remove(f"{self.meta.slackpkg_lib_path}ChangeLog.txt.old")
|
||||
if os.path.isfile(f"{self.meta.slackpkg_lib_path}ChangeLog.txt"):
|
||||
|
|
|
@ -47,7 +47,7 @@ def it_self_update():
|
|||
_meta_.__all__,
|
||||
branch,
|
||||
_meta_.__all__))
|
||||
version_data = URL(ver_link).reading()
|
||||
version_data = URL(ver_link).get_request()
|
||||
|
||||
for line in version_data.splitlines():
|
||||
line = line.strip()
|
||||
|
|
|
@ -40,7 +40,7 @@ class URL:
|
|||
else:
|
||||
self.http = urllib3.PoolManager()
|
||||
|
||||
def reading(self):
|
||||
def get_request(self):
|
||||
"""Open url and read
|
||||
"""
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue