mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
added salix repository
This commit is contained in:
parent
db35b68213
commit
1f34e1c1b3
8 changed files with 76 additions and 55 deletions
|
@ -46,7 +46,8 @@ repositories = [
|
||||||
'slonly',
|
'slonly',
|
||||||
'ktown{latest}',
|
'ktown{latest}',
|
||||||
'multi',
|
'multi',
|
||||||
'slacke{18}'
|
'slacke{18}',
|
||||||
|
'salix'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,7 @@ class Initialization(object):
|
||||||
|
|
||||||
def slacke(self):
|
def slacke(self):
|
||||||
'''
|
'''
|
||||||
Creating alien multilib local library
|
Creating Slacke local library
|
||||||
'''
|
'''
|
||||||
ar = ""
|
ar = ""
|
||||||
arch = os.uname()[4]
|
arch = os.uname()[4]
|
||||||
|
@ -373,6 +373,35 @@ class Initialization(object):
|
||||||
self.remote(log, log_file, changelog_txt, lib, lib_file, packages_txt,
|
self.remote(log, log_file, changelog_txt, lib, lib_file, packages_txt,
|
||||||
md5_file, checksums_md5, lst_file, filelist_txt)
|
md5_file, checksums_md5, lst_file, filelist_txt)
|
||||||
|
|
||||||
|
def salix(self):
|
||||||
|
'''
|
||||||
|
Creating SalixOS local library
|
||||||
|
'''
|
||||||
|
ar = "i486"
|
||||||
|
arch = os.uname()[4]
|
||||||
|
repo = Repo().salix()
|
||||||
|
log = log_path + "salix/"
|
||||||
|
lib = lib_path + "salix_repo/"
|
||||||
|
lib_file = "PACKAGES.TXT"
|
||||||
|
lst_file = ""
|
||||||
|
md5_file = "CHECKSUMS.md5"
|
||||||
|
log_file = "ChangeLog.txt"
|
||||||
|
if not os.path.exists(log):
|
||||||
|
os.mkdir(log)
|
||||||
|
if not os.path.exists(lib):
|
||||||
|
os.mkdir(lib)
|
||||||
|
if arch == "x86_64":
|
||||||
|
ar = "x86_64"
|
||||||
|
packages_txt = "{0}{1}/{2}/{3}".format(repo, ar, slack_ver(), lib_file)
|
||||||
|
filelist_txt = ""
|
||||||
|
checksums_md5 = "{0}{1}/{2}/{3}".format(repo, ar, slack_ver(), md5_file)
|
||||||
|
changelog_txt = "{0}{1}/{2}/{3}".format(repo, ar, slack_ver(), log_file)
|
||||||
|
self.write(lib, lib_file, packages_txt)
|
||||||
|
self.write(lib, md5_file, checksums_md5)
|
||||||
|
self.write(log, log_file, changelog_txt)
|
||||||
|
self.remote(log, log_file, changelog_txt, lib, lib_file, packages_txt,
|
||||||
|
md5_file, checksums_md5, lst_file, filelist_txt)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def write(path, data_file, file_url):
|
def write(path, data_file, file_url):
|
||||||
'''
|
'''
|
||||||
|
@ -489,7 +518,8 @@ class Update(object):
|
||||||
'slonly': Initialization().slackonly,
|
'slonly': Initialization().slackonly,
|
||||||
'ktown': Initialization().ktown,
|
'ktown': Initialization().ktown,
|
||||||
'multi': Initialization().multi,
|
'multi': Initialization().multi,
|
||||||
'slacke': Initialization().slacke
|
'slacke': Initialization().slacke,
|
||||||
|
'salix': Initialization().salix
|
||||||
}
|
}
|
||||||
|
|
||||||
def repository(self):
|
def repository(self):
|
||||||
|
|
|
@ -99,6 +99,9 @@ class Case(object):
|
||||||
def slacke_install(self):
|
def slacke_install(self):
|
||||||
OthersInstall(self.package, "slacke", self.release).start()
|
OthersInstall(self.package, "slacke", self.release).start()
|
||||||
|
|
||||||
|
def salix_install(self):
|
||||||
|
OthersInstall(self.package, "salix", self.release).start()
|
||||||
|
|
||||||
def sbo_upgrade(self):
|
def sbo_upgrade(self):
|
||||||
SBoCheck().start()
|
SBoCheck().start()
|
||||||
|
|
||||||
|
@ -211,7 +214,8 @@ def main():
|
||||||
'slonly': pkg.slackonly_install,
|
'slonly': pkg.slackonly_install,
|
||||||
'ktown': pkg.ktown_install,
|
'ktown': pkg.ktown_install,
|
||||||
'multi': pkg.multi_install,
|
'multi': pkg.multi_install,
|
||||||
'slacke': pkg.slacke_install
|
'slacke': pkg.slacke_install,
|
||||||
|
'salix': pkg.salix_install
|
||||||
}
|
}
|
||||||
if args[1] in repositories:
|
if args[1] in repositories:
|
||||||
install[args[1]]()
|
install[args[1]]()
|
||||||
|
|
|
@ -77,7 +77,7 @@ def repo_data(PACKAGES_TXT, step, repo, version):
|
||||||
rsize,
|
rsize,
|
||||||
runsize
|
runsize
|
||||||
) = multi_filter(name, location, size, unsize, version)
|
) = multi_filter(name, location, size, unsize, version)
|
||||||
elif repo in ["slacky", "studio", "slackr", "slonly", "slacke"]:
|
elif repo in ["slacky", "studio", "slackr", "slonly", "slacke", "salix"]:
|
||||||
rname, rlocation, rsize, runsize = name, location, size, unsize
|
rname, rlocation, rsize, runsize = name, location, size, unsize
|
||||||
return [rname, rlocation, rsize, runsize]
|
return [rname, rlocation, rsize, runsize]
|
||||||
|
|
||||||
|
@ -186,11 +186,12 @@ class Requires(object):
|
||||||
'''
|
'''
|
||||||
Grap package requirements from repositories
|
Grap package requirements from repositories
|
||||||
'''
|
'''
|
||||||
if self.repo in ["alien", "slacky", "slackr"]:
|
if self.repo in ["alien", "slacky", "slackr", "salix"]:
|
||||||
lib = {
|
lib = {
|
||||||
'alien': lib_path + 'alien_repo/PACKAGES.TXT',
|
'alien': lib_path + 'alien_repo/PACKAGES.TXT',
|
||||||
'slacky': lib_path + 'slacky_repo/PACKAGES.TXT',
|
'slacky': lib_path + 'slacky_repo/PACKAGES.TXT',
|
||||||
'slackr': lib_path + 'slackr_repo/PACKAGES.TXT'
|
'slackr': lib_path + 'slackr_repo/PACKAGES.TXT',
|
||||||
|
'salix': lib_path + 'salix_repo/PACKAGES.TXT'
|
||||||
}
|
}
|
||||||
f = open(lib[self.repo], "r")
|
f = open(lib[self.repo], "r")
|
||||||
PACKAGES_TXT = f.read()
|
PACKAGES_TXT = f.read()
|
||||||
|
@ -205,8 +206,8 @@ class Requires(object):
|
||||||
if line.startswith("PACKAGE REQUIRED: "):
|
if line.startswith("PACKAGE REQUIRED: "):
|
||||||
if pkg_name == self.name:
|
if pkg_name == self.name:
|
||||||
if line[17:].strip():
|
if line[17:].strip():
|
||||||
if self.repo == "slacky":
|
if self.repo in ["slacky", "salix"]:
|
||||||
return self.slacky_req_fix(line)
|
return self._req_fix(line)
|
||||||
elif self.repo == "alien":
|
elif self.repo == "alien":
|
||||||
return line[18:].strip().split(",")
|
return line[18:].strip().split(",")
|
||||||
else:
|
else:
|
||||||
|
@ -228,17 +229,17 @@ class Requires(object):
|
||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def slacky_req_fix(self, line):
|
def _req_fix(self, line):
|
||||||
'''
|
'''
|
||||||
Fix slacky requirements because many dependencies splitting
|
Fix slacky and salix requirements because many dependencies splitting
|
||||||
with ',' and others with '|'
|
with ',' and others with '|'
|
||||||
'''
|
'''
|
||||||
slacky_deps = []
|
deps = []
|
||||||
for dep in line[18:].strip().split(","):
|
for dep in line[18:].strip().split(","):
|
||||||
dep = dep.split("|")
|
dep = dep.split("|")
|
||||||
if len(dep) > 1:
|
if len(dep) > 1:
|
||||||
for d in dep:
|
for d in dep:
|
||||||
slacky_deps.append(d.split()[0])
|
deps.append(d.split()[0])
|
||||||
dep = "".join(dep)
|
dep = "".join(dep)
|
||||||
slacky_deps.append(dep.split()[0])
|
deps.append(dep.split()[0])
|
||||||
return slacky_deps
|
return deps
|
||||||
|
|
|
@ -77,7 +77,8 @@ class OthersInstall(object):
|
||||||
'slonly': self._init_slonly,
|
'slonly': self._init_slonly,
|
||||||
'ktown': self._init_ktown,
|
'ktown': self._init_ktown,
|
||||||
'multi': self._init_multi,
|
'multi': self._init_multi,
|
||||||
'slacke': self._init_slacke
|
'slacke': self._init_slacke,
|
||||||
|
'salix': self._init_salix
|
||||||
}
|
}
|
||||||
init_repos[self.repo]()
|
init_repos[self.repo]()
|
||||||
|
|
||||||
|
@ -147,6 +148,14 @@ class OthersInstall(object):
|
||||||
Repo().slacke(), slacke_sub_repo[1:-1], arch, slack_ver())
|
Repo().slacke(), slacke_sub_repo[1:-1], arch, slack_ver())
|
||||||
self.step = self.step * 2
|
self.step = self.step * 2
|
||||||
|
|
||||||
|
def _init_salix(self):
|
||||||
|
arch = "i486"
|
||||||
|
if os.uname()[4] == "x86_64":
|
||||||
|
arch = "x86_64"
|
||||||
|
self.lib = lib_path + "salix_repo/PACKAGES.TXT"
|
||||||
|
self.mirror = "{0}{1}/{2}/".format(Repo().salix(), arch, slack_ver())
|
||||||
|
self.step = self.step * 2
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
'''
|
'''
|
||||||
Install packages from official Slackware distribution
|
Install packages from official Slackware distribution
|
||||||
|
@ -255,7 +264,8 @@ def views(install_all, comp_sum, repository, dependencies):
|
||||||
'slonly': '',
|
'slonly': '',
|
||||||
'ktown': ' ',
|
'ktown': ' ',
|
||||||
'multi': ' ',
|
'multi': ' ',
|
||||||
'slacke': ''
|
'slacke': '',
|
||||||
|
'salix': ' '
|
||||||
}
|
}
|
||||||
repository += align[repository]
|
repository += align[repository]
|
||||||
for pkg, comp in zip(install_all, comp_sum):
|
for pkg, comp in zip(install_all, comp_sum):
|
||||||
|
|
|
@ -46,7 +46,8 @@ class RepoList(object):
|
||||||
'slonly': Repo().slackonly(),
|
'slonly': Repo().slackonly(),
|
||||||
'ktown': Repo().ktown(),
|
'ktown': Repo().ktown(),
|
||||||
'multi': Repo().multi(),
|
'multi': Repo().multi(),
|
||||||
'slacke': Repo().slacke()
|
'slacke': Repo().slacke(),
|
||||||
|
'salix': Repo().salix()
|
||||||
}
|
}
|
||||||
|
|
||||||
def repos(self):
|
def repos(self):
|
||||||
|
|
|
@ -104,3 +104,9 @@ class Repo(object):
|
||||||
Slacke slacke{17|18} repository
|
Slacke slacke{17|18} repository
|
||||||
'''
|
'''
|
||||||
return "http://ngc891.blogdns.net/pub/"
|
return "http://ngc891.blogdns.net/pub/"
|
||||||
|
|
||||||
|
def salix(self):
|
||||||
|
'''
|
||||||
|
SalixOS salix repository
|
||||||
|
'''
|
||||||
|
return "http://download.salixos.org/"
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from slack.slack_version import slack_ver
|
|
||||||
|
|
||||||
|
|
||||||
def split_package(package):
|
def split_package(package):
|
||||||
'''
|
'''
|
||||||
|
@ -30,43 +28,13 @@ def split_package(package):
|
||||||
arch and build tag.
|
arch and build tag.
|
||||||
'''
|
'''
|
||||||
split = package.split("-")
|
split = package.split("-")
|
||||||
sbo = "_SBo"
|
|
||||||
slack = "_slack{0}".format(slack_ver())
|
|
||||||
rlw = "_rlw"
|
|
||||||
alien = "alien"
|
|
||||||
slacky = "sl"
|
|
||||||
studio = "se"
|
|
||||||
slackr = "cf"
|
|
||||||
slonly = "_slack"
|
|
||||||
# ktown = alien
|
|
||||||
# multi = alien
|
|
||||||
compat = "compat32"
|
|
||||||
slacke = "jp"
|
|
||||||
build = split[-1]
|
build = split[-1]
|
||||||
|
build_a, build_b = '', ''
|
||||||
|
build_a = build[:1]
|
||||||
|
if build[1:2].isdigit():
|
||||||
|
build_b = build[1:2]
|
||||||
|
|
||||||
if build.endswith(sbo):
|
build = build_a + build_b
|
||||||
build = split[-1][:-4] # and remove .t?z extension
|
|
||||||
if build.endswith(slack):
|
|
||||||
build = split[-1][:-len(slack)]
|
|
||||||
elif build.endswith(rlw):
|
|
||||||
build = split[-1][:-len(rlw)]
|
|
||||||
elif build.endswith(alien):
|
|
||||||
build = split[-1][:-len(alien)]
|
|
||||||
elif build.endswith(slacky):
|
|
||||||
build = split[-1][:-len(slacky)]
|
|
||||||
elif build.endswith(studio):
|
|
||||||
build = split[-1][:-len(studio)]
|
|
||||||
elif build.endswith(slackr):
|
|
||||||
build = split[-1][:-len(slackr)]
|
|
||||||
elif build.endswith(slonly):
|
|
||||||
build = split[-1][:-len(slonly)]
|
|
||||||
elif (slack + compat) in build:
|
|
||||||
build = split[-1][:-len(slack + compat)]
|
|
||||||
elif build.endswith(compat):
|
|
||||||
build = split[-1][:-len(compat)]
|
|
||||||
elif build.endswith(slacke):
|
|
||||||
build = split[-1][:-len(slacke)]
|
|
||||||
|
|
||||||
arch = split[-2]
|
arch = split[-2]
|
||||||
ver = split[-3]
|
ver = split[-3]
|
||||||
name = "-".join(split[:-3])
|
name = "-".join(split[:-3])
|
||||||
|
|
Loading…
Reference in a new issue