mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-20 10:26:44 +01:00
added slackers.it repository
This commit is contained in:
parent
eb78b20354
commit
b912758f4a
16 changed files with 176 additions and 37 deletions
|
@ -49,6 +49,9 @@ Supported Repositories:
|
||||||
- Studioware - `Repository <http://studioware.org/packages>`_
|
- Studioware - `Repository <http://studioware.org/packages>`_
|
||||||
Arch: {x86, x86_64}
|
Arch: {x86, x86_64}
|
||||||
Versions: {13.37, 14.0, 14.1}
|
Versions: {13.37, 14.0, 14.1}
|
||||||
|
- Slackers - `Repository <http://www.slackers.it/repository/>`_
|
||||||
|
Arch: {x86_64}
|
||||||
|
Versions: {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
|
||||||
all repositories.
|
all repositories.
|
||||||
|
@ -746,3 +749,9 @@ Man page it is available for full support:
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ man slpkg
|
$ man slpkg
|
||||||
|
|
||||||
|
|
||||||
|
Donate
|
||||||
|
--------
|
||||||
|
If you feel satisfied with this project and want to thank me go
|
||||||
|
to `Slackware <https://store.slackware.com/cgi-bin/store/slackdonation>`_ and make a donation or visit the `store <https://store.slackware.com/cgi-bin/store>`_.
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
VERSION=stable
|
VERSION=stable
|
||||||
|
|
||||||
# Choose repositories want to work.
|
# Choose repositories want to work.
|
||||||
# Available repositories : slack, sbo, alien, rlw, slacky, studio
|
# Available repositories : slack, sbo, alien, rlw, slacky, studio, slackr
|
||||||
|
# slackr (slackers.it) repository only for Slackware64 current.
|
||||||
REPOSITORIES=slack,sbo,alien,rlw,slacky,studio
|
REPOSITORIES=slack,sbo,alien,rlw,slacky,studio
|
||||||
|
|
||||||
# Build directory for repository slackbuilds.org. In this directory
|
# Build directory for repository slackbuilds.org. In this directory
|
||||||
|
|
|
@ -61,7 +61,14 @@ Optional arguments:
|
||||||
-d, [package...] display the contents
|
-d, [package...] display the contents
|
||||||
|
|
||||||
.SH REPOSITORIES
|
.SH REPOSITORIES
|
||||||
slack, sbo, alien, slacky, rlw, studio
|
slackware.com = 'slack'
|
||||||
|
SlackBuilds.org = 'sbo'
|
||||||
|
AlienBob = 'alien'
|
||||||
|
slacky.eu = 'slacky'
|
||||||
|
rworkman's = 'rlw'
|
||||||
|
studioware.org = 'studio'
|
||||||
|
slacker.it = 'slackr'
|
||||||
|
|
||||||
.SH COLORS
|
.SH COLORS
|
||||||
red, green, yellow, cyan, grey
|
red, green, yellow, cyan, grey
|
||||||
.PP
|
.PP
|
||||||
|
|
|
@ -10,7 +10,7 @@ config() {
|
||||||
|
|
||||||
CONFIGS="slpkg.conf blacklist slackware-mirrors"
|
CONFIGS="slpkg.conf blacklist slackware-mirrors"
|
||||||
for file in $CONFIGS; do
|
for file in $CONFIGS; do
|
||||||
config /etc/slpkg/${file}.new
|
config etc/slpkg/${file}.new
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -x /usr/bin/update-desktop-database ]; then
|
if [ -x /usr/bin/update-desktop-database ]; then
|
||||||
|
|
|
@ -42,7 +42,8 @@ repositories = [
|
||||||
'rlw',
|
'rlw',
|
||||||
'alien',
|
'alien',
|
||||||
'slacky',
|
'slacky',
|
||||||
'studio'
|
'studio',
|
||||||
|
'slackr'
|
||||||
]
|
]
|
||||||
build_path = "/tmp/slpkg/build/"
|
build_path = "/tmp/slpkg/build/"
|
||||||
slpkg_tmp_packages = tmp + "slpkg/packages/"
|
slpkg_tmp_packages = tmp + "slpkg/packages/"
|
||||||
|
|
|
@ -54,7 +54,8 @@ class PkgDesc(object):
|
||||||
'rlw': 'rlw_repo/PACKAGES.TXT',
|
'rlw': 'rlw_repo/PACKAGES.TXT',
|
||||||
'alien': 'alien_repo/PACKAGES.TXT',
|
'alien': 'alien_repo/PACKAGES.TXT',
|
||||||
'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'
|
||||||
}
|
}
|
||||||
self.lib = lib_path + repos[self.repo]
|
self.lib = lib_path + repos[self.repo]
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,8 @@ def pkg_checksum(binary, repo):
|
||||||
'rlw': 'rlw_repo/CHECKSUMS.md5',
|
'rlw': 'rlw_repo/CHECKSUMS.md5',
|
||||||
'alien': 'alien_repo/CHECKSUMS.md5',
|
'alien': 'alien_repo/CHECKSUMS.md5',
|
||||||
'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'
|
||||||
}
|
}
|
||||||
lib = repos[repo]
|
lib = repos[repo]
|
||||||
f = open(lib_path + lib, "r")
|
f = open(lib_path + lib, "r")
|
||||||
|
|
|
@ -67,6 +67,7 @@ class Initialization(object):
|
||||||
log = log_path + "slack/"
|
log = log_path + "slack/"
|
||||||
lib = lib_path + "slack_repo/"
|
lib = lib_path + "slack_repo/"
|
||||||
lib_file = "PACKAGES.TXT"
|
lib_file = "PACKAGES.TXT"
|
||||||
|
lst_file = ""
|
||||||
md5_file = "CHECKSUMS.md5"
|
md5_file = "CHECKSUMS.md5"
|
||||||
log_file = "ChangeLog.txt"
|
log_file = "ChangeLog.txt"
|
||||||
if not os.path.exists(log):
|
if not os.path.exists(log):
|
||||||
|
@ -74,6 +75,7 @@ class Initialization(object):
|
||||||
if not os.path.exists(lib):
|
if not os.path.exists(lib):
|
||||||
os.mkdir(lib)
|
os.mkdir(lib)
|
||||||
packages = mirrors(lib_file, "")
|
packages = mirrors(lib_file, "")
|
||||||
|
filelist_txt = ""
|
||||||
pkg_checksums = mirrors(md5_file, "")
|
pkg_checksums = mirrors(md5_file, "")
|
||||||
extra = mirrors(lib_file, "extra/")
|
extra = mirrors(lib_file, "extra/")
|
||||||
ext_checksums = mirrors(md5_file, "extra/")
|
ext_checksums = mirrors(md5_file, "extra/")
|
||||||
|
@ -88,7 +90,7 @@ class Initialization(object):
|
||||||
self.write(lib, md5_file, checksums_md5)
|
self.write(lib, md5_file, checksums_md5)
|
||||||
self.write(log, log_file, changelog_txt)
|
self.write(log, log_file, changelog_txt)
|
||||||
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)
|
md5_file, checksums_md5, lst_file, filelist_txt)
|
||||||
|
|
||||||
def sbo(self):
|
def sbo(self):
|
||||||
'''
|
'''
|
||||||
|
@ -98,6 +100,7 @@ class Initialization(object):
|
||||||
log = log_path + "sbo/"
|
log = log_path + "sbo/"
|
||||||
lib = lib_path + "sbo_repo/"
|
lib = lib_path + "sbo_repo/"
|
||||||
lib_file = "SLACKBUILDS.TXT"
|
lib_file = "SLACKBUILDS.TXT"
|
||||||
|
lst_file = ""
|
||||||
md5_file = ""
|
md5_file = ""
|
||||||
log_file = "ChangeLog.txt"
|
log_file = "ChangeLog.txt"
|
||||||
if not os.path.exists(log):
|
if not os.path.exists(log):
|
||||||
|
@ -105,12 +108,13 @@ class Initialization(object):
|
||||||
if not os.path.exists(lib):
|
if not os.path.exists(lib):
|
||||||
os.mkdir(lib)
|
os.mkdir(lib)
|
||||||
packages_txt = "{0}{1}/{2}".format(repo, slack_ver(), lib_file)
|
packages_txt = "{0}{1}/{2}".format(repo, slack_ver(), lib_file)
|
||||||
|
filelist_txt = ""
|
||||||
checksums_md5 = ""
|
checksums_md5 = ""
|
||||||
changelog_txt = "{0}/{1}/{2}".format(repo, slack_ver(), log_file)
|
changelog_txt = "{0}/{1}/{2}".format(repo, slack_ver(), log_file)
|
||||||
self.write(lib, lib_file, packages_txt)
|
self.write(lib, lib_file, packages_txt)
|
||||||
self.write(log, log_file, changelog_txt)
|
self.write(log, log_file, changelog_txt)
|
||||||
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)
|
md5_file, checksums_md5, lst_file, filelist_txt)
|
||||||
|
|
||||||
def rlw(self):
|
def rlw(self):
|
||||||
'''
|
'''
|
||||||
|
@ -120,6 +124,7 @@ class Initialization(object):
|
||||||
log = log_path + "rlw/"
|
log = log_path + "rlw/"
|
||||||
lib = lib_path + "rlw_repo/"
|
lib = lib_path + "rlw_repo/"
|
||||||
lib_file = "PACKAGES.TXT"
|
lib_file = "PACKAGES.TXT"
|
||||||
|
lst_file = ""
|
||||||
md5_file = "CHECKSUMS.md5"
|
md5_file = "CHECKSUMS.md5"
|
||||||
log_file = "ChangeLog.txt"
|
log_file = "ChangeLog.txt"
|
||||||
if not os.path.exists(log):
|
if not os.path.exists(log):
|
||||||
|
@ -127,13 +132,14 @@ class Initialization(object):
|
||||||
if not os.path.exists(lib):
|
if not os.path.exists(lib):
|
||||||
os.mkdir(lib)
|
os.mkdir(lib)
|
||||||
packages_txt = "{0}{1}/{2}".format(repo, slack_ver(), lib_file)
|
packages_txt = "{0}{1}/{2}".format(repo, slack_ver(), lib_file)
|
||||||
|
filelist_txt = ""
|
||||||
checksums_md5 = "{0}{1}/{2}".format(repo, slack_ver(), md5_file)
|
checksums_md5 = "{0}{1}/{2}".format(repo, slack_ver(), md5_file)
|
||||||
changelog_txt = "{0}{1}/{2}".format(repo, slack_ver(), log_file)
|
changelog_txt = "{0}{1}/{2}".format(repo, slack_ver(), log_file)
|
||||||
self.write(lib, lib_file, packages_txt)
|
self.write(lib, lib_file, packages_txt)
|
||||||
self.write(lib, md5_file, checksums_md5)
|
self.write(lib, md5_file, checksums_md5)
|
||||||
self.write(log, log_file, changelog_txt)
|
self.write(log, log_file, changelog_txt)
|
||||||
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)
|
md5_file, checksums_md5, lst_file, filelist_txt)
|
||||||
|
|
||||||
def alien(self):
|
def alien(self):
|
||||||
'''
|
'''
|
||||||
|
@ -143,6 +149,7 @@ class Initialization(object):
|
||||||
log = log_path + "alien/"
|
log = log_path + "alien/"
|
||||||
lib = lib_path + "alien_repo/"
|
lib = lib_path + "alien_repo/"
|
||||||
lib_file = "PACKAGES.TXT"
|
lib_file = "PACKAGES.TXT"
|
||||||
|
lst_file = ""
|
||||||
md5_file = "CHECKSUMS.md5"
|
md5_file = "CHECKSUMS.md5"
|
||||||
log_file = "ChangeLog.txt"
|
log_file = "ChangeLog.txt"
|
||||||
if not os.path.exists(log):
|
if not os.path.exists(log):
|
||||||
|
@ -150,13 +157,14 @@ class Initialization(object):
|
||||||
if not os.path.exists(lib):
|
if not os.path.exists(lib):
|
||||||
os.mkdir(lib)
|
os.mkdir(lib)
|
||||||
packages_txt = "{0}{1}".format(repo, lib_file)
|
packages_txt = "{0}{1}".format(repo, lib_file)
|
||||||
|
filelist_txt = ""
|
||||||
checksums_md5 = "{0}{1}".format(repo, md5_file)
|
checksums_md5 = "{0}{1}".format(repo, md5_file)
|
||||||
changelog_txt = "{0}{1}".format(repo, log_file)
|
changelog_txt = "{0}{1}".format(repo, log_file)
|
||||||
self.write(lib, lib_file, packages_txt)
|
self.write(lib, lib_file, packages_txt)
|
||||||
self.write(lib, md5_file, checksums_md5)
|
self.write(lib, md5_file, checksums_md5)
|
||||||
self.write(log, log_file, changelog_txt)
|
self.write(log, log_file, changelog_txt)
|
||||||
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)
|
md5_file, checksums_md5, lst_file, filelist_txt)
|
||||||
|
|
||||||
def slacky(self):
|
def slacky(self):
|
||||||
'''
|
'''
|
||||||
|
@ -168,6 +176,7 @@ class Initialization(object):
|
||||||
log = log_path + "slacky/"
|
log = log_path + "slacky/"
|
||||||
lib = lib_path + "slacky_repo/"
|
lib = lib_path + "slacky_repo/"
|
||||||
lib_file = "PACKAGES.TXT"
|
lib_file = "PACKAGES.TXT"
|
||||||
|
lst_file = ""
|
||||||
md5_file = "CHECKSUMS.md5"
|
md5_file = "CHECKSUMS.md5"
|
||||||
log_file = "ChangeLog.txt"
|
log_file = "ChangeLog.txt"
|
||||||
if not os.path.exists(log):
|
if not os.path.exists(log):
|
||||||
|
@ -178,6 +187,7 @@ class Initialization(object):
|
||||||
ar = "64"
|
ar = "64"
|
||||||
packages_txt = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
|
packages_txt = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
|
||||||
lib_file)
|
lib_file)
|
||||||
|
filelist_txt = ""
|
||||||
checksums_md5 = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
|
checksums_md5 = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
|
||||||
md5_file)
|
md5_file)
|
||||||
|
|
||||||
|
@ -187,7 +197,7 @@ class Initialization(object):
|
||||||
self.write(lib, md5_file, checksums_md5)
|
self.write(lib, md5_file, checksums_md5)
|
||||||
self.write(log, log_file, changelog_txt)
|
self.write(log, log_file, changelog_txt)
|
||||||
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)
|
md5_file, checksums_md5, lst_file, filelist_txt)
|
||||||
|
|
||||||
def studioware(self):
|
def studioware(self):
|
||||||
'''
|
'''
|
||||||
|
@ -199,6 +209,7 @@ class Initialization(object):
|
||||||
log = log_path + "studio/"
|
log = log_path + "studio/"
|
||||||
lib = lib_path + "studio_repo/"
|
lib = lib_path + "studio_repo/"
|
||||||
lib_file = "PACKAGES.TXT"
|
lib_file = "PACKAGES.TXT"
|
||||||
|
lst_file = ""
|
||||||
md5_file = "CHECKSUMS.md5"
|
md5_file = "CHECKSUMS.md5"
|
||||||
log_file = "ChangeLog.txt"
|
log_file = "ChangeLog.txt"
|
||||||
if not os.path.exists(log):
|
if not os.path.exists(log):
|
||||||
|
@ -209,6 +220,7 @@ class Initialization(object):
|
||||||
ar = "64"
|
ar = "64"
|
||||||
packages_txt = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
|
packages_txt = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
|
||||||
lib_file)
|
lib_file)
|
||||||
|
filelist_txt = ""
|
||||||
checksums_md5 = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
|
checksums_md5 = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
|
||||||
md5_file)
|
md5_file)
|
||||||
changelog_txt = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
|
changelog_txt = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
|
||||||
|
@ -217,7 +229,33 @@ class Initialization(object):
|
||||||
self.write(lib, md5_file, checksums_md5)
|
self.write(lib, md5_file, checksums_md5)
|
||||||
self.write(log, log_file, changelog_txt)
|
self.write(log, log_file, changelog_txt)
|
||||||
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)
|
md5_file, checksums_md5, lst_file, filelist_txt)
|
||||||
|
|
||||||
|
def slackers(self):
|
||||||
|
'''
|
||||||
|
Creating slackers local library
|
||||||
|
'''
|
||||||
|
repo = Repo().slackers()
|
||||||
|
log = log_path + "slackr/"
|
||||||
|
lib = lib_path + "slackr_repo/"
|
||||||
|
lib_file = "PACKAGES.TXT"
|
||||||
|
lst_file = "FILELIST.TXT"
|
||||||
|
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 = "{0}{1}".format(repo, lst_file)
|
||||||
|
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, lst_file, filelist_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):
|
||||||
|
@ -240,9 +278,16 @@ class Initialization(object):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def remote(*args):
|
def remote(*args):
|
||||||
'''
|
'''
|
||||||
args[0]=log, args[1]=log_file, arg[2]=changelog_txt
|
args[0] = log
|
||||||
args[3]=lib, args[4]=lib_file, arg[5]=packages_txt
|
args[1] = log_file
|
||||||
args[6]=md5_file, args[7]=checksums_md5
|
arg[2] = changelog_txt
|
||||||
|
args[3] = lib
|
||||||
|
args[4] = lib_file
|
||||||
|
arg[5] = packages_txt
|
||||||
|
args[6] = md5_file
|
||||||
|
args[7] = checksums_md5
|
||||||
|
args[8] = lst_file
|
||||||
|
args[9] = filelist_txt
|
||||||
|
|
||||||
We take the size of ChangeLog.txt from the server and locally.
|
We take the size of ChangeLog.txt from the server and locally.
|
||||||
If the two files differ in size delete and replace all files with new.
|
If the two files differ in size delete and replace all files with new.
|
||||||
|
@ -259,6 +304,9 @@ class Initialization(object):
|
||||||
# remove CHECKSUMS.md5
|
# remove CHECKSUMS.md5
|
||||||
if args[6]:
|
if args[6]:
|
||||||
os.remove("{0}{1}".format(args[3], args[6]))
|
os.remove("{0}{1}".format(args[3], args[6]))
|
||||||
|
# remove FILELIST.TXT
|
||||||
|
if args[8]:
|
||||||
|
os.remove("{0}{1}".format(args[3], args[8]))
|
||||||
for fu in args[5].split():
|
for fu in args[5].split():
|
||||||
PACKAGES_TXT += URL(fu).reading()
|
PACKAGES_TXT += URL(fu).reading()
|
||||||
CHANGELOG_TXT = URL(args[2]).reading()
|
CHANGELOG_TXT = URL(args[2]).reading()
|
||||||
|
@ -285,6 +333,15 @@ class Initialization(object):
|
||||||
toolbar_width = status(index, toolbar_width, 700)
|
toolbar_width = status(index, toolbar_width, 700)
|
||||||
f.write(line + "\n")
|
f.write(line + "\n")
|
||||||
f.close()
|
f.close()
|
||||||
|
# create FILELIST.TXT file
|
||||||
|
if args[8]:
|
||||||
|
FILELIST_TXT = URL(args[9]).reading()
|
||||||
|
with open("{0}{1}".format(args[3], args[8]), "w") as f:
|
||||||
|
for line in FILELIST_TXT.splitlines():
|
||||||
|
index += 1
|
||||||
|
toolbar_width = status(index, toolbar_width, 700)
|
||||||
|
f.write(line + "\n")
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
class Update(object):
|
class Update(object):
|
||||||
|
@ -296,7 +353,8 @@ class Update(object):
|
||||||
'rlw': Initialization().rlw,
|
'rlw': Initialization().rlw,
|
||||||
'alien': Initialization().alien,
|
'alien': Initialization().alien,
|
||||||
'slacky': Initialization().slacky,
|
'slacky': Initialization().slacky,
|
||||||
'studio': Initialization().studioware
|
'studio': Initialization().studioware,
|
||||||
|
'slackr': Initialization().slackers
|
||||||
}
|
}
|
||||||
|
|
||||||
def repository(self):
|
def repository(self):
|
||||||
|
|
|
@ -81,6 +81,9 @@ class Case(object):
|
||||||
def studioware_install(self):
|
def studioware_install(self):
|
||||||
OthersInstall(self.package, "studio", self.release).start()
|
OthersInstall(self.package, "studio", self.release).start()
|
||||||
|
|
||||||
|
def slackers_install(self):
|
||||||
|
OthersInstall(self.package, "slackr", self.release).start()
|
||||||
|
|
||||||
def sbo_upgrade(self):
|
def sbo_upgrade(self):
|
||||||
SBoCheck().start()
|
SBoCheck().start()
|
||||||
|
|
||||||
|
@ -99,6 +102,9 @@ class Case(object):
|
||||||
def studioware_upgrade(self):
|
def studioware_upgrade(self):
|
||||||
OthersUpgrade("studio", self.release).start()
|
OthersUpgrade("studio", self.release).start()
|
||||||
|
|
||||||
|
def slackers_upgrade(self):
|
||||||
|
OthersUpgrade("slackr", self.release).start()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
@ -141,7 +147,8 @@ def main():
|
||||||
'rlw': pkg.rlw_upgrade,
|
'rlw': pkg.rlw_upgrade,
|
||||||
'alien': pkg.alien_upgrade,
|
'alien': pkg.alien_upgrade,
|
||||||
'slacky': pkg.slacky_upgrade,
|
'slacky': pkg.slacky_upgrade,
|
||||||
'studio': pkg.studioware_upgrade
|
'studio': pkg.studioware_upgrade,
|
||||||
|
'slackr': pkg.slackers_upgrade
|
||||||
}
|
}
|
||||||
if args[1] in repositories:
|
if args[1] in repositories:
|
||||||
upgrade[args[1]]()
|
upgrade[args[1]]()
|
||||||
|
@ -155,7 +162,8 @@ def main():
|
||||||
'rlw': pkg.rlw_install,
|
'rlw': pkg.rlw_install,
|
||||||
'alien': pkg.alien_install,
|
'alien': pkg.alien_install,
|
||||||
'slacky': pkg.slacky_install,
|
'slacky': pkg.slacky_install,
|
||||||
'studio': pkg.studioware_install
|
'studio': pkg.studioware_install,
|
||||||
|
'slackr': pkg.slackers_install
|
||||||
}
|
}
|
||||||
if args[1] in repositories:
|
if args[1] in repositories:
|
||||||
install[args[1]]()
|
install[args[1]]()
|
||||||
|
|
|
@ -83,6 +83,10 @@ class OthersUpgrade(object):
|
||||||
self.mirror = "{0}slackware{1}-{2}/".format(repos.studioware(),
|
self.mirror = "{0}slackware{1}-{2}/".format(repos.studioware(),
|
||||||
arch, slack_ver())
|
arch, slack_ver())
|
||||||
self.step = self.step * 2
|
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
|
||||||
|
|
||||||
f = open(lib, "r")
|
f = open(lib, "r")
|
||||||
self.PACKAGES_TXT = f.read()
|
self.PACKAGES_TXT = f.read()
|
||||||
|
@ -146,9 +150,8 @@ class OthersUpgrade(object):
|
||||||
# location = data[1]
|
# location = data[1]
|
||||||
# size = data[2]
|
# size = data[2]
|
||||||
# unsize = data[3]
|
# unsize = data[3]
|
||||||
installed = self.installed()
|
|
||||||
data = repo_data(self.PACKAGES_TXT, self.step, self.repo, self.version)
|
data = repo_data(self.PACKAGES_TXT, self.step, self.repo, self.version)
|
||||||
for pkg in installed:
|
for pkg in self.installed():
|
||||||
for name, loc, comp, uncomp in zip(data[0], data[1], data[2],
|
for name, loc, comp, uncomp in zip(data[0], data[1], data[2],
|
||||||
data[3]):
|
data[3]):
|
||||||
inst_pkg = split_package(pkg)
|
inst_pkg = split_package(pkg)
|
||||||
|
@ -171,7 +174,8 @@ class OthersUpgrade(object):
|
||||||
'rlw': '_rlw',
|
'rlw': '_rlw',
|
||||||
'alien': 'alien',
|
'alien': 'alien',
|
||||||
'slacky': 'sl',
|
'slacky': 'sl',
|
||||||
'studio': 'se'
|
'studio': 'se',
|
||||||
|
'slackr': 'cf'
|
||||||
}
|
}
|
||||||
repo = repository[self.repo]
|
repo = repository[self.repo]
|
||||||
for pkg in os.listdir(pkg_path):
|
for pkg in os.listdir(pkg_path):
|
||||||
|
@ -190,7 +194,8 @@ def views(upgrade_all, comp_sum, repository):
|
||||||
'rlw': ' ' * 3,
|
'rlw': ' ' * 3,
|
||||||
'alien': ' ',
|
'alien': ' ',
|
||||||
'slacky': '',
|
'slacky': '',
|
||||||
'studio': ''
|
'studio': '',
|
||||||
|
'slackr': ''
|
||||||
}
|
}
|
||||||
repository += align[repository]
|
repository += align[repository]
|
||||||
for pkg, comp in zip(upgrade_all, comp_sum):
|
for pkg, comp in zip(upgrade_all, comp_sum):
|
||||||
|
|
|
@ -42,6 +42,9 @@ def repo_data(PACKAGES_TXT, step, repo, version):
|
||||||
index += 1
|
index += 1
|
||||||
toolbar_width = status(index, toolbar_width, step)
|
toolbar_width = status(index, toolbar_width, step)
|
||||||
if line.startswith("PACKAGE NAME"):
|
if line.startswith("PACKAGE NAME"):
|
||||||
|
if repo == "slackr":
|
||||||
|
name.append(fix_slackers_pkg(line[15:]))
|
||||||
|
else:
|
||||||
name.append(line[15:].strip())
|
name.append(line[15:].strip())
|
||||||
if line.startswith("PACKAGE LOCATION"):
|
if line.startswith("PACKAGE LOCATION"):
|
||||||
location.append(line[21:].strip())
|
location.append(line[21:].strip())
|
||||||
|
@ -61,7 +64,7 @@ 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 in ["slacky", "studio"]:
|
elif repo in ["slacky", "studio", "slackr"]:
|
||||||
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]
|
||||||
|
|
||||||
|
@ -104,6 +107,25 @@ def alien_filter(name, location, size, unsize, version):
|
||||||
return [fname, flocation, fsize, funsize]
|
return [fname, flocation, fsize, funsize]
|
||||||
|
|
||||||
|
|
||||||
|
def fix_slackers_pkg(name):
|
||||||
|
'''
|
||||||
|
Fix 'PACKAGE NAME:' from PACKAGES.TXT file
|
||||||
|
Beacause repository slackers.it not report the full
|
||||||
|
name in PACKAGES.TXT file then use FILELIST.TXT to
|
||||||
|
get it.
|
||||||
|
'''
|
||||||
|
f = open(lib_path + "slackr_repo/FILELIST.TXT", "r")
|
||||||
|
FILELIST_TXT = f.read()
|
||||||
|
f.close()
|
||||||
|
for line in FILELIST_TXT.splitlines():
|
||||||
|
if name in line and line.endswith(".txz"):
|
||||||
|
return line.split("/")[-1].strip()
|
||||||
|
# This trick fix spliting 'NoneType' packages
|
||||||
|
# reference wrong name between PACKAGE.TXT and
|
||||||
|
# FILELIST.TXT
|
||||||
|
return "xxx-xxx-xxx-xxx.txz"
|
||||||
|
|
||||||
|
|
||||||
class Requires(object):
|
class Requires(object):
|
||||||
|
|
||||||
def __init__(self, name, repo):
|
def __init__(self, name, repo):
|
||||||
|
@ -118,16 +140,20 @@ class Requires(object):
|
||||||
'''
|
'''
|
||||||
Grap package requirements from repositories
|
Grap package requirements from repositories
|
||||||
'''
|
'''
|
||||||
if self.repo in ["alien", "slacky"]:
|
if self.repo in ["alien", "slacky", "slackr"]:
|
||||||
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'
|
||||||
}
|
}
|
||||||
f = open(lib[self.repo], "r")
|
f = open(lib[self.repo], "r")
|
||||||
PACKAGES_TXT = f.read()
|
PACKAGES_TXT = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
for line in PACKAGES_TXT.splitlines():
|
for line in PACKAGES_TXT.splitlines():
|
||||||
if line.startswith("PACKAGE NAME: "):
|
if line.startswith("PACKAGE NAME: "):
|
||||||
|
if self.repo == "slackr":
|
||||||
|
pkg_name = line[14:].strip()
|
||||||
|
else:
|
||||||
pkg = line[14:].strip()
|
pkg = line[14:].strip()
|
||||||
pkg_name = split_package(pkg)[0]
|
pkg_name = split_package(pkg)[0]
|
||||||
if line.startswith("PACKAGE REQUIRED: "):
|
if line.startswith("PACKAGE REQUIRED: "):
|
||||||
|
@ -135,9 +161,11 @@ class Requires(object):
|
||||||
if line[17:].strip():
|
if line[17:].strip():
|
||||||
if self.repo == "slacky":
|
if self.repo == "slacky":
|
||||||
return self.slacky_req_fix(line)
|
return self.slacky_req_fix(line)
|
||||||
|
elif self.repo == "alien":
|
||||||
else:
|
|
||||||
return line[18:].strip().split(",")
|
return line[18:].strip().split(",")
|
||||||
|
else:
|
||||||
|
return line[18:].strip().split()
|
||||||
|
|
||||||
elif self.repo == "rlw":
|
elif self.repo == "rlw":
|
||||||
# Robby's repository dependencies as shown in the central page
|
# Robby's repository dependencies as shown in the central page
|
||||||
# http://rlworkman.net/pkgs/
|
# http://rlworkman.net/pkgs/
|
||||||
|
|
|
@ -97,6 +97,10 @@ class OthersInstall(object):
|
||||||
self.mirror = "{0}slackware{1}-{2}/".format(repos.studioware(),
|
self.mirror = "{0}slackware{1}-{2}/".format(repos.studioware(),
|
||||||
arch, slack_ver())
|
arch, slack_ver())
|
||||||
self.step = self.step * 2
|
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
|
||||||
|
|
||||||
f = open(lib, "r")
|
f = open(lib, "r")
|
||||||
self.PACKAGES_TXT = f.read()
|
self.PACKAGES_TXT = f.read()
|
||||||
|
@ -195,6 +199,7 @@ class OthersInstall(object):
|
||||||
else:
|
else:
|
||||||
for name, loc, comp, uncomp in zip(data[0], data[1], data[2],
|
for name, loc, comp, uncomp in zip(data[0], data[1], data[2],
|
||||||
data[3]):
|
data[3]):
|
||||||
|
|
||||||
package = "".join(deps)
|
package = "".join(deps)
|
||||||
if package in name and package not in black:
|
if package in name and package not in black:
|
||||||
# store downloads packages by repo
|
# store downloads packages by repo
|
||||||
|
@ -221,7 +226,8 @@ def views(install_all, comp_sum, repository, dependencies):
|
||||||
'rlw': ' ' * 3,
|
'rlw': ' ' * 3,
|
||||||
'alien': ' ',
|
'alien': ' ',
|
||||||
'slacky': '',
|
'slacky': '',
|
||||||
'studio': ''
|
'studio': '',
|
||||||
|
'slackr': ''
|
||||||
}
|
}
|
||||||
repository += align[repository]
|
repository += align[repository]
|
||||||
for pkg, comp in zip(install_all, comp_sum):
|
for pkg, comp in zip(install_all, comp_sum):
|
||||||
|
|
|
@ -36,14 +36,18 @@ def search_pkg(name, repo):
|
||||||
try:
|
try:
|
||||||
blacklist = BlackList().packages()
|
blacklist = BlackList().packages()
|
||||||
repo_dir = {
|
repo_dir = {
|
||||||
"rlw": "rlw_repo/PACKAGES.TXT",
|
'rlw': 'rlw_repo/PACKAGES.TXT',
|
||||||
"alien": "alien_repo/PACKAGES.TXT",
|
'alien': 'alien_repo/PACKAGES.TXT',
|
||||||
"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'
|
||||||
}
|
}
|
||||||
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:
|
||||||
if line.startswith("PACKAGE NAME: "):
|
if line.startswith("PACKAGE NAME: "):
|
||||||
|
if repo == 'slackr':
|
||||||
|
pkg_name = line[15:].strip()
|
||||||
|
else:
|
||||||
pkg_name = split_package(line[15:])[0].strip()
|
pkg_name = split_package(line[15:])[0].strip()
|
||||||
if name == pkg_name and name not in blacklist:
|
if name == pkg_name and name not in blacklist:
|
||||||
PACKAGES_TXT.close()
|
PACKAGES_TXT.close()
|
||||||
|
|
|
@ -293,6 +293,7 @@ class PackageManager(object):
|
||||||
'alien': 'alien',
|
'alien': 'alien',
|
||||||
'slacky': 'sl',
|
'slacky': 'sl',
|
||||||
'studio': 'se',
|
'studio': 'se',
|
||||||
|
'slackr': 'cf',
|
||||||
'all': ''
|
'all': ''
|
||||||
}
|
}
|
||||||
search = pkg_list[pattern]
|
search = pkg_list[pattern]
|
||||||
|
|
|
@ -74,3 +74,9 @@ class Repo(object):
|
||||||
Studioware repository
|
Studioware repository
|
||||||
'''
|
'''
|
||||||
return "http://studioware.org/files/packages/"
|
return "http://studioware.org/files/packages/"
|
||||||
|
|
||||||
|
def slackers(self):
|
||||||
|
'''
|
||||||
|
Slackers.it repository
|
||||||
|
'''
|
||||||
|
return "http://www.slackers.it/repository/"
|
||||||
|
|
|
@ -36,6 +36,7 @@ def split_package(package):
|
||||||
alien = "alien"
|
alien = "alien"
|
||||||
slacky = "sl"
|
slacky = "sl"
|
||||||
studio = "se"
|
studio = "se"
|
||||||
|
slacks = "cf"
|
||||||
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
|
||||||
|
@ -49,6 +50,8 @@ 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):
|
||||||
|
build = split[-1][:-len(slacks)]
|
||||||
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