Fixed for slack repos

This commit is contained in:
Dimitris Zlatanidis 2024-04-15 13:10:09 +03:00
parent 6fedf91948
commit d69b6344ea
3 changed files with 11 additions and 11 deletions

View file

@ -43,13 +43,11 @@ MIRROR = "http://mirror.nl.leaseweb.net/slackware/slackware64-15.0/"
[SLACK_EXTRA] [SLACK_EXTRA]
ENABLE = false ENABLE = false
MIRROR = "http://mirror.nl.leaseweb.net/slackware/slackware64-15.0/" MIRROR = "http://mirror.nl.leaseweb.net/slackware/slackware64-15.0/extra/"
BRANCH = "extra"
[SLACK_PATCHES] [SLACK_PATCHES]
ENABLE = false ENABLE = false
MIRROR = "http://mirror.nl.leaseweb.net/slackware/slackware64-15.0/" MIRROR = "http://mirror.nl.leaseweb.net/slackware/slackware64-15.0/patches/"
BRANCH = "patches"
[ALIEN] [ALIEN]
ENABLE = false ENABLE = false

View file

@ -134,7 +134,11 @@ class InstallData(Configs):
print(f"\nUpdating the database for '{self.cyan}{repo}{self.endc}'... ", print(f"\nUpdating the database for '{self.cyan}{repo}{self.endc}'... ",
end='', flush=True) 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'] 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) self._import_GPG_KEY(mirror=mirror)

View file

@ -179,15 +179,13 @@ class Repositories:
slack_extra_repo: bool = repos_config['slack_extra']['enable'] slack_extra_repo: bool = repos_config['slack_extra']['enable']
slack_extra_repo_url: str = repos_config['slack_extra']['mirror'] 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 = slack_extra_repo_url
slack_extra_repo_mirror_packages: str = f'{slack_extra_repo_url}{slack_extra_repo_branch}/' slack_extra_repo_mirror_changelog: str = f"{'/'.join(slack_extra_repo_url.split('/')[:-2])}/"
slack_extra_repo_mirror_changelog: str = slack_extra_repo_url
slack_patches_repo: bool = repos_config['slack_patches']['enable'] slack_patches_repo: bool = repos_config['slack_patches']['enable']
slack_patches_repo_url: str = repos_config['slack_patches']['mirror'] 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 = slack_patches_repo_url
slack_patches_repo_mirror_packages: str = f'{slack_patches_repo_url}{slack_patches_repo_branch}/' slack_patches_repo_mirror_changelog: str = f"{'/'.join(slack_patches_repo_url.split('/')[:-2])}/"
slack_patches_repo_mirror_changelog: str = slack_patches_repo_url
alien_repo: bool = repos_config['alien']['enable'] alien_repo: bool = repos_config['alien']['enable']
alien_repo_url: str = repos_config['alien']['mirror'] alien_repo_url: str = repos_config['alien']['mirror']
@ -465,7 +463,7 @@ class Repositories:
mirror_packages: str = f'{mirror_changelog}{branch}/' mirror_packages: str = f'{mirror_changelog}{branch}/'
values = { values = {
'enable': data.get('enable', ''), 'enable': data.get('enable', False),
'path': Path(repositories_path, repo), 'path': Path(repositories_path, repo),
'mirror_packages': mirror_packages, 'mirror_packages': mirror_packages,
'mirror_changelog': mirror_changelog, 'mirror_changelog': mirror_changelog,