mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-20 10:26:44 +01:00
added ktown repository
This commit is contained in:
parent
a4b081d862
commit
a679e27f4b
18 changed files with 291 additions and 98 deletions
|
@ -1,12 +1,13 @@
|
||||||
Version 2.1.5-dev
|
Version 2.1.5-dev
|
||||||
18-12-2014
|
22-12-2014
|
||||||
|
|
||||||
[Feature] - Added slacker.it and slackonly.com repositories.
|
[Feature] - Added slacker.it, slackonly.com, Alien's ktown repositories.
|
||||||
- Added command 're-create'.
|
- Added command 're-create'.
|
||||||
- Added command 'repolist'.
|
- Added command 'repolist'.
|
||||||
- Added command 'repoinfo'.
|
- Added command 'repoinfo'.
|
||||||
|
|
||||||
[Updated] - Fix Slackware current upgrade checksums.
|
[Updated] - Fix Slackware current upgrade checksums.
|
||||||
|
- Fix ingore hiden files in /var/log/packages/ path.
|
||||||
|
|
||||||
Version 2.1.4-dev
|
Version 2.1.4-dev
|
||||||
16-12-2014
|
16-12-2014
|
||||||
|
|
55
README.rst
55
README.rst
|
@ -37,7 +37,7 @@ Supported Repositories:
|
||||||
- Slack - `Repository <http://www.slackware.com/>`_
|
- Slack - `Repository <http://www.slackware.com/>`_
|
||||||
Arch: {x86, x86_64}
|
Arch: {x86, x86_64}
|
||||||
Versions: {3.3, 8.1, 9.0, 9.1, 10.0, 10.1, 10.2, 11.0, 12.0, 12.2, 13.0, 13.37, 14.0, 14.1, current}
|
Versions: {3.3, 8.1, 9.0, 9.1, 10.0, 10.1, 10.2, 11.0, 12.0, 12.2, 13.0, 13.37, 14.0, 14.1, current}
|
||||||
- Alien - `Repository <http://www.slackware.com/~alien/slackbuilds/>`_
|
- Alien's - `Repository <http://www.slackware.com/~alien/slackbuilds/>`_
|
||||||
Arch: {x86, x86_64}
|
Arch: {x86, x86_64}
|
||||||
Versions: {11.0, 12.0, 12.1, 12.2, 13.0, 13.1, 13.37, 14.0, 14.1, current}
|
Versions: {11.0, 12.0, 12.1, 12.2, 13.0, 13.1, 13.37, 14.0, 14.1, current}
|
||||||
- Slacky - `Repository <http://repository.slacky.eu/>`_
|
- Slacky - `Repository <http://repository.slacky.eu/>`_
|
||||||
|
@ -55,6 +55,9 @@ Supported Repositories:
|
||||||
- Slackonly - `Repository <https://slackonly.com/>`_
|
- Slackonly - `Repository <https://slackonly.com/>`_
|
||||||
Arch: {x86, x86_64}
|
Arch: {x86, x86_64}
|
||||||
Versions: {14.1}
|
Versions: {14.1}
|
||||||
|
- Alien's ktown - `Repository <http://alien.slackbook.org/ktown/>`_
|
||||||
|
Arch: {x86, x86_64}
|
||||||
|
Versions: {13.37, 14.0, 14.1, current}
|
||||||
|
|
||||||
* Choose repositories you need to work from file '/etc/slpkg/slpkg.conf' default is
|
* 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.
|
'slack' and 'sbo' repositories and read REPOSITORIES file for each of the particularities.
|
||||||
|
@ -239,7 +242,55 @@ Command Line Tool Usage
|
||||||
Slpkg Examples
|
Slpkg Examples
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Find packages from slackbuilds.org download,
|
If you use slpkg for the first time will have to create
|
||||||
|
and update the package lists:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ slpkg update
|
||||||
|
|
||||||
|
Update repository slack .......................Done
|
||||||
|
Update repository sbo .............Done
|
||||||
|
Update repository alien ...Done
|
||||||
|
Update repository slacky .....................................Done
|
||||||
|
Update repository studio ...................Done
|
||||||
|
Update repository slackr .............................................Done
|
||||||
|
Update repository slonly ...Done
|
||||||
|
Update repository ktown ...Done
|
||||||
|
|
||||||
|
Take information repositories with commands:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ slpkg repolist
|
||||||
|
|
||||||
|
+==============================================================================
|
||||||
|
| Repo id Repo name Status
|
||||||
|
+==============================================================================
|
||||||
|
alien http://www.slackware.com/~alien/slackbuilds/ enabled
|
||||||
|
ktown http://alien.slackbook.org/ktown/ enabled
|
||||||
|
rlw http://rlworkman.net/pkgs/ enabled
|
||||||
|
sbo http://slackbuilds.org/slackbuilds/ enabled
|
||||||
|
slack http://ftp.cc.uoc.gr/mirrors/linux/slackware/ enabled
|
||||||
|
slackr http://www.slackers.it/repository/ disabled
|
||||||
|
slacky http://repository.slacky.eu/ enabled
|
||||||
|
slonly https://slackonly.com/pub/packages/ enabled
|
||||||
|
studio http://studioware.org/files/packages/ enabled
|
||||||
|
|
||||||
|
For enable or disable repositories edit '/etc/slpkg/slpkg.conf' file
|
||||||
|
|
||||||
|
$ slpkg repoinfo alien
|
||||||
|
|
||||||
|
Last updated: Tue Dec 23 11:48:31 UTC 2014
|
||||||
|
Number of packages: 3149
|
||||||
|
Repo id: alien
|
||||||
|
Repo url: http://www.slackware.com/~alien/slackbuilds/
|
||||||
|
Status: enabled
|
||||||
|
Total compressed packages: 9.3 Gb
|
||||||
|
Total uncompressed packages: 36.31 Gb
|
||||||
|
|
||||||
|
|
||||||
|
Find packages from repository download,
|
||||||
build and install with all dependencies :
|
build and install with all dependencies :
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
|
@ -16,7 +16,7 @@ Rworkman's (rlw) repository use dependencies where displayed in central site
|
||||||
'http://rlworkman.net/pkgs/' and only those. Unfortunately there is no fixed reference
|
'http://rlworkman.net/pkgs/' and only those. Unfortunately there is no fixed reference
|
||||||
dependencies file PACKAGES.TXT.
|
dependencies file PACKAGES.TXT.
|
||||||
|
|
||||||
Studioware (studio) repository has no reference dependencies.
|
Studioware (studio) and Alien's ktown (ktown)repository has no reference dependencies.
|
||||||
|
|
||||||
Slackers.it (slackr) repository be used only from Slackware64 current users.
|
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
|
Also find in some packages will not show package description when you run the command
|
||||||
|
|
|
@ -24,8 +24,12 @@
|
||||||
VERSION=stable
|
VERSION=stable
|
||||||
|
|
||||||
# Choose repositories want to work.
|
# Choose repositories want to work.
|
||||||
# Available repositories : slack,sbo,alien,rlw,slacky,studio,slackr,slonly
|
# Available repositories : slack,sbo,alien,rlw,slacky,studio,slackr,slonly,
|
||||||
|
# ktown{latest}
|
||||||
# slackr (slackers.it) repository only for Slackware64 current.
|
# slackr (slackers.it) repository only for Slackware64 current.
|
||||||
|
# Ktown (Alien's ktown http://alien.slackbook.org/ktown/) repository
|
||||||
|
# should be in the form 'ktown{SUB_REPOSITORY}' example: ktown{latest} or
|
||||||
|
# or ktown{4.13.3} or ktown{5} for current users etc. Default is ktown{latest}.
|
||||||
REPOSITORIES=slack,sbo
|
REPOSITORIES=slack,sbo
|
||||||
|
|
||||||
# Build directory for repository slackbuilds.org. In this directory
|
# Build directory for repository slackbuilds.org. In this directory
|
||||||
|
|
|
@ -66,17 +66,17 @@ Optional arguments:
|
||||||
.SH REPOSITORIES
|
.SH REPOSITORIES
|
||||||
slackware.com = 'slack'
|
slackware.com = 'slack'
|
||||||
SlackBuilds.org = 'sbo'
|
SlackBuilds.org = 'sbo'
|
||||||
AlienBob = 'alien'
|
Alien's = 'alien'
|
||||||
slacky.eu = 'slacky'
|
slacky.eu = 'slacky'
|
||||||
rworkman's = 'rlw'
|
rworkman's = 'rlw'
|
||||||
studioware.org = 'studio'
|
studioware.org = 'studio'
|
||||||
slacker.it = 'slackr'
|
slacker.it = 'slackr'
|
||||||
slackonly.com = 'slonly'
|
slackonly.com = 'slonly'
|
||||||
|
Alien's ktown = 'ktown'
|
||||||
|
|
||||||
Default enable repository is 'slack' and 'sbo'.
|
Default enable repository is 'slack' and 'sbo'.
|
||||||
Add or remove repository in configuration file '/etc/slpkg/slpkg.conf'
|
Add or remove repository in configuration file '/etc/slpkg/slpkg.conf'
|
||||||
|
|
||||||
|
|
||||||
.SH COLORS
|
.SH COLORS
|
||||||
red, green, yellow, cyan, grey
|
red, green, yellow, cyan, grey
|
||||||
.PP
|
.PP
|
||||||
|
|
|
@ -43,8 +43,22 @@ repositories = [
|
||||||
'slacky',
|
'slacky',
|
||||||
'studio',
|
'studio',
|
||||||
'slackr',
|
'slackr',
|
||||||
'slonly'
|
'slonly',
|
||||||
|
'ktown{latest}'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def ktown_repo(repositories):
|
||||||
|
'''
|
||||||
|
Find if ktown repositories enabled then
|
||||||
|
take SUB_REPOSITORY
|
||||||
|
'''
|
||||||
|
for i, repo in enumerate(repositories):
|
||||||
|
if 'ktown' in repo:
|
||||||
|
sub = repositories[i].replace('ktown', '')
|
||||||
|
repositories[i] = 'ktown'
|
||||||
|
return sub
|
||||||
|
|
||||||
build_path = "/tmp/slpkg/build/"
|
build_path = "/tmp/slpkg/build/"
|
||||||
slpkg_tmp_packages = tmp + "slpkg/packages/"
|
slpkg_tmp_packages = tmp + "slpkg/packages/"
|
||||||
slpkg_tmp_patches = tmp + "slpkg/patches/"
|
slpkg_tmp_patches = tmp + "slpkg/patches/"
|
||||||
|
@ -95,6 +109,8 @@ if os.path.isfile("/etc/slpkg/slpkg.conf"):
|
||||||
if line.startswith("USE_COLORS"):
|
if line.startswith("USE_COLORS"):
|
||||||
use_colors = line[11:].strip()
|
use_colors = line[11:].strip()
|
||||||
|
|
||||||
|
ktown_kde_repo = ktown_repo(repositories)
|
||||||
|
|
||||||
color = {
|
color = {
|
||||||
'RED': '\x1b[31m',
|
'RED': '\x1b[31m',
|
||||||
'GREEN': '\x1b[32m',
|
'GREEN': '\x1b[32m',
|
||||||
|
|
|
@ -56,7 +56,8 @@ class PkgDesc(object):
|
||||||
'slacky': 'slacky_repo/PACKAGES.TXT',
|
'slacky': 'slacky_repo/PACKAGES.TXT',
|
||||||
'studio': 'studio_repo/PACKAGES.TXT',
|
'studio': 'studio_repo/PACKAGES.TXT',
|
||||||
'slackr': 'slackr_repo/PACKAGES.TXT',
|
'slackr': 'slackr_repo/PACKAGES.TXT',
|
||||||
'slonly': 'slonly_repo/PACKAGES.TXT'
|
'slonly': 'slonly_repo/PACKAGES.TXT',
|
||||||
|
'ktown': 'ktown_repo/PACKAGES.TXT'
|
||||||
}
|
}
|
||||||
self.lib = lib_path + repos[self.repo]
|
self.lib = lib_path + repos[self.repo]
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,8 @@ def pkg_checksum(binary, repo):
|
||||||
'slacky': 'slacky_repo/CHECKSUMS.md5',
|
'slacky': 'slacky_repo/CHECKSUMS.md5',
|
||||||
'studio': 'studio_repo/CHECKSUMS.md5',
|
'studio': 'studio_repo/CHECKSUMS.md5',
|
||||||
'slackr': 'slackr_repo/CHECKSUMS.md5',
|
'slackr': 'slackr_repo/CHECKSUMS.md5',
|
||||||
'slonly': 'slonly_repo/CHECKSUMS.md5'
|
'slonly': 'slonly_repo/CHECKSUMS.md5',
|
||||||
|
'ktown': 'ktown_repo/CHECKSUMS.md5'
|
||||||
}
|
}
|
||||||
lib = repos[repo]
|
lib = repos[repo]
|
||||||
f = open(lib_path + lib, "r")
|
f = open(lib_path + lib, "r")
|
||||||
|
|
|
@ -288,6 +288,31 @@ 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 ktown(self):
|
||||||
|
'''
|
||||||
|
Creating alien ktown local library
|
||||||
|
'''
|
||||||
|
repo = Repo().ktown()
|
||||||
|
log = log_path + "ktown/"
|
||||||
|
lib = lib_path + "ktown_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
|
@staticmethod
|
||||||
def write(path, data_file, file_url):
|
def write(path, data_file, file_url):
|
||||||
'''
|
'''
|
||||||
|
@ -401,7 +426,8 @@ class Update(object):
|
||||||
'slacky': Initialization().slacky,
|
'slacky': Initialization().slacky,
|
||||||
'studio': Initialization().studioware,
|
'studio': Initialization().studioware,
|
||||||
'slackr': Initialization().slackers,
|
'slackr': Initialization().slackers,
|
||||||
'slonly': Initialization().slackonly
|
'slonly': Initialization().slackonly,
|
||||||
|
'ktown': Initialization().ktown
|
||||||
}
|
}
|
||||||
|
|
||||||
def repository(self):
|
def repository(self):
|
||||||
|
|
|
@ -90,6 +90,9 @@ class Case(object):
|
||||||
def slackonly_install(self):
|
def slackonly_install(self):
|
||||||
OthersInstall(self.package, "slonly", self.release).start()
|
OthersInstall(self.package, "slonly", self.release).start()
|
||||||
|
|
||||||
|
def ktown_install(self):
|
||||||
|
OthersInstall(self.package, "ktown", self.release).start()
|
||||||
|
|
||||||
def sbo_upgrade(self):
|
def sbo_upgrade(self):
|
||||||
SBoCheck().start()
|
SBoCheck().start()
|
||||||
|
|
||||||
|
@ -114,6 +117,9 @@ class Case(object):
|
||||||
def slackonly_upgrade(self):
|
def slackonly_upgrade(self):
|
||||||
OthersUpgrade("slonly", self.release).start()
|
OthersUpgrade("slonly", self.release).start()
|
||||||
|
|
||||||
|
def ktown_upgrade(self):
|
||||||
|
OthersUpgrade("ktown", self.release).start()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
@ -150,6 +156,7 @@ def main():
|
||||||
|
|
||||||
if (len(args) == 2 and args[0] == "repoinfo" and
|
if (len(args) == 2 and args[0] == "repoinfo" and
|
||||||
args[1] in RepoList().all_repos):
|
args[1] in RepoList().all_repos):
|
||||||
|
del RepoList().all_repos
|
||||||
RepoInfo().view(args[1])
|
RepoInfo().view(args[1])
|
||||||
|
|
||||||
if len(args) == 3 and args[0] == "-a":
|
if len(args) == 3 and args[0] == "-a":
|
||||||
|
@ -170,7 +177,8 @@ def main():
|
||||||
'slacky': pkg.slacky_upgrade,
|
'slacky': pkg.slacky_upgrade,
|
||||||
'studio': pkg.studioware_upgrade,
|
'studio': pkg.studioware_upgrade,
|
||||||
'slackr': pkg.slackers_upgrade,
|
'slackr': pkg.slackers_upgrade,
|
||||||
'slonly': pkg.slackonly_upgrade
|
'slonly': pkg.slackonly_upgrade,
|
||||||
|
'ktown': pkg.ktown_upgrade
|
||||||
}
|
}
|
||||||
if args[1] in repositories:
|
if args[1] in repositories:
|
||||||
upgrade[args[1]]()
|
upgrade[args[1]]()
|
||||||
|
@ -186,7 +194,8 @@ def main():
|
||||||
'slacky': pkg.slacky_install,
|
'slacky': pkg.slacky_install,
|
||||||
'studio': pkg.studioware_install,
|
'studio': pkg.studioware_install,
|
||||||
'slackr': pkg.slackers_install,
|
'slackr': pkg.slackers_install,
|
||||||
'slonly': pkg.slackonly_install
|
'slonly': pkg.slackonly_install,
|
||||||
|
'ktown': pkg.ktown_install
|
||||||
}
|
}
|
||||||
if args[1] in repositories:
|
if args[1] in repositories:
|
||||||
install[args[1]]()
|
install[args[1]]()
|
||||||
|
|
|
@ -54,51 +54,70 @@ class OthersUpgrade(object):
|
||||||
self.repo = repo
|
self.repo = repo
|
||||||
self.version = version
|
self.version = version
|
||||||
self.tmp_path = slpkg_tmp_packages
|
self.tmp_path = slpkg_tmp_packages
|
||||||
repos = Repo()
|
|
||||||
sys.stdout.write("{0}Reading package lists ...{1}".format(
|
sys.stdout.write("{0}Reading package lists ...{1}".format(
|
||||||
color['GREY'], color['ENDC']))
|
color['GREY'], color['ENDC']))
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
self.step = 700
|
self.step = 700
|
||||||
repos = Repo()
|
init_repos = {
|
||||||
if self.repo == "rlw":
|
'rlw': self._init_rlw,
|
||||||
lib = lib_path + "rlw_repo/PACKAGES.TXT"
|
'alien': self._init_alien,
|
||||||
self.mirror = "{0}{1}/".format(repos.rlw(), slack_ver())
|
'slacky': self._init_slacky,
|
||||||
elif self.repo == "alien":
|
'studio': self._init_studio,
|
||||||
lib = lib_path + "alien_repo/PACKAGES.TXT"
|
'slackr': self._init_slackr,
|
||||||
self.mirror = repos.alien()
|
'slonly': self._init_slonly,
|
||||||
self.step = self.step * 2
|
'ktown': self._init_ktown
|
||||||
elif self.repo == "slacky":
|
}
|
||||||
lib = lib_path + "slacky_repo/PACKAGES.TXT"
|
init_repos[self.repo]()
|
||||||
arch = ""
|
|
||||||
if os.uname()[4] == "x86_64":
|
|
||||||
arch = "64"
|
|
||||||
self.mirror = "{0}slackware{1}-{2}/".format(repos.slacky(), arch,
|
|
||||||
slack_ver())
|
|
||||||
self.step = self.step * 2
|
|
||||||
elif self.repo == "studio":
|
|
||||||
lib = lib_path + "studio_repo/PACKAGES.TXT"
|
|
||||||
arch = ""
|
|
||||||
if os.uname()[4] == "x86_64":
|
|
||||||
arch = "64"
|
|
||||||
self.mirror = "{0}slackware{1}-{2}/".format(repos.studioware(),
|
|
||||||
arch, slack_ver())
|
|
||||||
self.step = self.step * 2
|
|
||||||
elif self.repo == "slackr":
|
|
||||||
lib = lib_path + "slackr_repo/PACKAGES.TXT"
|
|
||||||
self.mirror = repos.slackers()
|
|
||||||
self.step = self.step * 2
|
|
||||||
elif self.repo == "slonly":
|
|
||||||
lib = lib_path + "slonly_repo/PACKAGES.TXT"
|
|
||||||
arch = "{0}-x86".format(slack_ver())
|
|
||||||
if os.uname()[4] == "x86_64":
|
|
||||||
arch = "{0}-x86_64".format(slack_ver())
|
|
||||||
self.mirror = "{0}{1}/".format(repos.slackonly(), arch)
|
|
||||||
self.step = self.step * 3
|
|
||||||
|
|
||||||
f = open(lib, "r")
|
f = open(self.lib, "r")
|
||||||
self.PACKAGES_TXT = f.read()
|
self.PACKAGES_TXT = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
def _init_rlw(self):
|
||||||
|
self.lib = lib_path + "rlw_repo/PACKAGES.TXT"
|
||||||
|
self.mirror = "{0}{1}/".format(Repo().rlw(), slack_ver())
|
||||||
|
|
||||||
|
def _init_alien(self):
|
||||||
|
self.lib = lib_path + "alien_repo/PACKAGES.TXT"
|
||||||
|
self.mirror = Repo().alien()
|
||||||
|
self.step = self.step * 2
|
||||||
|
|
||||||
|
def _init_slacky(self):
|
||||||
|
self.lib = lib_path + "slacky_repo/PACKAGES.TXT"
|
||||||
|
arch = ""
|
||||||
|
if os.uname()[4] == "x86_64":
|
||||||
|
arch = "64"
|
||||||
|
self.mirror = "{0}slackware{1}-{2}/".format(Repo().slacky(), arch,
|
||||||
|
slack_ver())
|
||||||
|
self.step = self.step * 2
|
||||||
|
|
||||||
|
def _init_studio(self):
|
||||||
|
self.lib = lib_path + "studio_repo/PACKAGES.TXT"
|
||||||
|
arch = ""
|
||||||
|
if os.uname()[4] == "x86_64":
|
||||||
|
arch = "64"
|
||||||
|
self.mirror = "{0}slackware{1}-{2}/".format(Repo().studioware(),
|
||||||
|
arch, slack_ver())
|
||||||
|
self.step = self.step * 2
|
||||||
|
|
||||||
|
def _init_slackr(self):
|
||||||
|
self.lib = lib_path + "slackr_repo/PACKAGES.TXT"
|
||||||
|
self.mirror = Repo().slackers()
|
||||||
|
self.step = self.step * 2
|
||||||
|
|
||||||
|
def _init_slonly(self):
|
||||||
|
self.lib = lib_path + "slonly_repo/PACKAGES.TXT"
|
||||||
|
arch = "{0}-x86".format(slack_ver())
|
||||||
|
if os.uname()[4] == "x86_64":
|
||||||
|
arch = "{0}-x86_64".format(slack_ver())
|
||||||
|
self.mirror = "{0}{1}/".format(Repo().slackonly(), arch)
|
||||||
|
self.step = self.step * 3
|
||||||
|
|
||||||
|
def _init_ktown(self):
|
||||||
|
self.lib = lib_path + "ktown_repo/PACKAGES.TXT"
|
||||||
|
self.mirror = Repo().ktown()
|
||||||
|
self.step = self.step * 2
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
'''
|
'''
|
||||||
Install packages from official Slackware distribution
|
Install packages from official Slackware distribution
|
||||||
|
@ -184,7 +203,8 @@ class OthersUpgrade(object):
|
||||||
'slacky': 'sl',
|
'slacky': 'sl',
|
||||||
'studio': 'se',
|
'studio': 'se',
|
||||||
'slackr': 'cf',
|
'slackr': 'cf',
|
||||||
'slonly': '_slack'
|
'slonly': '_slack',
|
||||||
|
'ktown': 'alien'
|
||||||
}
|
}
|
||||||
repo = repository[self.repo]
|
repo = repository[self.repo]
|
||||||
for pkg in os.listdir(pkg_path):
|
for pkg in os.listdir(pkg_path):
|
||||||
|
@ -205,7 +225,8 @@ def views(upgrade_all, comp_sum, repository):
|
||||||
'slacky': '',
|
'slacky': '',
|
||||||
'studio': '',
|
'studio': '',
|
||||||
'slackr': '',
|
'slackr': '',
|
||||||
'slonly': ''
|
'slonly': '',
|
||||||
|
'ktown': ' '
|
||||||
}
|
}
|
||||||
repository += align[repository]
|
repository += align[repository]
|
||||||
for pkg, comp in zip(upgrade_all, comp_sum):
|
for pkg, comp in zip(upgrade_all, comp_sum):
|
||||||
|
|
|
@ -24,9 +24,12 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from slpkg.toolbar import status
|
from slpkg.toolbar import status
|
||||||
from slpkg.__metadata__ import lib_path
|
|
||||||
from slpkg.splitting import split_package
|
from slpkg.splitting import split_package
|
||||||
from slpkg.slack.slack_version import slack_ver
|
from slpkg.slack.slack_version import slack_ver
|
||||||
|
from slpkg.__metadata__ import (
|
||||||
|
lib_path,
|
||||||
|
ktown_kde_repo
|
||||||
|
)
|
||||||
|
|
||||||
len_deps = 0
|
len_deps = 0
|
||||||
|
|
||||||
|
@ -64,6 +67,12 @@ def repo_data(PACKAGES_TXT, step, repo, version):
|
||||||
rsize,
|
rsize,
|
||||||
runsize
|
runsize
|
||||||
) = alien_filter(name, location, size, unsize, version)
|
) = alien_filter(name, location, size, unsize, version)
|
||||||
|
elif repo == "ktown":
|
||||||
|
(rname,
|
||||||
|
rlocation,
|
||||||
|
rsize,
|
||||||
|
runsize
|
||||||
|
) = ktown_filter(name, location, size, unsize, version)
|
||||||
elif repo in ["slacky", "studio", "slackr", "slonly"]:
|
elif repo in ["slacky", "studio", "slackr", "slonly"]:
|
||||||
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]
|
||||||
|
@ -107,6 +116,26 @@ def alien_filter(name, location, size, unsize, version):
|
||||||
return [fname, flocation, fsize, funsize]
|
return [fname, flocation, fsize, funsize]
|
||||||
|
|
||||||
|
|
||||||
|
def ktown_filter(name, location, size, unsize, version):
|
||||||
|
'''
|
||||||
|
Filter alien repository data
|
||||||
|
'''
|
||||||
|
ver = slack_ver()
|
||||||
|
if version == "current":
|
||||||
|
ver = "current"
|
||||||
|
path_pkg = "x86"
|
||||||
|
if os.uname()[4] == "x86_64":
|
||||||
|
path_pkg = os.uname()[4]
|
||||||
|
(fname, flocation, fsize, funsize) = ([] for i in range(4))
|
||||||
|
for n, l, s, u in zip(name, location, size, unsize):
|
||||||
|
if path_pkg in l and ktown_kde_repo[1:-1] in l and 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):
|
def fix_slackers_pkg(name):
|
||||||
'''
|
'''
|
||||||
Fix 'PACKAGE NAME:' from PACKAGES.TXT file
|
Fix 'PACKAGE NAME:' from PACKAGES.TXT file
|
||||||
|
|
|
@ -66,54 +66,73 @@ class OthersInstall(object):
|
||||||
repo == "slacky"):
|
repo == "slacky"):
|
||||||
slacky_error()
|
slacky_error()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
repos = Repo()
|
|
||||||
print("\nPackages with name matching [ {0}{1}{2} ]\n".format(
|
print("\nPackages with name matching [ {0}{1}{2} ]\n".format(
|
||||||
color['CYAN'], self.package, color['ENDC']))
|
color['CYAN'], self.package, color['ENDC']))
|
||||||
sys.stdout.write("{0}Reading package lists ...{1}".format(
|
sys.stdout.write("{0}Reading package lists ...{1}".format(
|
||||||
color['GREY'], color['ENDC']))
|
color['GREY'], color['ENDC']))
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
self.step = 700
|
self.step = 700
|
||||||
repos = Repo()
|
init_repos = {
|
||||||
if self.repo == "rlw":
|
'rlw': self._init_rlw,
|
||||||
lib = lib_path + "rlw_repo/PACKAGES.TXT"
|
'alien': self._init_alien,
|
||||||
self.mirror = "{0}{1}/".format(repos.rlw(), slack_ver())
|
'slacky': self._init_slacky,
|
||||||
elif self.repo == "alien":
|
'studio': self._init_studio,
|
||||||
lib = lib_path + "alien_repo/PACKAGES.TXT"
|
'slackr': self._init_slackr,
|
||||||
self.mirror = repos.alien()
|
'slonly': self._init_slonly,
|
||||||
self.step = self.step * 2
|
'ktown': self._init_ktown
|
||||||
elif self.repo == "slacky":
|
}
|
||||||
lib = lib_path + "slacky_repo/PACKAGES.TXT"
|
init_repos[self.repo]()
|
||||||
arch = ""
|
|
||||||
if os.uname()[4] == "x86_64":
|
|
||||||
arch = "64"
|
|
||||||
self.mirror = "{0}slackware{1}-{2}/".format(repos.slacky(), arch,
|
|
||||||
slack_ver())
|
|
||||||
self.step = self.step * 2
|
|
||||||
elif self.repo == "studio":
|
|
||||||
lib = lib_path + "studio_repo/PACKAGES.TXT"
|
|
||||||
arch = ""
|
|
||||||
if os.uname()[4] == "x86_64":
|
|
||||||
arch = "64"
|
|
||||||
self.mirror = "{0}slackware{1}-{2}/".format(repos.studioware(),
|
|
||||||
arch, slack_ver())
|
|
||||||
self.step = self.step * 2
|
|
||||||
elif self.repo == "slackr":
|
|
||||||
lib = lib_path + "slackr_repo/PACKAGES.TXT"
|
|
||||||
self.mirror = repos.slackers()
|
|
||||||
self.step = self.step * 2
|
|
||||||
elif self.repo == "slonly":
|
|
||||||
lib = lib_path + "slonly_repo/PACKAGES.TXT"
|
|
||||||
arch = "{0}-x86".format(slack_ver())
|
|
||||||
if os.uname()[4] == "x86_64":
|
|
||||||
arch = "{0}-x86_64".format(slack_ver())
|
|
||||||
self.mirror = "{0}{1}/".format(repos.slackonly(), arch)
|
|
||||||
self.step = self.step * 3
|
|
||||||
|
|
||||||
f = open(lib, "r")
|
f = open(self.lib, "r")
|
||||||
self.PACKAGES_TXT = f.read()
|
self.PACKAGES_TXT = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
sys.stdout.write("{0}Done{1}\n".format(color['GREY'], color['ENDC']))
|
sys.stdout.write("{0}Done{1}\n".format(color['GREY'], color['ENDC']))
|
||||||
|
|
||||||
|
def _init_rlw(self):
|
||||||
|
self.lib = lib_path + "rlw_repo/PACKAGES.TXT"
|
||||||
|
self.mirror = "{0}{1}/".format(Repo().rlw(), slack_ver())
|
||||||
|
|
||||||
|
def _init_alien(self):
|
||||||
|
self.lib = lib_path + "alien_repo/PACKAGES.TXT"
|
||||||
|
self.mirror = Repo().alien()
|
||||||
|
self.step = self.step * 2
|
||||||
|
|
||||||
|
def _init_slacky(self):
|
||||||
|
self.lib = lib_path + "slacky_repo/PACKAGES.TXT"
|
||||||
|
arch = ""
|
||||||
|
if os.uname()[4] == "x86_64":
|
||||||
|
arch = "64"
|
||||||
|
self.mirror = "{0}slackware{1}-{2}/".format(Repo().slacky(), arch,
|
||||||
|
slack_ver())
|
||||||
|
self.step = self.step * 2
|
||||||
|
|
||||||
|
def _init_studio(self):
|
||||||
|
self.lib = lib_path + "studio_repo/PACKAGES.TXT"
|
||||||
|
arch = ""
|
||||||
|
if os.uname()[4] == "x86_64":
|
||||||
|
arch = "64"
|
||||||
|
self.mirror = "{0}slackware{1}-{2}/".format(Repo().studioware(),
|
||||||
|
arch, slack_ver())
|
||||||
|
self.step = self.step * 2
|
||||||
|
|
||||||
|
def _init_slackr(self):
|
||||||
|
self.lib = lib_path + "slackr_repo/PACKAGES.TXT"
|
||||||
|
self.mirror = Repo().slackers()
|
||||||
|
self.step = self.step * 2
|
||||||
|
|
||||||
|
def _init_slonly(self):
|
||||||
|
self.lib = lib_path + "slonly_repo/PACKAGES.TXT"
|
||||||
|
arch = "{0}-x86".format(slack_ver())
|
||||||
|
if os.uname()[4] == "x86_64":
|
||||||
|
arch = "{0}-x86_64".format(slack_ver())
|
||||||
|
self.mirror = "{0}{1}/".format(Repo().slackonly(), arch)
|
||||||
|
self.step = self.step * 3
|
||||||
|
|
||||||
|
def _init_ktown(self):
|
||||||
|
self.lib = lib_path + "ktown_repo/PACKAGES.TXT"
|
||||||
|
self.mirror = Repo().ktown()
|
||||||
|
self.step = self.step * 2
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
'''
|
'''
|
||||||
Install packages from official Slackware distribution
|
Install packages from official Slackware distribution
|
||||||
|
@ -235,7 +254,8 @@ def views(install_all, comp_sum, repository, dependencies):
|
||||||
'slacky': '',
|
'slacky': '',
|
||||||
'studio': '',
|
'studio': '',
|
||||||
'slackr': '',
|
'slackr': '',
|
||||||
'slonly': ''
|
'slonly': '',
|
||||||
|
'ktown': ' '
|
||||||
}
|
}
|
||||||
repository += align[repository]
|
repository += align[repository]
|
||||||
for pkg, comp in zip(install_all, comp_sum):
|
for pkg, comp in zip(install_all, comp_sum):
|
||||||
|
|
|
@ -41,7 +41,8 @@ def search_pkg(name, repo):
|
||||||
'slacky': 'slacky_repo/PACKAGES.TXT',
|
'slacky': 'slacky_repo/PACKAGES.TXT',
|
||||||
'studio': 'studio_repo/PACKAGES.TXT',
|
'studio': 'studio_repo/PACKAGES.TXT',
|
||||||
'slackr': 'slackr_repo/PACKAGES.TXT',
|
'slackr': 'slackr_repo/PACKAGES.TXT',
|
||||||
'slonly': 'slonly_repo/PACKAGES.TXT'
|
'slonly': 'slonly_repo/PACKAGES.TXT',
|
||||||
|
'ktown': 'ktown_repo/PACKAGES.TXT'
|
||||||
}
|
}
|
||||||
with open(lib_path + repo_dir[repo], "r") as PACKAGES_TXT:
|
with open(lib_path + repo_dir[repo], "r") as PACKAGES_TXT:
|
||||||
for line in PACKAGES_TXT:
|
for line in PACKAGES_TXT:
|
||||||
|
|
|
@ -34,6 +34,7 @@ def find_package(find_pkg, directory):
|
||||||
pkgs = []
|
pkgs = []
|
||||||
blacklist = BlackList().packages()
|
blacklist = BlackList().packages()
|
||||||
for pkg in sorted(os.listdir(directory)):
|
for pkg in sorted(os.listdir(directory)):
|
||||||
if pkg.startswith(find_pkg)and split_package(pkg)[0] not in blacklist:
|
if (not pkg.startswith('.') and pkg.startswith(find_pkg)
|
||||||
|
and split_package(pkg)[0] not in blacklist):
|
||||||
pkgs.append(pkg)
|
pkgs.append(pkg)
|
||||||
return pkgs
|
return pkgs
|
||||||
|
|
|
@ -43,7 +43,8 @@ class RepoList(object):
|
||||||
'slacky': Repo().slacky(),
|
'slacky': Repo().slacky(),
|
||||||
'studio': Repo().studioware(),
|
'studio': Repo().studioware(),
|
||||||
'slackr': Repo().slackers(),
|
'slackr': Repo().slackers(),
|
||||||
'slonly': Repo().slackonly()
|
'slonly': Repo().slackonly(),
|
||||||
|
'ktown': Repo().ktown()
|
||||||
}
|
}
|
||||||
|
|
||||||
def repos(self):
|
def repos(self):
|
||||||
|
|
|
@ -86,3 +86,9 @@ class Repo(object):
|
||||||
Slackonly.com repository
|
Slackonly.com repository
|
||||||
'''
|
'''
|
||||||
return "https://slackonly.com/pub/packages/"
|
return "https://slackonly.com/pub/packages/"
|
||||||
|
|
||||||
|
def ktown(self):
|
||||||
|
'''
|
||||||
|
Alien ktown repository
|
||||||
|
'''
|
||||||
|
return "http://alien.slackbook.org/ktown/"
|
||||||
|
|
|
@ -36,9 +36,11 @@ def split_package(package):
|
||||||
alien = "alien"
|
alien = "alien"
|
||||||
slacky = "sl"
|
slacky = "sl"
|
||||||
studio = "se"
|
studio = "se"
|
||||||
slacks = "cf"
|
slackr = "cf"
|
||||||
slonly = "_slack"
|
slonly = "_slack"
|
||||||
|
ktown = "alien"
|
||||||
build = split[-1]
|
build = split[-1]
|
||||||
|
|
||||||
if build.endswith(sbo):
|
if build.endswith(sbo):
|
||||||
build = split[-1][:-4] # and remove .t?z extension
|
build = split[-1][:-4] # and remove .t?z extension
|
||||||
if build.endswith(slack):
|
if build.endswith(slack):
|
||||||
|
@ -51,10 +53,13 @@ def split_package(package):
|
||||||
build = split[-1][:-len(slacky)]
|
build = split[-1][:-len(slacky)]
|
||||||
elif build.endswith(studio):
|
elif build.endswith(studio):
|
||||||
build = split[-1][:-len(studio)]
|
build = split[-1][:-len(studio)]
|
||||||
elif build.endswith(slacks):
|
elif build.endswith(slackr):
|
||||||
build = split[-1][:-len(slacks)]
|
build = split[-1][:-len(slackr)]
|
||||||
elif build.endswith(slonly):
|
elif build.endswith(slonly):
|
||||||
build = split[-1][:-len(slonly)]
|
build = split[-1][:-len(slonly)]
|
||||||
|
elif build.endswith(ktown):
|
||||||
|
build = split[-1][:-len(ktown)]
|
||||||
|
|
||||||
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