mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
added Aliens multi repository
This commit is contained in:
parent
c9cf2becd2
commit
91787da9e8
17 changed files with 129 additions and 40 deletions
|
@ -1,7 +1,8 @@
|
|||
Version 2.1.5-dev
|
||||
22-12-2014
|
||||
24-12-2014
|
||||
|
||||
[Feature] - Added slacker.it, slackonly.com, Alien's ktown repositories.
|
||||
[Feature] - Added slacker.it, slackonly.com, Alien's ktown, Alien's multilib
|
||||
repositories.
|
||||
- Added command 're-create'.
|
||||
- Added command 'repolist'.
|
||||
- Added command 'repoinfo'.
|
||||
|
|
|
@ -58,6 +58,9 @@ Supported Repositories:
|
|||
- Alien's ktown - `Repository <http://alien.slackbook.org/ktown/>`_
|
||||
Arch: {x86, x86_64}
|
||||
Versions: {13.37, 14.0, 14.1, current}
|
||||
- Alien's multi - `Repository <http://www.slackware.com/~alien/multilib/>`_
|
||||
Arch: {x86_64}
|
||||
Versions: {13.0, 13.1, 13.37, 14.0, 14.1, current}
|
||||
|
||||
* Choose repositories you need to work from file '/etc/slpkg/slpkg.conf' default is
|
||||
'slack' and 'sbo' repositories and read REPOSITORIES file for each of the particularities.
|
||||
|
@ -269,6 +272,7 @@ Take information repositories with commands:
|
|||
+==============================================================================
|
||||
alien http://www.slackware.com/~alien/slackbuilds/ enabled
|
||||
ktown http://alien.slackbook.org/ktown/ enabled
|
||||
multi http://www.slackware.com/~alien/multilib/ enabled
|
||||
rlw http://rlworkman.net/pkgs/ enabled
|
||||
sbo http://slackbuilds.org/slackbuilds/ enabled
|
||||
slack http://ftp.cc.uoc.gr/mirrors/linux/slackware/ enabled
|
||||
|
|
|
@ -10,8 +10,6 @@ Rworkman's (rlw) repository use dependencies where displayed in central site
|
|||
'http://rlworkman.net/pkgs/' and only those. Unfortunately there is no fixed reference
|
||||
dependencies file PACKAGES.TXT.
|
||||
|
||||
Studioware (studio) and Alien's ktown (ktown)repository has no reference dependencies.
|
||||
|
||||
Slackers.it (slackr) repository be used only from Slackware64 current users.
|
||||
Also find in some packages will not show package description when you run the command
|
||||
'slpkg -p slackr <package>' and this is because there is not constant reference to the
|
||||
|
@ -26,3 +24,7 @@ lines with 'PACKAGE NAME:' there is no package so 'slpkg' can not find package.
|
|||
Users with Slackware x86_64 will use this repository should establish from the beginning
|
||||
the list of packages with the command 'slpkg re-create' to be updated with new packages
|
||||
and it's because the repository has not 'ChangeLog.txt' file.
|
||||
|
||||
Studioware (studio), Alien's ktown (ktown), Alien's multilib (multi) repository has no
|
||||
reference dependencies.
|
||||
|
||||
|
|
|
@ -73,7 +73,8 @@ Optional arguments:
|
|||
slacker.it = 'slackr'
|
||||
slackonly.com = 'slonly'
|
||||
Alien's ktown = 'ktown'
|
||||
|
||||
Alien's multilib = 'multi'
|
||||
|
||||
Default enable repository is 'slack' and 'sbo'.
|
||||
Add or remove repository in configuration file '/etc/slpkg/slpkg.conf'
|
||||
|
||||
|
|
|
@ -44,7 +44,8 @@ repositories = [
|
|||
'studio',
|
||||
'slackr',
|
||||
'slonly',
|
||||
'ktown{latest}'
|
||||
'ktown{latest}',
|
||||
'multi'
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -57,7 +57,8 @@ class PkgDesc(object):
|
|||
'studio': 'studio_repo/PACKAGES.TXT',
|
||||
'slackr': 'slackr_repo/PACKAGES.TXT',
|
||||
'slonly': 'slonly_repo/PACKAGES.TXT',
|
||||
'ktown': 'ktown_repo/PACKAGES.TXT'
|
||||
'ktown': 'ktown_repo/PACKAGES.TXT',
|
||||
'multi': 'multi_repo/PACKAGES.TXT'
|
||||
}
|
||||
self.lib = lib_path + repos[self.repo]
|
||||
|
||||
|
|
|
@ -48,7 +48,8 @@ def pkg_checksum(binary, repo):
|
|||
'studio': 'studio_repo/CHECKSUMS.md5',
|
||||
'slackr': 'slackr_repo/CHECKSUMS.md5',
|
||||
'slonly': 'slonly_repo/CHECKSUMS.md5',
|
||||
'ktown': 'ktown_repo/CHECKSUMS.md5'
|
||||
'ktown': 'ktown_repo/CHECKSUMS.md5',
|
||||
'multi': 'multi_repo/CHECKSUMS.md5'
|
||||
}
|
||||
lib = repos[repo]
|
||||
f = open(lib_path + lib, "r")
|
||||
|
|
|
@ -313,6 +313,31 @@ class Initialization(object):
|
|||
self.remote(log, log_file, changelog_txt, lib, lib_file, packages_txt,
|
||||
md5_file, checksums_md5, lst_file, filelist_txt)
|
||||
|
||||
def multi(self):
|
||||
'''
|
||||
Creating alien multilib local library
|
||||
'''
|
||||
repo = Repo().multi()
|
||||
log = log_path + "multi/"
|
||||
lib = lib_path + "multi_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)
|
||||
packages_txt = "{0}{1}".format(repo, lib_file)
|
||||
filelist_txt = ""
|
||||
checksums_md5 = "{0}{1}".format(repo, md5_file)
|
||||
changelog_txt = "{0}{1}".format(repo, 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
|
||||
def write(path, data_file, file_url):
|
||||
'''
|
||||
|
@ -427,7 +452,8 @@ class Update(object):
|
|||
'studio': Initialization().studioware,
|
||||
'slackr': Initialization().slackers,
|
||||
'slonly': Initialization().slackonly,
|
||||
'ktown': Initialization().ktown
|
||||
'ktown': Initialization().ktown,
|
||||
'multi': Initialization().multi
|
||||
}
|
||||
|
||||
def repository(self):
|
||||
|
|
|
@ -93,6 +93,9 @@ class Case(object):
|
|||
def ktown_install(self):
|
||||
OthersInstall(self.package, "ktown", self.release).start()
|
||||
|
||||
def multi_install(self):
|
||||
OthersInstall(self.package, "multi", self.release).start()
|
||||
|
||||
def sbo_upgrade(self):
|
||||
SBoCheck().start()
|
||||
|
||||
|
@ -120,6 +123,9 @@ class Case(object):
|
|||
def ktown_upgrade(self):
|
||||
OthersUpgrade("ktown", self.release).start()
|
||||
|
||||
def multi_upgrade(self):
|
||||
OthersUpgrade("multi", self.release).start()
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
|
@ -178,7 +184,8 @@ def main():
|
|||
'studio': pkg.studioware_upgrade,
|
||||
'slackr': pkg.slackers_upgrade,
|
||||
'slonly': pkg.slackonly_upgrade,
|
||||
'ktown': pkg.ktown_upgrade
|
||||
'ktown': pkg.ktown_upgrade,
|
||||
'multi': pkg.multi_upgrade
|
||||
}
|
||||
if args[1] in repositories:
|
||||
upgrade[args[1]]()
|
||||
|
@ -195,7 +202,8 @@ def main():
|
|||
'studio': pkg.studioware_install,
|
||||
'slackr': pkg.slackers_install,
|
||||
'slonly': pkg.slackonly_install,
|
||||
'ktown': pkg.ktown_install
|
||||
'ktown': pkg.ktown_install,
|
||||
'multi': pkg.multi_install
|
||||
}
|
||||
if args[1] in repositories:
|
||||
install[args[1]]()
|
||||
|
|
|
@ -26,6 +26,7 @@ import sys
|
|||
|
||||
from slpkg.sizes import units
|
||||
from slpkg.remove import delete
|
||||
from slpkg.toolbar import status
|
||||
from slpkg.repositories import Repo
|
||||
from slpkg.messages import template
|
||||
from slpkg.checksum import check_md5
|
||||
|
@ -65,7 +66,8 @@ class OthersUpgrade(object):
|
|||
'studio': self._init_studio,
|
||||
'slackr': self._init_slackr,
|
||||
'slonly': self._init_slonly,
|
||||
'ktown': self._init_ktown
|
||||
'ktown': self._init_ktown,
|
||||
'multi': self._init_multi
|
||||
}
|
||||
init_repos[self.repo]()
|
||||
|
||||
|
@ -118,6 +120,11 @@ class OthersUpgrade(object):
|
|||
self.mirror = Repo().ktown()
|
||||
self.step = self.step * 2
|
||||
|
||||
def _init_multi(self):
|
||||
self.lib = lib_path + "multi_repo/PACKAGES.TXT"
|
||||
self.mirror = Repo().multi()
|
||||
self.step = self.step * 2
|
||||
|
||||
def start(self):
|
||||
'''
|
||||
Install packages from official Slackware distribution
|
||||
|
@ -160,7 +167,7 @@ class OthersUpgrade(object):
|
|||
upgrade(self.tmp_path, upgrade_all, self.repo, self.version)
|
||||
delete(self.tmp_path, upgrade_all)
|
||||
else:
|
||||
print("No new updates in the repository '{0}'\n".format(
|
||||
print("No new updates from repository '{0}'\n".format(
|
||||
self.repo))
|
||||
except KeyboardInterrupt:
|
||||
print("") # new line at exit
|
||||
|
@ -177,14 +184,18 @@ class OthersUpgrade(object):
|
|||
# size = data[2]
|
||||
# unsize = data[3]
|
||||
data = repo_data(self.PACKAGES_TXT, self.step, self.repo, self.version)
|
||||
index, toolbar_width, step = 0, 700, 10
|
||||
for pkg in self.installed():
|
||||
index += 1
|
||||
toolbar_width = status(index, toolbar_width, step)
|
||||
for name, loc, comp, uncomp in zip(data[0], data[1], data[2],
|
||||
data[3]):
|
||||
inst_pkg = split_package(pkg)
|
||||
if name:
|
||||
if name: # this tips because some pkg_name is empty
|
||||
repo_pkg = split_package(name[:-4])
|
||||
if (repo_pkg[0] == inst_pkg[0] and
|
||||
name[:-4] > pkg and inst_pkg[0] not in black):
|
||||
repo_pkg[-3] > inst_pkg[-3] and
|
||||
inst_pkg[0] not in black):
|
||||
# store downloads packages by repo
|
||||
dwn.append("{0}{1}/{2}".format(self.mirror, loc, name))
|
||||
install.append(name)
|
||||
|
@ -197,18 +208,7 @@ class OthersUpgrade(object):
|
|||
Return all installed packages by repository
|
||||
'''
|
||||
packages = []
|
||||
repository = {
|
||||
'rlw': '_rlw',
|
||||
'alien': 'alien',
|
||||
'slacky': 'sl',
|
||||
'studio': 'se',
|
||||
'slackr': 'cf',
|
||||
'slonly': '_slack',
|
||||
'ktown': 'alien'
|
||||
}
|
||||
repo = repository[self.repo]
|
||||
for pkg in os.listdir(pkg_path):
|
||||
if pkg.endswith(repo):
|
||||
packages.append(pkg)
|
||||
return packages
|
||||
|
||||
|
@ -226,7 +226,8 @@ def views(upgrade_all, comp_sum, repository):
|
|||
'studio': '',
|
||||
'slackr': '',
|
||||
'slonly': '',
|
||||
'ktown': ' '
|
||||
'ktown': ' ',
|
||||
'multi': ' '
|
||||
}
|
||||
repository += align[repository]
|
||||
for pkg, comp in zip(upgrade_all, comp_sum):
|
||||
|
|
|
@ -71,6 +71,12 @@ def repo_data(PACKAGES_TXT, step, repo, version):
|
|||
rsize,
|
||||
runsize
|
||||
) = ktown_filter(name, location, size, unsize, version)
|
||||
elif repo == "multi":
|
||||
(rname,
|
||||
rlocation,
|
||||
rsize,
|
||||
runsize
|
||||
) = multi_filter(name, location, size, unsize, version)
|
||||
elif repo in ["slacky", "studio", "slackr", "slonly"]:
|
||||
rname, rlocation, rsize, runsize = name, location, size, unsize
|
||||
return [rname, rlocation, rsize, runsize]
|
||||
|
@ -96,7 +102,7 @@ def rlw_filter(name, location, size, unsize):
|
|||
|
||||
def alien_filter(name, location, size, unsize, version):
|
||||
'''
|
||||
Filter alien repository data
|
||||
Filter Alien's repository data
|
||||
'''
|
||||
ver = slack_ver()
|
||||
if version == "current":
|
||||
|
@ -116,7 +122,7 @@ def alien_filter(name, location, size, unsize, version):
|
|||
|
||||
def ktown_filter(name, location, size, unsize, version):
|
||||
'''
|
||||
Filter alien repository data
|
||||
Filter Alien's ktown repository data
|
||||
'''
|
||||
ver = slack_ver()
|
||||
if version == "current":
|
||||
|
@ -134,6 +140,23 @@ def ktown_filter(name, location, size, unsize, version):
|
|||
return [fname, flocation, fsize, funsize]
|
||||
|
||||
|
||||
def multi_filter(name, location, size, unsize, version):
|
||||
'''
|
||||
Filter Alien's multilib repository data
|
||||
'''
|
||||
ver = slack_ver()
|
||||
if version == "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]
|
||||
|
||||
|
||||
def fix_slackers_pkg(name):
|
||||
'''
|
||||
Fix 'PACKAGE NAME:' from PACKAGES.TXT file
|
||||
|
|
|
@ -74,7 +74,8 @@ class OthersInstall(object):
|
|||
'studio': self._init_studio,
|
||||
'slackr': self._init_slackr,
|
||||
'slonly': self._init_slonly,
|
||||
'ktown': self._init_ktown
|
||||
'ktown': self._init_ktown,
|
||||
'multi': self._init_multi
|
||||
}
|
||||
init_repos[self.repo]()
|
||||
|
||||
|
@ -128,6 +129,11 @@ class OthersInstall(object):
|
|||
self.mirror = Repo().ktown()
|
||||
self.step = self.step * 2
|
||||
|
||||
def _init_multi(self):
|
||||
self.lib = lib_path + "multi_repo/PACKAGES.TXT"
|
||||
self.mirror = Repo().multi()
|
||||
self.step = self.step * 2
|
||||
|
||||
def start(self):
|
||||
'''
|
||||
Install packages from official Slackware distribution
|
||||
|
@ -207,7 +213,6 @@ class OthersInstall(object):
|
|||
else:
|
||||
for name, loc, comp, uncomp in zip(data[0], data[1], data[2],
|
||||
data[3]):
|
||||
|
||||
package = "".join(deps)
|
||||
if package in name and package not in black:
|
||||
# store downloads packages by repo
|
||||
|
@ -235,7 +240,8 @@ def views(install_all, comp_sum, repository, dependencies):
|
|||
'studio': '',
|
||||
'slackr': '',
|
||||
'slonly': '',
|
||||
'ktown': ' '
|
||||
'ktown': ' ',
|
||||
'multi': ' '
|
||||
}
|
||||
repository += align[repository]
|
||||
for pkg, comp in zip(install_all, comp_sum):
|
||||
|
|
|
@ -42,7 +42,8 @@ def search_pkg(name, repo):
|
|||
'studio': 'studio_repo/PACKAGES.TXT',
|
||||
'slackr': 'slackr_repo/PACKAGES.TXT',
|
||||
'slonly': 'slonly_repo/PACKAGES.TXT',
|
||||
'ktown': 'ktown_repo/PACKAGES.TXT'
|
||||
'ktown': 'ktown_repo/PACKAGES.TXT',
|
||||
'multi': 'multi_repo/PACKAGES.TXT'
|
||||
}
|
||||
with open(lib_path + repo_dir[repo], "r") as PACKAGES_TXT:
|
||||
for line in PACKAGES_TXT:
|
||||
|
|
|
@ -295,7 +295,9 @@ class PackageManager(object):
|
|||
'slacky': 'sl',
|
||||
'studio': 'se',
|
||||
'slackr': 'cf',
|
||||
'slonly': '_slack', # this conflict with slack repository
|
||||
'slonly': '_slack',
|
||||
'ktown': 'alien',
|
||||
'multi': 'compat32',
|
||||
'all': ''
|
||||
}
|
||||
search = pkg_list[pattern]
|
||||
|
|
|
@ -44,7 +44,8 @@ class RepoList(object):
|
|||
'studio': Repo().studioware(),
|
||||
'slackr': Repo().slackers(),
|
||||
'slonly': Repo().slackonly(),
|
||||
'ktown': Repo().ktown()
|
||||
'ktown': Repo().ktown(),
|
||||
'multi': Repo().multi()
|
||||
}
|
||||
|
||||
def repos(self):
|
||||
|
|
|
@ -59,7 +59,7 @@ class Repo(object):
|
|||
|
||||
def alien(self):
|
||||
'''
|
||||
Alien repository
|
||||
Alien's slackbuilds repository
|
||||
'''
|
||||
return "http://www.slackware.com/~alien/slackbuilds/"
|
||||
|
||||
|
@ -89,6 +89,12 @@ class Repo(object):
|
|||
|
||||
def ktown(self):
|
||||
'''
|
||||
Alien ktown repository
|
||||
Alien's ktown repository
|
||||
'''
|
||||
return "http://alien.slackbook.org/ktown/"
|
||||
|
||||
def multi(self):
|
||||
'''
|
||||
Alien's multilib repository
|
||||
'''
|
||||
return "http://www.slackware.com/~alien/multilib/"
|
||||
|
|
|
@ -38,7 +38,9 @@ def split_package(package):
|
|||
studio = "se"
|
||||
slackr = "cf"
|
||||
slonly = "_slack"
|
||||
ktown = "alien"
|
||||
# ktown = alien
|
||||
# multi = alien
|
||||
compat = "compat32"
|
||||
build = split[-1]
|
||||
|
||||
if build.endswith(sbo):
|
||||
|
@ -57,8 +59,10 @@ def split_package(package):
|
|||
build = split[-1][:-len(slackr)]
|
||||
elif build.endswith(slonly):
|
||||
build = split[-1][:-len(slonly)]
|
||||
elif build.endswith(ktown):
|
||||
build = split[-1][:-len(ktown)]
|
||||
elif (slack + compat) in build:
|
||||
build = split[-1][:-len(slack + compat)]
|
||||
elif build.endswith(compat):
|
||||
build = split[-1][:-len(compat)]
|
||||
|
||||
arch = split[-2]
|
||||
ver = split[-3]
|
||||
|
|
Loading…
Add table
Reference in a new issue