added slacke repository

This commit is contained in:
Dimitris Zlatanidis 2014-12-25 10:47:18 +02:00
parent 73b8683a65
commit db35b68213
17 changed files with 128 additions and 25 deletions

View file

@ -1,8 +1,8 @@
Version 2.1.5-dev
24-12-2014
[Feature] - Added slacker.it, slackonly.com, Alien's ktown, Alien's multilib
repositories.
[Feature] - Added slacker.it, slackonly.com, Alien's ktown, Alien's multilib,
Slacke E17 and E18 repositories.
- Added command 're-create'.
- Added command 'repolist'.
- Added command 'repoinfo'.

View file

@ -61,6 +61,9 @@ Supported Repositories:
- 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}
- Slacke E17 and E18 - `Repository <http://ngc891.blogdns.net/pub/>`_
Arch: {x86, x86_64, arm}
Versions: {14.1}
* 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.

View file

@ -25,11 +25,10 @@ VERSION=stable
# Choose repositories want to work.
# Available repositories : slack,sbo,alien,rlw,slacky,studio,slackr,slonly,
# ktown{latest}
# ktown{latest}, slacke{18}
# 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}.
# Ktown (Alien's ktown) repository. Default ktown{latest}.
# Slacke (Enlightenment E17 and E18) repository. Default slacke{18}.
REPOSITORIES=slack,sbo
# Build directory for repository slackbuilds.org. In this directory

View file

@ -72,9 +72,10 @@ Optional arguments:
studioware.org = 'studio'
slacker.it = 'slackr'
slackonly.com = 'slonly'
Alien's ktown = 'ktown'
Alien's ktown = 'ktown{latest}'
Alien's multilib = 'multi'
Slacke E17 and E18 = 'slacke{18}'
Default enable repository is 'slack' and 'sbo'.
Add or remove repository in configuration file '/etc/slpkg/slpkg.conf'

View file

@ -45,7 +45,8 @@ repositories = [
'slackr',
'slonly',
'ktown{latest}',
'multi'
'multi',
'slacke{18}'
]
@ -60,6 +61,18 @@ def ktown_repo(repositories):
repositories[i] = 'ktown'
return sub
def slacke_repo(repositories):
'''
Find if slacke repositories enabled then
take SUB_REPOSITORY
'''
for i, repo in enumerate(repositories):
if 'slacke' in repo:
sub = repositories[i].replace('slacke', '')
repositories[i] = 'slacke'
return sub
build_path = "/tmp/slpkg/build/"
slpkg_tmp_packages = tmp + "slpkg/packages/"
slpkg_tmp_patches = tmp + "slpkg/patches/"
@ -111,6 +124,7 @@ if os.path.isfile("/etc/slpkg/slpkg.conf"):
use_colors = line[11:].strip()
ktown_kde_repo = ktown_repo(repositories)
slacke_sub_repo = slacke_repo(repositories)
color = {
'RED': '\x1b[31m',

View file

@ -58,7 +58,8 @@ class PkgDesc(object):
'slackr': 'slackr_repo/PACKAGES.TXT',
'slonly': 'slonly_repo/PACKAGES.TXT',
'ktown': 'ktown_repo/PACKAGES.TXT',
'multi': 'multi_repo/PACKAGES.TXT'
'multi': 'multi_repo/PACKAGES.TXT',
'slacke': 'slacke_repo/PACKAGES.TXT'
}
self.lib = lib_path + repos[self.repo]

View file

@ -49,7 +49,8 @@ def pkg_checksum(binary, repo):
'slackr': 'slackr_repo/CHECKSUMS.md5',
'slonly': 'slonly_repo/CHECKSUMS.md5',
'ktown': 'ktown_repo/CHECKSUMS.md5',
'multi': 'multi_repo/CHECKSUMS.md5'
'multi': 'multi_repo/CHECKSUMS.md5',
'slacke': 'slacke_repo/CHECKSUMS.md5'
}
lib = repos[repo]
f = open(lib_path + lib, "r")

View file

