From a54238619f782a23f30a3e2e5db0875a0b8cd116 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 24 May 2023 22:46:30 +0300 Subject: [PATCH] Updated for dict --- slpkg/update_repository.py | 250 ++++++++++++++++++++++--------------- 1 file changed, 152 insertions(+), 98 deletions(-) diff --git a/slpkg/update_repository.py b/slpkg/update_repository.py index f37d2815..a34c2224 100644 --- a/slpkg/update_repository.py +++ b/slpkg/update_repository.py @@ -36,6 +36,7 @@ class UpdateRepository(Configs): self.data = InstallData() self.generate = SBoGenerate() self.check_updates = CheckUpdates(flags, repository) + self.download = Downloader(flags) self.repos_for_update: dict = {} @@ -94,7 +95,7 @@ class UpdateRepository(Configs): def slack_repository(self): if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.slack_repo_path) self.utils.remove_file_if_exists(self.repos.slack_repo_path, self.repos.slack_repo_packages) @@ -108,12 +109,15 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{self.repos.slack_repo_mirror[0]}{self.repos.slack_repo_changelog}') - urls.append(f'{self.repos.slack_repo_mirror[0]}{self.repos.slack_repo_packages}') - urls.append(f'{self.repos.slack_repo_mirror[0]}{self.repos.slack_repo_checksums}') + changelog: str = f'{self.repos.slack_repo_mirror[0]}{self.repos.slack_repo_changelog}' + packages: str = f'{self.repos.slack_repo_mirror[0]}{self.repos.slack_repo_packages}' + checksums: str = f'{self.repos.slack_repo_mirror[0]}{self.repos.slack_repo_checksums}' - down = Downloader(self.repos.slack_repo_path, urls, self.flags) - down.download() + urls[changelog] = self.repos.slack_repo_path + urls[packages] = self.repos.slack_repo_path + urls[checksums] = self.repos.slack_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.slack_repo_name) @@ -122,14 +126,15 @@ class UpdateRepository(Configs): def slack_extra_repository(self): if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.slack_extra_repo_path) self.utils.remove_file_if_exists(self.repos.slack_extra_repo_path, self.repos.slack_extra_repo_changelog) self.utils.remove_file_if_exists(self.repos.slack_extra_repo_path, self.repos.slack_extra_repo_packages) self.utils.remove_file_if_exists(self.repos.slack_extra_repo_path, self.repos.slack_extra_repo_checksums) - urls.append(f'{self.repos.slack_extra_repo_mirror[0]}{self.repos.slack_extra_repo_changelog}') + changelog: str = f'{self.repos.slack_extra_repo_mirror[0]}{self.repos.slack_extra_repo_changelog}' + urls[changelog] = self.repos.slack_extra_repo_path if self.repos.slack_extra_repo_local[0].startswith('file'): lftp_command: str = ( @@ -138,11 +143,13 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{"".join(self.repos.slack_extra_repo_mirror)}{self.repos.slack_extra_repo_packages}') - urls.append(f'{"".join(self.repos.slack_extra_repo_mirror)}{self.repos.slack_extra_repo_checksums}') + packages: str = f'{"".join(self.repos.slack_extra_repo_mirror)}{self.repos.slack_extra_repo_packages}' + checksums: str = f'{"".join(self.repos.slack_extra_repo_mirror)}{self.repos.slack_extra_repo_checksums}' - down = Downloader(self.repos.slack_extra_repo_path, urls, self.flags) - down.download() + urls[packages] = self.repos.slack_extra_repo_path + urls[checksums] = self.repos.slack_extra_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.slack_extra_repo_name) @@ -151,7 +158,7 @@ class UpdateRepository(Configs): def slack_patches_repository(self): if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.slack_patches_repo_path) self.utils.remove_file_if_exists(self.repos.slack_patches_repo_path, @@ -161,7 +168,8 @@ class UpdateRepository(Configs): self.utils.remove_file_if_exists(self.repos.slack_patches_repo_path, self.repos.slack_patches_repo_checksums) - urls.append(f'{self.repos.slack_patches_repo_mirror[0]}{self.repos.slack_patches_repo_changelog}') + changelog: str = f'{self.repos.slack_patches_repo_mirror[0]}{self.repos.slack_patches_repo_changelog}' + urls[changelog] = self.repos.slack_patches_repo_path if self.repos.slack_patches_repo_local[0].startswith('file'): lftp_command: str = ( @@ -170,11 +178,15 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{"".join(self.repos.slack_patches_repo_mirror)}{self.repos.slack_patches_repo_packages}') - urls.append(f'{"".join(self.repos.slack_patches_repo_mirror)}{self.repos.slack_patches_repo_checksums}') + packages: str = (f'{"".join(self.repos.slack_patches_repo_mirror)}' + f'{self.repos.slack_patches_repo_packages}') + checksums: str = (f'{"".join(self.repos.slack_patches_repo_mirror)}' + f'{self.repos.slack_patches_repo_checksums}') - down = Downloader(self.repos.slack_patches_repo_path, urls, self.flags) - down.download() + urls[packages] = self.repos.slack_patches_repo_path + urls[checksums] = self.repos.slack_patches_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.slack_patches_repo_name) @@ -183,14 +195,15 @@ class UpdateRepository(Configs): def alien_repository(self): if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.alien_repo_path) self.utils.remove_file_if_exists(self.repos.alien_repo_path, self.repos.alien_repo_changelog) self.utils.remove_file_if_exists(self.repos.alien_repo_path, self.repos.alien_repo_packages) self.utils.remove_file_if_exists(self.repos.alien_repo_path, self.repos.alien_repo_checksums) - urls.append(f'{self.repos.alien_repo_mirror[0]}{self.repos.alien_repo_changelog}') + changelog: str = f'{self.repos.alien_repo_mirror[0]}{self.repos.alien_repo_changelog}' + urls[changelog] = self.repos.alien_repo_path if self.repos.alien_repo_local[0].startswith('file'): lftp_command: str = ( @@ -199,11 +212,13 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{"".join(self.repos.alien_repo_mirror)}{self.repos.alien_repo_packages}') - urls.append(f'{"".join(self.repos.alien_repo_mirror)}{self.repos.alien_repo_checksums}') + packages: str = f'{"".join(self.repos.alien_repo_mirror)}{self.repos.alien_repo_packages}' + checksums: str = f'{"".join(self.repos.alien_repo_mirror)}{self.repos.alien_repo_checksums}' - down = Downloader(self.repos.alien_repo_path, urls, self.flags) - down.download() + urls[packages] = self.repos.alien_repo_path + urls[checksums] = self.repos.alien_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.alien_repo_name) @@ -212,14 +227,15 @@ class UpdateRepository(Configs): def multilib_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.multilib_repo_path) self.utils.remove_file_if_exists(self.repos.multilib_repo_path, self.repos.multilib_repo_changelog) self.utils.remove_file_if_exists(self.repos.multilib_repo_path, self.repos.multilib_repo_packages) self.utils.remove_file_if_exists(self.repos.multilib_repo_path, self.repos.multilib_repo_checksums) - urls.append(f'{self.repos.multilib_repo_mirror[0]}{self.repos.multilib_repo_changelog}') + changelog: str = f'{self.repos.multilib_repo_mirror[0]}{self.repos.multilib_repo_changelog}' + urls[changelog] = self.repos.multilib_repo_path if self.repos.multilib_repo_local[0].startswith('file'): lftp_command: str = ( @@ -228,11 +244,13 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{"".join(self.repos.multilib_repo_mirror)}{self.repos.multilib_repo_packages}') - urls.append(f'{"".join(self.repos.multilib_repo_mirror)}{self.repos.multilib_repo_checksums}') + packages: str = f'{"".join(self.repos.multilib_repo_mirror)}{self.repos.multilib_repo_packages}' + checksums: str = f'{"".join(self.repos.multilib_repo_mirror)}{self.repos.multilib_repo_checksums}' - down = Downloader(self.repos.multilib_repo_path, urls, self.flags) - down.download() + urls[packages] = self.repos.multilib_repo_path + urls[checksums] = self.repos.multilib_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.multilib_repo_name) @@ -241,14 +259,15 @@ class UpdateRepository(Configs): def restricted_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.restricted_repo_path) self.utils.remove_file_if_exists(self.repos.restricted_repo_path, self.repos.restricted_repo_changelog) self.utils.remove_file_if_exists(self.repos.restricted_repo_path, self.repos.restricted_repo_packages) self.utils.remove_file_if_exists(self.repos.restricted_repo_path, self.repos.restricted_repo_checksums) - urls.append(f'{self.repos.restricted_repo_mirror[0]}{self.repos.restricted_repo_changelog}') + changelog: str = f'{self.repos.restricted_repo_mirror[0]}{self.repos.restricted_repo_changelog}' + urls[changelog] = self.repos.restricted_repo_path if self.repos.restricted_repo_local[0].startswith('file'): lftp_command: str = ( @@ -257,11 +276,13 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{"".join(self.repos.restricted_repo_mirror)}{self.repos.restricted_repo_packages}') - urls.append(f'{"".join(self.repos.restricted_repo_mirror)}{self.repos.restricted_repo_checksums}') + packages: str = f'{"".join(self.repos.restricted_repo_mirror)}{self.repos.restricted_repo_packages}' + checksums: str = f'{"".join(self.repos.restricted_repo_mirror)}{self.repos.restricted_repo_checksums}' - down = Downloader(self.repos.restricted_repo_path, urls, self.flags) - down.download() + urls[packages] = self.repos.restricted_repo_path + urls[checksums] = self.repos.restricted_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.restricted_repo_name) @@ -270,7 +291,7 @@ class UpdateRepository(Configs): def gnome_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.gnome_repo_path) self.utils.remove_file_if_exists(self.repos.gnome_repo_path, self.repos.gnome_repo_changelog) @@ -284,12 +305,15 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{self.repos.gnome_repo_mirror[0]}{self.repos.gnome_repo_changelog}') - urls.append(f'{self.repos.gnome_repo_mirror[0]}{self.repos.gnome_repo_packages}') - urls.append(f'{self.repos.gnome_repo_mirror[0]}{self.repos.gnome_repo_checksums}') + changelog: str = f'{self.repos.gnome_repo_mirror[0]}{self.repos.gnome_repo_changelog}' + packages: str = f'{self.repos.gnome_repo_mirror[0]}{self.repos.gnome_repo_packages}' + checksums: str = f'{self.repos.gnome_repo_mirror[0]}{self.repos.gnome_repo_checksums}' - down = Downloader(self.repos.gnome_repo_path, urls, self.flags) - down.download() + urls[changelog] = self.repos.gnome_repo_path + urls[packages] = self.repos.gnome_repo_path + urls[checksums] = self.repos.gnome_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.gnome_repo_name) @@ -298,14 +322,15 @@ class UpdateRepository(Configs): def msb_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.msb_repo_path) self.utils.remove_file_if_exists(self.repos.msb_repo_path, self.repos.msb_repo_changelog) self.utils.remove_file_if_exists(self.repos.msb_repo_path, self.repos.msb_repo_packages) self.utils.remove_file_if_exists(self.repos.msb_repo_path, self.repos.msb_repo_checksums) - urls.append(f'{self.repos.msb_repo_mirror[0]}{self.repos.msb_repo_changelog}') + changelog: str = f'{self.repos.msb_repo_mirror[0]}{self.repos.msb_repo_changelog}' + urls[changelog] = self.repos.msb_repo_path if self.repos.msb_repo_local[0].startswith('file'): lftp_command: str = ( @@ -314,11 +339,13 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{"".join(self.repos.msb_repo_mirror)}{self.repos.msb_repo_packages}') - urls.append(f'{"".join(self.repos.msb_repo_mirror)}{self.repos.msb_repo_checksums}') + packages: str = f'{"".join(self.repos.msb_repo_mirror)}{self.repos.msb_repo_packages}' + checksums: str = f'{"".join(self.repos.msb_repo_mirror)}{self.repos.msb_repo_checksums}' - down = Downloader(self.repos.msb_repo_path, urls, self.flags) - down.download() + urls[packages] = self.repos.msb_repo_path + urls[checksums] = self.repos.msb_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.msb_repo_name) @@ -327,7 +354,7 @@ class UpdateRepository(Configs): def csb_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.csb_repo_path) self.utils.remove_file_if_exists(self.repos.csb_repo_path, self.repos.csb_repo_packages) @@ -341,12 +368,15 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{"".join(self.repos.csb_repo_mirror)}{self.repos.csb_repo_changelog}') - urls.append(f'{"".join(self.repos.csb_repo_mirror)}{self.repos.csb_repo_packages}') - urls.append(f'{"".join(self.repos.csb_repo_mirror)}{self.repos.csb_repo_checksums}') + changelog: str = f'{"".join(self.repos.csb_repo_mirror)}{self.repos.csb_repo_changelog}' + packages: str = f'{"".join(self.repos.csb_repo_mirror)}{self.repos.csb_repo_packages}' + checksums: str = f'{"".join(self.repos.csb_repo_mirror)}{self.repos.csb_repo_checksums}' - down = Downloader(self.repos.csb_repo_path, urls, self.flags) - down.download() + urls[changelog] = self.repos.csb_repo_path + urls[packages] = self.repos.csb_repo_path + urls[checksums] = self.repos.csb_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.csb_repo_name) @@ -355,7 +385,7 @@ class UpdateRepository(Configs): def conraid_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.conraid_repo_path) self.utils.remove_file_if_exists(self.repos.conraid_repo_path, self.repos.conraid_repo_changelog) @@ -369,12 +399,15 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{self.repos.conraid_repo_mirror[0]}{self.repos.conraid_repo_changelog}') - urls.append(f'{self.repos.conraid_repo_mirror[0]}{self.repos.conraid_repo_packages}') - urls.append(f'{self.repos.conraid_repo_mirror[0]}{self.repos.conraid_repo_checksums}') + changelog: str = f'{self.repos.conraid_repo_mirror[0]}{self.repos.conraid_repo_changelog}' + packages: str = f'{self.repos.conraid_repo_mirror[0]}{self.repos.conraid_repo_packages}' + checksums: str = f'{self.repos.conraid_repo_mirror[0]}{self.repos.conraid_repo_checksums}' - down = Downloader(self.repos.conraid_repo_path, urls, self.flags) - down.download() + urls[changelog] = self.repos.conraid_repo_path + urls[packages] = self.repos.conraid_repo_path + urls[checksums] = self.repos.conraid_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.conraid_repo_name) @@ -383,7 +416,7 @@ class UpdateRepository(Configs): def slackonly_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.slackonly_repo_path) self.utils.remove_file_if_exists(self.repos.slackonly_repo_path, self.repos.slackonly_repo_changelog) @@ -397,12 +430,15 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{self.repos.slackonly_repo_mirror[0]}{self.repos.slackonly_repo_changelog}') - urls.append(f'{self.repos.slackonly_repo_mirror[0]}{self.repos.slackonly_repo_packages}') - urls.append(f'{self.repos.slackonly_repo_mirror[0]}{self.repos.slackonly_repo_checksums}') + changelog: str = f'{self.repos.slackonly_repo_mirror[0]}{self.repos.slackonly_repo_changelog}' + packages: str = f'{self.repos.slackonly_repo_mirror[0]}{self.repos.slackonly_repo_packages}' + checksums: str = f'{self.repos.slackonly_repo_mirror[0]}{self.repos.slackonly_repo_checksums}' - down = Downloader(self.repos.slackonly_repo_path, urls, self.flags) - down.download() + urls[changelog] = self.repos.slackonly_repo_path + urls[packages] = self.repos.slackonly_repo_path + urls[checksums] = self.repos.slackonly_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.slackonly_repo_name) @@ -411,7 +447,7 @@ class UpdateRepository(Configs): def salixos_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.salixos_repo_path) self.utils.remove_file_if_exists(self.repos.salixos_repo_path, self.repos.salixos_repo_changelog) @@ -425,12 +461,15 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{self.repos.salixos_repo_mirror[0]}{self.repos.salixos_repo_changelog}') - urls.append(f'{self.repos.salixos_repo_mirror[0]}{self.repos.salixos_repo_packages}') - urls.append(f'{self.repos.salixos_repo_mirror[0]}{self.repos.salixos_repo_checksums}') + changelog: str = f'{self.repos.salixos_repo_mirror[0]}{self.repos.salixos_repo_changelog}' + packages: str = '{self.repos.salixos_repo_mirror[0]}{self.repos.salixos_repo_packages}' + checksums: str = f'{self.repos.salixos_repo_mirror[0]}{self.repos.salixos_repo_checksums}' - down = Downloader(self.repos.salixos_repo_path, urls, self.flags) - down.download() + urls[changelog] = self.repos.salixos_repo_path + urls[packages] = self.repos.salixos_repo_path + urls[checksums] = self.repos.salixos_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.salixos_repo_name) @@ -439,7 +478,7 @@ class UpdateRepository(Configs): def salixos_extra_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.salixos_extra_repo_path) self.utils.remove_file_if_exists(self.repos.salixos_extra_repo_path, @@ -449,7 +488,8 @@ class UpdateRepository(Configs): self.utils.remove_file_if_exists(self.repos.salixos_extra_repo_path, self.repos.salixos_extra_repo_checksums) - urls.append(f'{self.repos.salixos_extra_repo_mirror[0]}{self.repos.salixos_extra_repo_changelog}') + changelog: str = f'{self.repos.salixos_extra_repo_mirror[0]}{self.repos.salixos_extra_repo_changelog}' + urls[changelog] = self.repos.salixos_extra_repo_path if self.repos.salixos_extra_repo_local[0].startswith('file'): lftp_command: str = ( @@ -458,11 +498,16 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{"".join(self.repos.salixos_extra_repo_mirror)}{self.repos.salixos_extra_repo_packages}') - urls.append(f'{"".join(self.repos.salixos_extra_repo_mirror)}{self.repos.salixos_extra_repo_checksums}') + packages: str = f'{"".join(self.repos.salixos_extra_repo_mirror)}' \ + f'{self.repos.salixos_extra_repo_packages}' + checksums: str = (f'{"".join(self.repos.salixos_extra_repo_mirror)}' + f'{self.repos.salixos_extra_repo_checksums}') - down = Downloader(self.repos.salixos_extra_repo_path, urls, self.flags) - down.download() + urls[packages] = self.repos.salixos_extra_repo_path + urls[checksums] = self.repos.salixos_extra_repo_path + + self.download.download(urls) + print() self.delete_bin_database_data(self.repos.salixos_extra_repo_name) self.delete_last_updated(self.repos.salixos_extra_repo_name) @@ -470,7 +515,7 @@ class UpdateRepository(Configs): def salixos_patches_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.slack_patches_repo_path) self.utils.remove_file_if_exists(self.repos.salixos_patches_repo_path, @@ -480,7 +525,8 @@ class UpdateRepository(Configs): self.utils.remove_file_if_exists(self.repos.salixos_patches_repo_path, self.repos.salixos_patches_repo_checksums) - urls.append(f'{self.repos.salixos_patches_repo_mirror[0]}{self.repos.salixos_patches_repo_changelog}') + changelog: str = f'{self.repos.salixos_patches_repo_mirror[0]}{self.repos.salixos_patches_repo_changelog}' + urls[changelog] = self.repos.salixos_patches_repo_path if self.repos.salixos_patches_repo_local[0].startswith('file'): lftp_command: str = ( @@ -489,13 +535,15 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{"".join(self.repos.salixos_patches_repo_mirror)}' - f'{self.repos.salixos_patches_repo_packages}') - urls.append(f'{"".join(self.repos.salixos_patches_repo_mirror)}' - f'{self.repos.salixos_patches_repo_checksums}') + packages: str = (f'{"".join(self.repos.salixos_patches_repo_mirror)}' + f'{self.repos.salixos_patches_repo_packages}') + checksums: str = (f'{"".join(self.repos.salixos_patches_repo_mirror)}' + f'{self.repos.salixos_patches_repo_checksums}') - down = Downloader(self.repos.salixos_patches_repo_path, urls, self.flags) - down.download() + urls[packages] = self.repos.salixos_patches_repo_path + urls[checksums] = self.repos.salixos_patches_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.salixos_patches_repo_name) @@ -504,7 +552,7 @@ class UpdateRepository(Configs): def slackel_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.slackel_repo_path) self.utils.remove_file_if_exists(self.repos.slackel_repo_path, self.repos.slackel_repo_changelog) @@ -518,12 +566,15 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{self.repos.slackel_repo_mirror[0]}{self.repos.slackel_repo_changelog}') - urls.append(f'{self.repos.slackel_repo_mirror[0]}{self.repos.slackel_repo_packages}') - urls.append(f'{self.repos.slackel_repo_mirror[0]}{self.repos.slackel_repo_checksums}') + changelog: str = f'{self.repos.slackel_repo_mirror[0]}{self.repos.slackel_repo_changelog}' + packages: str = f'{self.repos.slackel_repo_mirror[0]}{self.repos.slackel_repo_packages}' + checksums: str = f'{self.repos.slackel_repo_mirror[0]}{self.repos.slackel_repo_checksums}' - down = Downloader(self.repos.slackel_repo_path, urls, self.flags) - down.download() + urls[changelog] = self.repos.slackel_repo_path + urls[packages] = self.repos.slackel_repo_path + urls[checksums] = self.repos.slackel_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.slackel_repo_name) @@ -532,7 +583,7 @@ class UpdateRepository(Configs): def slint_repository(self) -> None: if not self.option_for_install_data: - urls: list = [] + urls: dict = {} self.utils.create_directory(self.repos.slint_repo_path) self.utils.remove_file_if_exists(self.repos.slint_repo_path, self.repos.slint_repo_changelog) @@ -546,12 +597,15 @@ class UpdateRepository(Configs): ) self.utils.process(lftp_command) else: - urls.append(f'{self.repos.slint_repo_mirror[0]}{self.repos.slint_repo_changelog}') - urls.append(f'{self.repos.slint_repo_mirror[0]}{self.repos.slint_repo_packages}') - urls.append(f'{self.repos.slint_repo_mirror[0]}{self.repos.slint_repo_checksums}') + changelog: str = f'{self.repos.slint_repo_mirror[0]}{self.repos.slint_repo_changelog}' + packages: str = f'{self.repos.slint_repo_mirror[0]}{self.repos.slint_repo_packages}' + checksums: str = f'{self.repos.slint_repo_mirror[0]}{self.repos.slint_repo_checksums}' - down = Downloader(self.repos.slint_repo_path, urls, self.flags) - down.download() + urls[changelog] = self.repos.slint_repo_path + urls[packages] = self.repos.slint_repo_path + urls[checksums] = self.repos.slint_repo_path + + self.download.download(urls) print() self.delete_bin_database_data(self.repos.slint_repo_name)