From d69b6344ea29a91be195808472f91f2c4e792689 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 15 Apr 2024 13:10:09 +0300 Subject: [PATCH] Fixed for slack repos --- configs/repositories.toml | 6 ++---- slpkg/install_data.py | 4 ++++ slpkg/repositories.py | 12 +++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/configs/repositories.toml b/configs/repositories.toml index fa700eff..f3147b87 100644 --- a/configs/repositories.toml +++ b/configs/repositories.toml @@ -43,13 +43,11 @@ MIRROR = "http://mirror.nl.leaseweb.net/slackware/slackware64-15.0/" [SLACK_EXTRA] ENABLE = false -MIRROR = "http://mirror.nl.leaseweb.net/slackware/slackware64-15.0/" -BRANCH = "extra" +MIRROR = "http://mirror.nl.leaseweb.net/slackware/slackware64-15.0/extra/" [SLACK_PATCHES] ENABLE = false -MIRROR = "http://mirror.nl.leaseweb.net/slackware/slackware64-15.0/" -BRANCH = "patches" +MIRROR = "http://mirror.nl.leaseweb.net/slackware/slackware64-15.0/patches/" [ALIEN] ENABLE = false diff --git a/slpkg/install_data.py b/slpkg/install_data.py index 6ed802b3..9745f16a 100644 --- a/slpkg/install_data.py +++ b/slpkg/install_data.py @@ -134,7 +134,11 @@ class InstallData(Configs): print(f"\nUpdating the database for '{self.cyan}{repo}{self.endc}'... ", end='', flush=True) + slack_repos: list = [self.repos.slack_patches_repo_name, self.repos.slack_extra_repo_name] + mirror: str = self.repos.repositories[repo]['mirror_packages'] + if repo in slack_repos: + mirror: str = self.repos.repositories[repo]['mirror_changelog'] self._import_GPG_KEY(mirror=mirror) diff --git a/slpkg/repositories.py b/slpkg/repositories.py index f909f506..1d802a8d 100644 --- a/slpkg/repositories.py +++ b/slpkg/repositories.py @@ -179,15 +179,13 @@ class Repositories: slack_extra_repo: bool = repos_config['slack_extra']['enable'] slack_extra_repo_url: str = repos_config['slack_extra']['mirror'] - slack_extra_repo_branch: str = repos_config['slack_extra']['branch'] - slack_extra_repo_mirror_packages: str = f'{slack_extra_repo_url}{slack_extra_repo_branch}/' - slack_extra_repo_mirror_changelog: str = slack_extra_repo_url + slack_extra_repo_mirror_packages: str = slack_extra_repo_url + slack_extra_repo_mirror_changelog: str = f"{'/'.join(slack_extra_repo_url.split('/')[:-2])}/" slack_patches_repo: bool = repos_config['slack_patches']['enable'] slack_patches_repo_url: str = repos_config['slack_patches']['mirror'] - slack_patches_repo_branch: str = repos_config['slack_patches']['branch'] - slack_patches_repo_mirror_packages: str = f'{slack_patches_repo_url}{slack_patches_repo_branch}/' - slack_patches_repo_mirror_changelog: str = slack_patches_repo_url + slack_patches_repo_mirror_packages: str = slack_patches_repo_url + slack_patches_repo_mirror_changelog: str = f"{'/'.join(slack_patches_repo_url.split('/')[:-2])}/" alien_repo: bool = repos_config['alien']['enable'] alien_repo_url: str = repos_config['alien']['mirror'] @@ -465,7 +463,7 @@ class Repositories: mirror_packages: str = f'{mirror_changelog}{branch}/' values = { - 'enable': data.get('enable', ''), + 'enable': data.get('enable', False), 'path': Path(repositories_path, repo), 'mirror_packages': mirror_packages, 'mirror_changelog': mirror_changelog,