@ -35,7 +35,8 @@ from __metadata__ import (
build_path,
repositories,
slpkg_tmp_packages,
slpkg_tmp_patches
slpkg_tmp_patches,
slacke_sub_repo
)
from slack.mirrors import mirrors
@ -338,6 +339,40 @@ class Initialization(object):
self.remote(log, log_file, changelog_txt, lib, lib_file, packages_txt,
md5_file, checksums_md5, lst_file, filelist_txt)
def slacke(self):
'''
Creating alien multilib local library
'''
ar = ""
arch = os.uname()[4]
repo = Repo().slacke()
log = log_path + "slacke/"
lib = lib_path + "slacke_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 = "64"
elif arch == "arm":
ar = "arm"
packages_txt = "{0}slacke{1}/slackware{2}-{3}/{4}".format(
repo, slacke_sub_repo[1:-1], ar, slack_ver(), lib_file)
filelist_txt = ""
checksums_md5 = "{0}slacke{1}/slackware{2}-{3}/{4}".format(
repo, slacke_sub_repo[1:-1], ar, slack_ver(), md5_file)
changelog_txt = "{0}slacke{1}/slackware{2}-{3}/{4}".format(
repo, slacke_sub_repo[1:-1], 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
def write(path, data_file, file_url):
'''
@ -453,7 +488,8 @@ class Update(object):
'slackr': Initialization().slackers,
'slonly': Initialization().slackonly,
'ktown': Initialization().ktown,
'multi': Initialization().multi
'multi': Initialization().multi,
'slacke': Initialization().slacke
}
def repository(self):

View file

@ -96,6 +96,9 @@ class Case(object):
def multi_install(self):
OthersInstall(self.package, "multi", self.release).start()
def slacke_install(self):
OthersInstall(self.package, "slacke", self.release).start()
def sbo_upgrade(self):
SBoCheck().start()
@ -126,6 +129,9 @@ class Case(object):
def multi_upgrade(self):
OthersUpgrade("multi", self.release).start()
def slacke_upgrade(self):
OthersUpgrade("slacke", self.release).start()
def main():
@ -185,7 +191,8 @@ def main():
'slackr': pkg.slackers_upgrade,
'slonly': pkg.slackonly_upgrade,
'ktown': pkg.ktown_upgrade,
'multi': pkg.multi_upgrade
'multi': pkg.multi_upgrade,
'slacke': pkg.slacke_upgrade
}
if args[1] in repositories:
upgrade[args[1]]()
@ -203,7 +210,8 @@ def main():
'slackr': pkg.slackers_install,
'slonly': pkg.slackonly_install,
'ktown': pkg.ktown_install,
'multi': pkg.multi_install
'multi': pkg.multi_install,
'slacke': pkg.slacke_install
}
if args[1] in repositories:
install[args[1]]()

View file

@ -39,7 +39,8 @@ from slpkg.__metadata__ import (
lib_path,
slpkg_tmp_packages,
default_answer,
color
color,
slacke_sub_repo
)
from slpkg.pkg.manager import PackageManager
@ -67,7 +68,8 @@ class OthersUpgrade(object):
'slackr': self._init_slackr,
'slonly': self._init_slonly,
'ktown': self._init_ktown,
'multi': self._init_multi
'multi': self._init_multi,
'slacke': self._init_slacke
}
init_repos[self.repo]()
@ -125,6 +127,17 @@ class OthersUpgrade(object):
self.mirror = Repo().multi()
self.step = self.step * 2
def _init_slacke(self):
arch = ""
if os.uname()[4] == "x86_64":
arch = "64"
elif os.uname()[4] == "arm":
arch = "arm"
self.lib = lib_path + "slacke_repo/PACKAGES.TXT"
self.mirror = "{0}slacke{1}/slackware{2}-{3}/".format(
Repo().slacke(), slacke_sub_repo[1:-1], arch, slack_ver())
self.step = self.step * 2
def start(self):
'''
Install packages from official Slackware distribution
@ -226,7 +239,8 @@ def views(upgrade_all, comp_sum, repository):
'slackr': '',
'slonly': '',
'ktown': ' ',
'multi': ' '
'multi': ' ',
'slacke': ''
}
repository += align[repository]
for pkg, comp in zip(upgrade_all, comp_sum):

