mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-26 09:58:31 +01:00
Removed salix_patches repo
This commit is contained in:
parent
6ba42d686e
commit
afd38b65e3
6 changed files with 4 additions and 196 deletions
|
@ -206,7 +206,7 @@ SLACKONLY_REPO_TAG = "slonly"
|
|||
SALIX_REPO = false
|
||||
SALIX_REPO_NAME = "salix"
|
||||
SALIX_REPO_LOCAL = [""]
|
||||
SALIX_REPO_MIRROR = ["https://download.salixos.org/x86_64/slackware-15.0/"]
|
||||
SALIX_REPO_MIRROR = ["https://download.salixos.org/x86_64/15.0/"]
|
||||
SALIX_REPO_PACKAGES = "PACKAGES.TXT"
|
||||
SALIX_REPO_CHECKSUMS = "CHECKSUMS.md5"
|
||||
SALIX_REPO_CHANGELOG = "ChangeLog.txt"
|
||||
|
@ -216,22 +216,12 @@ SALIX_REPO_TAG = ""
|
|||
SALIX_EXTRA_REPO = false
|
||||
SALIX_EXTRA_REPO_NAME = "salix_extra"
|
||||
SALIX_EXTRA_REPO_LOCAL = [""]
|
||||
SALIX_EXTRA_REPO_MIRROR = ["https://download.salixos.org/x86_64/slackware-15.0/", "extra/"]
|
||||
SALIX_EXTRA_REPO_MIRROR = ["https://download.salixos.org/x86_64/extra-15.0/"]
|
||||
SALIX_EXTRA_REPO_PACKAGES = "PACKAGES.TXT"
|
||||
SALIX_EXTRA_REPO_CHECKSUMS = "CHECKSUMS.md5"
|
||||
SALIX_EXTRA_REPO_CHANGELOG = "ChangeLog.txt"
|
||||
SALIX_EXTRA_REPO_TAG = ""
|
||||
|
||||
# Repository for Salix OS x86_64 15.0 stable.
|
||||
SALIX_PATCHES_REPO = false
|
||||
SALIX_PATCHES_REPO_NAME = "salix_patches"
|
||||
SALIX_PATCHES_REPO_LOCAL = [""]
|
||||
SALIX_PATCHES_REPO_MIRROR = ["https://download.salixos.org/x86_64/slackware-15.0/", "patches/"]
|
||||
SALIX_PATCHES_REPO_PACKAGES = "PACKAGES.TXT"
|
||||
SALIX_PATCHES_REPO_CHECKSUMS = "CHECKSUMS.md5"
|
||||
SALIX_PATCHES_REPO_CHANGELOG = "ChangeLog.txt"
|
||||
SALIX_PATCHES_REPO_TAG = ""
|
||||
|
||||
# Repository for Slackel OS x86_64 -current.
|
||||
SLACKEL_REPO = false
|
||||
SLACKEL_REPO_NAME = "slackel"
|
||||
|
|
|
@ -14,9 +14,8 @@ Supported repositories:
|
|||
> conraid: https://slack.conraid.net/repository/slackware64-current/
|
||||
> slackdce: https://slackdce.radioclub.ar/slackdce/15.0/x86_64/
|
||||
> slackonly: https://packages.slackonly.com/pub/packages/15.0-x86_64/
|
||||
> salixos: https://download.salixos.org/x86_64/slackware-15.0/
|
||||
> salixos_xtra: https://download.salixos.org/x86_64/slackware-15.0/extra/
|
||||
> salixos_patches: https://download.salixos.org/x86_64/slackware-15.0/patches/
|
||||
> salix: https://download.salixos.org/x86_64/15.0/
|
||||
> salix_extra: https://download.salixos.org/x86_64/extra-15.0/
|
||||
> slackel: http://www.slackel.gr/repo/x86_64/current/
|
||||
> slint: https://slackware.uk/slint/x86_64/slint-15.0/
|
||||
> pprkut: https://repo.liwjatan.org/pprkut/15.0/x86_64/
|
||||
|
|
|
@ -24,7 +24,6 @@ class Required:
|
|||
|
||||
self.special_repos: list = [
|
||||
self.repos.salix_repo_name,
|
||||
self.repos.salix_patches_repo_name,
|
||||
self.repos.salix_extra_repo_name,
|
||||
self.repos.slackel_repo_name,
|
||||
self.repos.slint_repo_name
|
||||
|
|
|
@ -1609,119 +1609,6 @@ class InstallData(Configs):
|
|||
|
||||
self.view_done_message()
|
||||
|
||||
def install_salix_patches_data(self) -> None:
|
||||
""" Install the data for salix_patches repository. """
|
||||
print(f"\nUpdating the database for '{self.cyan}{self.repos.salix_patches_repo_name}{self.endc}'... ",
|
||||
end='', flush=True)
|
||||
|
||||
mirror: str = self.repos.salix_patches_repo_mirror[0]
|
||||
if self.repos.salix_patches_repo_local[0].startswith('file'):
|
||||
mirror: str = self.repos.salix_patches_repo_local[0]
|
||||
|
||||
self._import_GPG_KEY(mirror=mirror)
|
||||
|
||||
checksums_dict: dict = {}
|
||||
data: dict = {}
|
||||
build: str = ''
|
||||
arch: str = ''
|
||||
pkg_tag = [
|
||||
'PACKAGE NAME:',
|
||||
'PACKAGE LOCATION:',
|
||||
'PACKAGE SIZE (compressed):',
|
||||
'PACKAGE SIZE (uncompressed):',
|
||||
'PACKAGE REQUIRED:',
|
||||
'PACKAGE DESCRIPTION:'
|
||||
]
|
||||
path_packages: Path = Path(self.repos.salix_patches_repo_path,
|
||||
self.repos.salix_patches_repo_packages)
|
||||
path_checksums: Path = Path(self.repos.salix_patches_repo_path,
|
||||
self.repos.salix_patches_repo_checksums)
|
||||
packages_txt: list = self.utils.read_text_file(path_packages)
|
||||
checksums_md5: list = self.utils.read_text_file(path_checksums)
|
||||
|
||||
for line in checksums_md5:
|
||||
line = line.strip()
|
||||
|
||||
if line.endswith(('.txz', '.tgz')):
|
||||
file: str = line.split('./')[1].split('/')[-1].strip()
|
||||
checksum: str = line.split('./')[0].strip()
|
||||
checksums_dict[file] = checksum
|
||||
|
||||
cache: list = [] # init cache
|
||||
|
||||
for line in packages_txt:
|
||||
|
||||
if line.startswith(pkg_tag[0]):
|
||||
package = line.replace(pkg_tag[0], '').strip()
|
||||
name: str = self.utils.split_package(package)['name']
|
||||
version: str = self.utils.split_package(package)['version']
|
||||
build: str = self.utils.split_package(package)['build']
|
||||
arch: str = self.utils.split_package(package)['arch']
|
||||
cache.append(name)
|
||||
cache.append(version)
|
||||
cache.append(package)
|
||||
cache.append(mirror)
|
||||
try:
|
||||
cache.append(checksums_dict[package])
|
||||
except KeyError:
|
||||
cache.append('error checksum')
|
||||
|
||||
if line.startswith(pkg_tag[1]):
|
||||
package_location = line.replace(pkg_tag[1], '').strip()
|
||||
cache.append(package_location[2:]) # Do not install (./) dot
|
||||
|
||||
if line.startswith(pkg_tag[2]):
|
||||
cache.append(''.join(re.findall(r'\d+', line)))
|
||||
|
||||
if line.startswith(pkg_tag[3]):
|
||||
cache.append(''.join(re.findall(r'\d+', line)))
|
||||
|
||||
if line.startswith(pkg_tag[4]):
|
||||
deps: list = []
|
||||
required = line.replace(pkg_tag[4], '').strip()
|
||||
|
||||
for req in required.split(','):
|
||||
dep = req.split('|')
|
||||
if len(dep) > 1:
|
||||
deps.append(dep[1])
|
||||
else:
|
||||
deps.extend(dep)
|
||||
|
||||
cache.append(' '.join(deps))
|
||||
|
||||
if line.startswith(pkg_tag[5]):
|
||||
package_description = line.replace(pkg_tag[5], '').strip()
|
||||
cache.append(package_description)
|
||||
|
||||
if len(cache) == 10:
|
||||
data[cache[0]]: dict = {
|
||||
'repo': self.repos.salix_extra_repo_name,
|
||||
'version': cache[1],
|
||||
'package': cache[2],
|
||||
'mirror': cache[3],
|
||||
'checksum': cache[4],
|
||||
'location': cache[5],
|
||||
'size_comp': cache[6],
|
||||
'size_uncomp': cache[7],
|
||||
'requires': cache[8].split(),
|
||||
'description': cache[9],
|
||||
'build': build,
|
||||
'arch': arch,
|
||||
'conflicts': '',
|
||||
'suggests': ''
|
||||
}
|
||||
|
||||
cache: list = [] # reset cache
|
||||
|
||||
path_changelog: Path = Path(self.repos.salix_patches_repo_path,
|
||||
self.repos.salix_patches_repo_changelog)
|
||||
self.write_last_update(path_changelog, self.repos.salix_patches_repo_name)
|
||||
|
||||
data_file: Path = Path(self.repos.salix_patches_repo_path, self.repos.data_json)
|
||||
data_file.write_text(json.dumps(data, indent=4))
|
||||
|
||||
self.view_done_message()
|
||||
|
||||
def install_slackel_data(self) -> None:
|
||||
""" Install the data for slackel repository. """
|
||||
print(f"\nUpdating the database for '{self.cyan}{self.repos.slackel_repo_name}{self.endc}'... ",
|
||||
|
|
|
@ -188,16 +188,6 @@ class Repositories:
|
|||
salix_extra_repo_changelog: str = 'ChangeLog.txt'
|
||||
salix_extra_repo_tag: str = ''
|
||||
|
||||
salix_patches_repo: bool = False
|
||||
salix_patches_repo_name: str = 'salix_patches'
|
||||
salix_patches_repo_path: Path = Path(repositories_path, salix_patches_repo_name)
|
||||
salix_patches_repo_local = ['']
|
||||
salix_patches_repo_mirror = ['https://download.salix.org/x86_64/slackware-15.0/', 'patches/']
|
||||
salix_patches_repo_packages: str = 'PACKAGES.TXT'
|
||||
salix_patches_repo_checksums: str = 'CHECKSUMS.md5'
|
||||
salix_patches_repo_changelog: str = 'ChangeLog.txt'
|
||||
salix_patches_repo_tag: str = ''
|
||||
|
||||
slackel_repo: bool = False
|
||||
slackel_repo_name: str = 'slackel'
|
||||
slackel_repo_path: Path = Path(repositories_path, slackel_repo_name)
|
||||
|
@ -507,23 +497,6 @@ class Repositories:
|
|||
except IndexError:
|
||||
salix_extra_repo_local = ['']
|
||||
|
||||
salix_patches_repo: bool = repos_config['SALIX_PATCHES_REPO']
|
||||
salix_patches_repo_name: str = repos_config['SALIX_PATCHES_REPO_NAME']
|
||||
salix_patches_repo_path: Path = Path(repositories_path, salix_patches_repo_name)
|
||||
salix_patches_repo_local = repos_config['SALIX_PATCHES_REPO_LOCAL']
|
||||
salix_patches_repo_mirror = repos_config['SALIX_PATCHES_REPO_MIRROR']
|
||||
salix_patches_repo_packages: str = repos_config['SALIX_PATCHES_REPO_PACKAGES']
|
||||
salix_patches_repo_checksums: str = repos_config['SALIX_PATCHES_REPO_CHECKSUMS']
|
||||
salix_patches_repo_changelog: str = repos_config['SALIX_PATCHES_REPO_CHANGELOG']
|
||||
salix_patches_repo_tag: str = repos_config['SALIX_PATCHES_REPO_TAG']
|
||||
try:
|
||||
if salix_patches_repo_local[0].startswith('file'):
|
||||
salix_patches_repo_path: Path = Path(
|
||||
''.join(salix_patches_repo_local).replace('file:', '')
|
||||
)
|
||||
except IndexError:
|
||||
salix_patches_repo_local = ['']
|
||||
|
||||
slackel_repo: bool = repos_config['SLACKEL_REPO']
|
||||
slackel_repo_name: str = repos_config['SLACKEL_REPO_NAME']
|
||||
slackel_repo_path: Path = Path(repositories_path, slackel_repo_name)
|
||||
|
@ -724,15 +697,6 @@ class Repositories:
|
|||
'changelog_txt': salix_extra_repo_changelog,
|
||||
'repo_tag': salix_extra_repo_tag},
|
||||
|
||||
salix_patches_repo_name: {
|
||||
'enable': salix_patches_repo,
|
||||
'path': salix_patches_repo_path,
|
||||
'mirror': salix_patches_repo_mirror,
|
||||
'packages_txt': salix_patches_repo_packages,
|
||||
'checksums_txt': salix_patches_repo_checksums,
|
||||
'changelog_txt': salix_patches_repo_changelog,
|
||||
'repo_tag': salix_patches_repo_tag},
|
||||
|
||||
slackel_repo_name: {
|
||||
'enable': slackel_repo,
|
||||
'path': slackel_repo_path,
|
||||
|
|
|
@ -67,7 +67,6 @@ class UpdateRepositories(Configs):
|
|||
self.repos.slackonly_repo_name: self.slackonly_repository,
|
||||
self.repos.salix_repo_name: self.salix_repository,
|
||||
self.repos.salix_extra_repo_name: self.salix_extra_repository,
|
||||
self.repos.salix_patches_repo_name: self.salix_patches_repository,
|
||||
self.repos.slackel_repo_name: self.slackel_repository,
|
||||
self.repos.slint_repo_name: self.slint_repository,
|
||||
self.repos.pprkut_repo_name: self.pprkut_repository
|
||||
|
@ -467,36 +466,6 @@ class UpdateRepositories(Configs):
|
|||
|
||||
self.data.install_salix_extra_data()
|
||||
|
||||
def salix_patches_repository(self) -> None:
|
||||
urls: dict = {}
|
||||
self.utils.create_directory(self.repos.slack_patches_repo_path)
|
||||
|
||||
self.utils.remove_file_if_exists(self.repos.salix_patches_repo_path, self.repos.salix_patches_repo_changelog)
|
||||
self.utils.remove_file_if_exists(self.repos.salix_patches_repo_path, self.repos.salix_patches_repo_packages)
|
||||
self.utils.remove_file_if_exists(self.repos.salix_patches_repo_path, self.repos.salix_patches_repo_checksums)
|
||||
|
||||
changelog: str = f'{self.repos.salix_patches_repo_mirror[0]}{self.repos.salix_patches_repo_changelog}'
|
||||
|
||||
if self.repos.salix_patches_repo_local[0].startswith('file'):
|
||||
urls[self.repos.salix_patches_repo_name] = ((changelog,), self.repos.salix_patches_repo_path)
|
||||
lftp_command: str = (
|
||||
f'lftp {self.lftp_mirror_options}{self.lftp_extra_options}'
|
||||
f'{"".join(self.repos.salix_patches_repo_mirror)} {self.repos.salix_patches_repo_path}'
|
||||
)
|
||||
self.multi_process.process(lftp_command)
|
||||
else:
|
||||
packages: str = (f'{"".join(self.repos.salix_patches_repo_mirror)}'
|
||||
f'{self.repos.salix_patches_repo_packages}')
|
||||
checksums: str = (f'{"".join(self.repos.salix_patches_repo_mirror)}'
|
||||
f'{self.repos.salix_patches_repo_checksums}')
|
||||
|
||||
urls[self.repos.salix_patches_repo_name] = ((changelog, packages, checksums),
|
||||
self.repos.salix_patches_repo_path)
|
||||
|
||||
self.download.download(urls)
|
||||
|
||||
self.data.install_salix_patches_data()
|
||||
|
||||
def slackel_repository(self) -> None:
|
||||
urls: dict = {}
|
||||
self.utils.create_directory(self.repos.slackel_repo_path)
|
||||
|
|
Loading…
Reference in a new issue