Pass arch to self

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-05-09 08:34:11 +03:00
parent 2097601561
commit d4de0e4587

View file

@ -42,6 +42,7 @@ class Initialization(Utils):
def __init__(self, check):
self.check = check
self.meta = _meta_
self.arch = _meta_.arch
self.def_repos_dict = Repo().default_repository()
self.conf_path = self.meta.conf_path
self.log_path = self.meta.log_path
@ -200,7 +201,6 @@ class Initialization(Utils):
"""
ar = "x86"
ver = slack_ver()
arch = self.meta.arch
repo = self.def_repos_dict["alien"]
log = self.log_path + "alien/"
lib = self.lib_path + "alien_repo/"
@ -210,8 +210,8 @@ class Initialization(Utils):
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
self.make_dir([log, lib])
if arch == "x86_64":
ar = arch
if self.arch == "x86_64":
ar = self.arch
if self.meta.slack_rel == "current":
ver = self.meta.slack_rel
PACKAGES_TXT = f"{repo}/{ver}/{ar}/{lib_file}"
@ -230,7 +230,6 @@ class Initialization(Utils):
"""Creating slacky.eu local library
"""
ar = ""
arch = self.meta.arch
repo = self.def_repos_dict["slacky"]
log = self.log_path + "slacky/"
lib = self.lib_path + "slacky_repo/"
@ -240,7 +239,7 @@ class Initialization(Utils):
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
self.make_dir([log, lib])
if arch == "x86_64":
if self.arch == "x86_64":
ar = "64"
PACKAGES_TXT = f"{repo}slackware{ar}-{slack_ver()}/{lib_file}"
FILELIST_TXT = ""
@ -284,7 +283,6 @@ class Initialization(Utils):
"""
ver = slack_ver()
ar = f"{ver}-x86"
arch = self.meta.arch
repo = self.def_repos_dict["slonly"]
log = self.log_path + "slonly/"
lib = self.lib_path + "slonly_repo/"
@ -294,11 +292,11 @@ class Initialization(Utils):
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
self.make_dir([log, lib])
if arch == "x86_64":
if self.arch == "x86_64":
ar = f"{ver}-x86_64"
if self.meta.slack_rel == "current":
ar = f"{self.meta.slack_rel}-x86"
if self.meta.slack_rel == "current" and arch == "x86_64":
if self.meta.slack_rel == "current" and self.arch == "x86_64":
ar = f"{self.meta.slack_rel}-x86_64"
PACKAGES_TXT = f"{repo}{ar}/{lib_file}"
FILELIST_TXT = ""
@ -367,7 +365,6 @@ class Initialization(Utils):
"""Creating Slacke local library
"""
ar = ""
arch = self.meta.arch
repo = self.def_repos_dict["slacke"]
log = self.log_path + "slacke/"
lib = self.lib_path + "slacke_repo/"
@ -377,7 +374,7 @@ class Initialization(Utils):
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
self.make_dir([log, lib])
if arch == "x86_64":
if self.arch == "x86_64":
ar = "64"
version = self.meta.slacke_sub_repo[1:-1]
PACKAGES_TXT = (f"{repo}slacke{version}/slackware{ar}-"
@ -399,7 +396,6 @@ class Initialization(Utils):
"""Creating SalixOS local library
"""
ar = "i486"
arch = self.meta.arch
repo = self.def_repos_dict["salix"]
log = self.log_path + "salix/"
lib = self.lib_path + "salix_repo/"
@ -409,7 +405,7 @@ class Initialization(Utils):
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
self.make_dir([log, lib])
if arch == "x86_64":
if self.arch == "x86_64":
ar = "x86_64"
PACKAGES_TXT = f"{repo}{ar}/{slack_ver()}/{lib_file}"
FILELIST_TXT = ""
@ -427,7 +423,6 @@ class Initialization(Utils):
"""Creating slackel.gr local library
"""
ar = "i486"
arch = self.meta.arch
repo = self.def_repos_dict["slackl"]
log = self.log_path + "slackl/"
lib = self.lib_path + "slackl_repo/"
@ -437,7 +432,7 @@ class Initialization(Utils):
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
self.make_dir([log, lib])
if arch == "x86_64":
if self.arch == "x86_64":
ar = "x86_64"
PACKAGES_TXT = f"{repo}{ar}/current/{lib_file}"
FILELIST_TXT = ""
@ -480,7 +475,6 @@ class Initialization(Utils):
"""
ar = "x86"
ver_slack = slack_ver()
arch = self.meta.arch
repo = self.def_repos_dict["msb"]
log = self.log_path + "msb/"
lib = self.lib_path + "msb_repo/"
@ -490,7 +484,7 @@ class Initialization(Utils):
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
self.make_dir([log, lib])
if arch == "x86_64":
if self.arch == "x86_64":
ar = "x86_64"
version = self.meta.msb_sub_repo[1:-1]
if self.meta.slack_rel == "current":
@ -512,7 +506,6 @@ class Initialization(Utils):
"""
ar = "x86"
ver_slack = slack_ver()
arch = self.meta.arch
repo = self.def_repos_dict["csb"]
log = self.log_path + "csb/"
lib = self.lib_path + "csb_repo/"
@ -522,7 +515,7 @@ class Initialization(Utils):
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
self.make_dir([log, lib])
if arch == "x86_64":
if self.arch == "x86_64":
ar = "x86_64"
if self.meta.slack_rel == "current":
ver_slack = self.meta.slack_rel
@ -543,7 +536,6 @@ class Initialization(Utils):
"""
nickname = "slack-n-free"
ar = ""
arch = self.meta.arch
repo = self.def_repos_dict["connos"]
log = self.log_path + "connos/"
lib = self.lib_path + "connos_repo/"
@ -553,7 +545,7 @@ class Initialization(Utils):
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
self.make_dir([log, lib])
if arch == "x86_64":
if self.arch == "x86_64":
ar = "64"
PACKAGES_TXT = f"{repo}{nickname}{ar}-{slack_ver()}/{lib_file}"
FILELIST_TXT = ""
@ -571,7 +563,6 @@ class Initialization(Utils):
"""Creating Microlinux local library
"""
ar = "32"
arch = self.meta.arch
repo = self.def_repos_dict["mles"]
log = self.log_path + "mles/"
lib = self.lib_path + "mles_repo/"
@ -581,7 +572,7 @@ class Initialization(Utils):
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
self.make_dir([log, lib])
if arch == "x86_64":
if self.arch == "x86_64":
ar = "64"
version = self.meta.mles_sub_repo[1:-1]
PACKAGES_TXT = f"{repo}{version}-{slack_ver()}-{ar}bit/{lib_file}"