View file

@ -77,7 +77,7 @@ def repo_data(PACKAGES_TXT, step, repo, version):
rsize,
runsize
) = multi_filter(name, location, size, unsize, version)
elif repo in ["slacky", "studio", "slackr", "slonly"]:
elif repo in ["slacky", "studio", "slackr", "slonly", "slacke"]:
rname, rlocation, rsize, runsize = name, location, size, unsize
return [rname, rlocation, rsize, runsize]

View file

@ -42,7 +42,8 @@ from slpkg.__metadata__ import (
log_path,
slpkg_tmp_packages,
default_answer,
color
color,
slacke_sub_repo
)
from slpkg.pkg.find import find_package
@ -75,7 +76,8 @@ class OthersInstall(object):
'slackr': self._init_slackr,
'slonly': self._init_slonly,
'ktown': self._init_ktown,
'multi': self._init_multi
'multi': self._init_multi,
'slacke': self._init_slacke
}
init_repos[self.repo]()
@ -134,6 +136,17 @@ class OthersInstall(object):
self.mirror = Repo().multi()
self.step = self.step * 2
def _init_slacke(self):
arch = ""
if os.uname()[4] == "x86_64":
arch = "64"
elif os.uname()[4] == "arm":
arch = "arm"
self.lib = lib_path + "slacke_repo/PACKAGES.TXT"
self.mirror = "{0}slacke{1}/slackware{2}-{3}/".format(
Repo().slacke(), slacke_sub_repo[1:-1], arch, slack_ver())
self.step = self.step * 2
def start(self):
'''
Install packages from official Slackware distribution
@ -241,7 +254,8 @@ def views(install_all, comp_sum, repository, dependencies):
'slackr': '',
'slonly': '',
'ktown': ' ',
'multi': ' '
'multi': ' ',
'slacke': ''
}
repository += align[repository]
for pkg, comp in zip(install_all, comp_sum):
@ -255,7 +269,7 @@ def views(install_all, comp_sum, repository, dependencies):
else:
COLOR = color['RED']
uni_sum += 1
print(" {0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11:>11}{12}".format(
print(" {0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11:>10}{12}".format(
COLOR, pkg_split[0], color['ENDC'],
" " * (25-len(pkg_split[0])), pkg_split[1],
" " * (19-len(pkg_split[1])), pkg_split[2],

View file

@ -43,7 +43,8 @@ def search_pkg(name, repo):
'slackr': 'slackr_repo/PACKAGES.TXT',
'slonly': 'slonly_repo/PACKAGES.TXT',
'ktown': 'ktown_repo/PACKAGES.TXT',
'multi': 'multi_repo/PACKAGES.TXT'
'multi': 'multi_repo/PACKAGES.TXT',
'slacke': 'slacke_repo/PACKAGES.TXT'
}
with open(lib_path + repo_dir[repo], "r") as PACKAGES_TXT:
for line in PACKAGES_TXT:

View file

@ -298,6 +298,7 @@ class PackageManager(object):
'slonly': '_slack',
'ktown': 'alien',
'multi': 'compat32',
'slacke': 'jp',
'all': ''
}
search = pkg_list[pattern]

View file

@ -45,7 +45,8 @@ class RepoList(object):
'slackr': Repo().slackers(),
'slonly': Repo().slackonly(),
'ktown': Repo().ktown(),
'multi': Repo().multi()
'multi': Repo().multi(),
'slacke': Repo().slacke()
}
def repos(self):

View file

@ -98,3 +98,9 @@ class Repo(object):
Alien's multilib repository
'''
return "http://www.slackware.com/~alien/multilib/"
def slacke(self):
'''
Slacke slacke{17|18} repository
'''
return "http://ngc891.blogdns.net/pub/"

View file

@ -41,6 +41,7 @@ def split_package(package):
# ktown = alien
# multi = alien
compat = "compat32"
slacke = "jp"
build = split[-1]
if build.endswith(sbo):
@ -63,6 +64,8 @@ def split_package(package):
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]
ver = split[-3]