Added Microlinux mles repository

This commit is contained in:
Dimitris Zlatanidis 2017-02-10 00:12:17 +02:00
parent f04262107c
commit 61d301e376
9 changed files with 71 additions and 16 deletions

View file

@ -211,6 +211,9 @@ Default available Repositories:
- `Connochaetos (Slack-n-Free) <https://connochaetos.org/slack-n-free/>`_
Arch: {x86, x86_64}
Versions: {14,1, 14.2}
- `Microlinux mles <http://www.microlinux.fr/microlinux/>`_
Arch: {x86, x86_64}
Versions: {14,1, 14.2}
* Choose default repositories you need to work from file '/etc/slpkg/repositories.conf' default

View file

@ -27,7 +27,7 @@ dependencies.
Slonly repository do not support -current for x86 arch.
Alien's ktown (ktown), Alien's multilib (multi), Slacke E17 and E18, slack-n-free, csb,
and Alien's restricted repository has no reference dependencies.
mles and Alien's restricted repository has no reference dependencies.
IMPORTANT: For Alien's (Eric Hameleers) repositories (alien, multi and ktown) should run
'slpkg upgrade' instant 'slpkg update', if you want to spend from -stable in -current or not

View file

@ -29,7 +29,7 @@
#
# Default repositories names:
# sbo, slack, rlw, alien, slacky, slackr, slonly, ktown, multi, slacke, salix,
# slackl, rested, msb, csb, connor
# slackl, rested, msb, csb, connor, mles
# NOTE: Slackware repository (slack) served from file slackware-mirros
# -----------------------------------------------------------------------------
#
@ -49,3 +49,4 @@
msb http://slackware.org.uk/msb/
csb http://slackware.uk/csb/
connos https://connochaetos.org/slack-n-free/
mles http://www.microlinux.fr/microlinux/

View file

@ -23,10 +23,13 @@
# END OF LEGAL NOTICE
#
# ----------------------------------------------------------------------------
# slackr (slackers.it) repository must used from Slackware64 current.
# Ktown (Alien"s ktown 4.14.3 and latest) repository. Default ktown{latest}.
# Slacke (Enlightenment E17 and E18) repository. Default slacke{18}.
# MSB (mate 1.14 and 1.16) repository. Default msb{1.16}
#
# slackr (Conraid's) repository must used from Slackware64 current.
# ktown (Alien"s ktown: 4.14.3 and latest) repository. Default ktown{latest}.
# slacke (Enlightenment: E17 and E18) repository. Default slacke{18}.
# msb (Mate: 1.14, 1.16, latest) repository. Default msb{1.16}
# mles (Microlinux: desktop, extras, server) repository. Default mles{desktop}
#
# Slackware ARM users will must use only two repositories at the moment slack and sbo.
#
# Slpkg uses by default slack (Slackware) and sbo (SlackBuilds.org) repositories.
@ -37,7 +40,7 @@
# Uncomment (remove the '#' character) to choose repositories:
# Do NOT change the name of the repository.
# ----------------------------------------------------------------------------
[REPOSITORIES]
# [REPOSITORIES]
slack
sbo
# alien
@ -54,3 +57,4 @@ sbo
# msb{1.16}
# csb
# connos
# mles{desktop}

View file

@ -364,6 +364,7 @@ For example:
MATE Desktop Environment = "msb{1.16}"
Cinnamon Desktop Environment = "csb"
Connochaetos slack-n-free = "connos"
Microlinux mles = "mles"
Default enable repository is "slack" and "sbo".
Add or remove default repository in configuration file "/etc/slpkg/repositories.conf".

View file

