mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Fixed slonly and multi -current repository
This commit is contained in:
parent
4795d7ef79
commit
9c5e1cfff4
3 changed files with 22 additions and 30 deletions
|
@ -75,12 +75,6 @@ def repo_data(PACKAGES_TXT, step, repo, flag):
|
|||
rsize,
|
||||
runsize
|
||||
) = ktown_filter(name, location, size, unsize)
|
||||
elif repo == "multi":
|
||||
(rname,
|
||||
rlocation,
|
||||
rsize,
|
||||
runsize
|
||||
) = multi_filter(name, location, size, unsize)
|
||||
else:
|
||||
rname, rlocation, rsize, runsize = name, location, size, unsize
|
||||
return [rname, rlocation, rsize, runsize]
|
||||
|
@ -158,23 +152,6 @@ def ktown_filter(name, location, size, unsize):
|
|||
return [fname, flocation, fsize, funsize]
|
||||
|
||||
|
||||
def multi_filter(name, location, size, unsize):
|
||||
"""
|
||||
Filter Alien"s multilib repository data
|
||||
"""
|
||||
ver = slack_ver()
|
||||
if _meta_.slack_rel == "current":
|
||||
ver = "current"
|
||||
(fname, flocation, fsize, funsize) = ([] for i in range(4))
|
||||
for n, l, s, u in zip(name, location, size, unsize):
|
||||
if l.startswith(ver):
|
||||
fname.append(n)
|
||||
flocation.append(l)
|
||||
fsize.append(s)
|
||||
funsize.append(u)
|
||||
return [fname, flocation, fsize, funsize]
|
||||
|
||||
|
||||
class Requires(object):
|
||||
|
||||
def __init__(self, name, repo):
|
||||
|
|
|
@ -89,16 +89,22 @@ class RepoInit(object):
|
|||
self.mirror = Repo().slackers()
|
||||
|
||||
def _init_slonly(self):
|
||||
arch = "{0}-x86".format(slack_ver())
|
||||
ver = slack_ver()
|
||||
arch = "{0}-x86".format(ver)
|
||||
if os.uname()[4] == "x86_64":
|
||||
arch = "{0}-x86_64".format(slack_ver())
|
||||
arch = "{0}-x86_64".format(ver)
|
||||
if self.meta.slack_rel == "current":
|
||||
arch = "{0}-x86_64".format(self.meta.slack_rel)
|
||||
self.mirror = "{0}{1}/".format(Repo().slackonly(), arch)
|
||||
|
||||
def _init_ktown(self):
|
||||
self.mirror = Repo().ktown()
|
||||
|
||||
def _init_multi(self):
|
||||
self.mirror = Repo().multi()
|
||||
ver = slack_ver()
|
||||
if self.meta.slack_rel == "current":
|
||||
ver = self.meta.slack_rel
|
||||
self.mirror = Repo().multi() + ver + "/"
|
||||
|
||||
def _init_slacke(self):
|
||||
arch = ""
|
||||
|
|
|
@ -302,7 +302,8 @@ class Initialization(object):
|
|||
def slonly(self):
|
||||
"""Creating slackers local library
|
||||
"""
|
||||
ar = "{0}-x86".format(slack_ver())
|
||||
ver = slack_ver()
|
||||
ar = "{0}-x86".format(ver)
|
||||
arch = os.uname()[4]
|
||||
repo = Repo().slackonly()
|
||||
log = self.log_path + "slonly/"
|
||||
|
@ -316,7 +317,12 @@ class Initialization(object):
|
|||
if not os.path.exists(lib):
|
||||
os.mkdir(lib)
|
||||
if arch == "x86_64":
|
||||
ar = "{0}-x86_64".format(slack_ver())
|
||||
ar = "{0}-x86_64".format(ver)
|
||||
if (self.meta.slack_rel == "current" and arch.startswith("i") and
|
||||
arch.endswith("6")):
|
||||
ar = "{0}-x86".format(self.meta.slack_rel)
|
||||
if self.meta.slack_rel == "current" and arch == "x86_64":
|
||||
ar = "{0}-x86_64".format(self.meta.slack_rel)
|
||||
PACKAGES_TXT = "{0}{1}/{2}".format(repo, ar, lib_file)
|
||||
FILELIST_TXT = "{0}{1}/{2}".format(repo, ar, lst_file)
|
||||
CHECKSUMS_MD5 = "{0}{1}/{2}".format(repo, ar, md5_file)
|
||||
|
@ -358,6 +364,7 @@ class Initialization(object):
|
|||
def multi(self):
|
||||
"""Creating alien multilib local library
|
||||
"""
|
||||
ver = slack_ver()
|
||||
repo = Repo().multi()
|
||||
log = self.log_path + "multi/"
|
||||
lib = self.lib_path + "multi_repo/"
|
||||
|
@ -369,9 +376,11 @@ class Initialization(object):
|
|||
os.mkdir(log)
|
||||
if not os.path.exists(lib):
|
||||
os.mkdir(lib)
|
||||
PACKAGES_TXT = "{0}{1}".format(repo, lib_file)
|
||||
if self.meta.slack_rel == "currnet":
|
||||
ver = self.meta.slack_rel
|
||||
PACKAGES_TXT = "{0}{1}/{2}".format(repo, ver, lib_file)
|
||||
FILELIST_TXT = ""
|
||||
CHECKSUMS_MD5 = "{0}{1}".format(repo, md5_file)
|
||||
CHECKSUMS_MD5 = "{0}{1}/{2}".format(repo, ver, md5_file)
|
||||
ChangeLog_txt = "{0}{1}".format(repo, log_file)
|
||||
if self.check:
|
||||
return self.checks_logs(log, log_file, ChangeLog_txt)
|
||||
|
|
Loading…
Add table
Reference in a new issue