@ -61,6 +61,7 @@ def grab_sub_repo(repositories, repos):
sub = repositories[i].replace(repos, "")
repositories[i] = repos
return sub
return ""
def select_slack_release(slack_rel):
@ -100,7 +101,7 @@ class MetaData(object):
"slacky", "slackr", "slonly",
"ktown{latest}", "multi", "slacke{18}",
"salix", "slackl", "rested", "msb{1.16}",
"csb", "connos"],
"csb", "connos", "mles{desktop}"],
"BUILD_PATH": "/tmp/slpkg/build/",
"PACKAGES": "/tmp/slpkg/packages/",
"PATCHES": "/tmp/slpkg/patches/",
@ -126,7 +127,7 @@ class MetaData(object):
default_repositories = ["slack", "sbo", "rlw", "alien", "slacky", "slackr",
"slonly", "ktown", "multi", "slacke", "salix",
"slackl", "rested", "msb", "csb", "connos"]
"slackl", "rested", "msb", "csb", "connos", "mles"]
# read value from configuration file
repositories = []
@ -142,6 +143,7 @@ class MetaData(object):
_conf_slpkg[line.split("=")[0]] = line.split("=")[1]
elif files == "repositories.conf":
repositories.append(line)
# Set values from configuration file
slack_rel = _conf_slpkg["RELEASE"]
build_path = _conf_slpkg["BUILD_PATH"]
@ -179,10 +181,10 @@ class MetaData(object):
ktown_kde_repo = grab_sub_repo(repositories, "ktown")
slacke_sub_repo = grab_sub_repo(repositories, "slacke")
msb_sub_repo = grab_sub_repo(repositories, "msb")
mles_sub_repo = grab_sub_repo(repositories, "mles")
# remove no default repositories
repositories = remove_repositories(repositories, default_repositories)
# add custom repositories
update_repositories(repositories, conf_path)

View file

@ -145,3 +145,11 @@ class RepoInit(object):
arch = "64"
self.mirror = "{0}slack-n-free{1}-{2}/".format(
self.def_repo_dict["connos"], arch, slack_ver())
def _init_mles(self):
arch = "32"
if self.meta.arch == "x86_64":
arch = "64"
self.mirror = "{0}{1}-{2}-{3}bit/".format(
self.def_repo_dict["mles"],
self.meta.mles_sub_repo[1:-1], slack_ver(), arch)

View file

@ -56,7 +56,8 @@ class Updates(object):
"rested": self._init.rested,
"msb": self._init.msb,
"csb": self._init.csb,
"connos": self._init.msb
"connos": self._init.msb,
"mles": self._init.mles
}
def status_bar(self):

View file

@ -401,13 +401,14 @@ class Initialization(object):
os.mkdir(lib)
if arch == "x86_64":
ar = "64"
version = self.meta.slacke_sub_repo[1:-1]
PACKAGES_TXT = "{0}slacke{1}/slackware{2}-{3}/{4}".format(
repo, self.meta.slacke_sub_repo[1:-1], ar, slack_ver(), lib_file)
repo, version, ar, slack_ver(), lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = "{0}slacke{1}/slackware{2}-{3}/{4}".format(
repo, self.meta.slacke_sub_repo[1:-1], ar, slack_ver(), md5_file)
repo, version, ar, slack_ver(), md5_file)
ChangeLog_txt = "{0}slacke{1}/slackware{2}-{3}/{4}".format(
repo, self.meta.slacke_sub_repo[1:-1], ar, slack_ver(), log_file)
repo, version, ar, slack_ver(), log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, PACKAGES_TXT, repo_name)
@ -525,8 +526,7 @@ class Initialization(object):
if arch == "x86_64":
ar = "x86_64"
version = ""
if "msb" in self.meta.repositories:
version = self.meta.msb_sub_repo[1:-1]
version = self.meta.msb_sub_repo[1:-1]
PACKAGES_TXT = "{0}{1}/{2}/{3}/{4}".format(
repo, slack_ver(), version, ar, lib_file)
FILELIST_TXT = ""
@ -610,6 +610,41 @@ class Initialization(object):
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
def mles(self):
"""Creating Microlinux local library
"""
ar = "32"
arch = self.meta.arch
repo = self.def_repos_dict["mles"]
log = self.log_path + "mles/"
lib = self.lib_path + "mles_repo/"
repo_name = log[:-1].split("/")[-1]
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"
version = self.meta.mles_sub_repo[1:-1]
PACKAGES_TXT = "{0}{1}-{2}-{3}bit/{4}".format(
repo, version, slack_ver(), ar, lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = "{0}{1}-{2}-{3}bit/{4}".format(
repo, version, slack_ver(), ar, md5_file)
ChangeLog_txt = "{0}{1}-{2}-{3}bit/{4}".format(
repo, version, slack_ver(), ar, log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, PACKAGES_TXT, repo_name)
self.down(lib, CHECKSUMS_MD5, repo_name)
self.down(log, ChangeLog_txt, repo_name)
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
def down(self, path, link, repo):
"""Download files
"""