Updated for order

This commit is contained in:
Dimitris Zlatanidis 2024-05-01 23:04:53 +03:00
parent 134035fbdb
commit b71b52642c

View file

@ -105,14 +105,7 @@ class UpdateRepositories(Configs): # pylint: disable=[R0902]
repo (str): Repository name. repo (str): Repository name.
""" """
urls: dict = {} urls: dict = {}
self.import_gpg_key(mirror=self.repos.repositories[repo]['mirror_changelog'])
self.utils.create_directory(self.repos.repositories[repo]['path'])
self.utils.remove_file_if_exists(self.repos.repositories[repo]['path'],
self.repos.repositories[repo]['changelog_txt'])
self.utils.remove_file_if_exists(self.repos.repositories[repo]['path'],
self.repos.repositories[repo]['packages_txt'])
self.utils.remove_file_if_exists(self.repos.repositories[repo]['path'],
self.repos.repositories[repo]['checksums_md5'])
changelog: str = (f"{self.repos.repositories[repo]['mirror_changelog']}" changelog: str = (f"{self.repos.repositories[repo]['mirror_changelog']}"
f"{self.repos.repositories[repo]['changelog_txt']}") f"{self.repos.repositories[repo]['changelog_txt']}")
@ -123,7 +116,14 @@ class UpdateRepositories(Configs): # pylint: disable=[R0902]
urls[repo] = ((changelog, packages, checksums), self.repos.repositories[repo]['path']) urls[repo] = ((changelog, packages, checksums), self.repos.repositories[repo]['path'])
self.import_gpg_key(mirror=self.repos.repositories[repo]['mirror_changelog']) self.utils.remove_file_if_exists(self.repos.repositories[repo]['path'],
self.repos.repositories[repo]['changelog_txt'])
self.utils.remove_file_if_exists(self.repos.repositories[repo]['path'],
self.repos.repositories[repo]['packages_txt'])
self.utils.remove_file_if_exists(self.repos.repositories[repo]['path'],
self.repos.repositories[repo]['checksums_md5'])
self.utils.create_directory(self.repos.repositories[repo]['path'])
self.download.download(urls) self.download.download(urls)
@ -135,18 +135,19 @@ class UpdateRepositories(Configs): # pylint: disable=[R0902]
Args: Args:
repo (str): Repository name. repo (str): Repository name.
""" """
self.utils.create_directory(self.repos.repositories[repo]['path']) self.import_gpg_key(mirror='https://www.slackbuilds.org/')
self.utils.remove_file_if_exists(self.repos.repositories[repo]['path'], self.utils.remove_file_if_exists(self.repos.repositories[repo]['path'],
self.repos.repositories[repo]['slackbuilds_txt']) self.repos.repositories[repo]['slackbuilds_txt'])
self.utils.remove_file_if_exists(self.repos.repositories[repo]['path'], self.utils.remove_file_if_exists(self.repos.repositories[repo]['path'],
self.repos.repositories[repo]['changelog_txt']) self.repos.repositories[repo]['changelog_txt'])
self.utils.create_directory(self.repos.repositories[repo]['path'])
lftp_command: str = (f"lftp {self.lftp_mirror_options} " lftp_command: str = (f"lftp {self.lftp_mirror_options} "
f"{self.repos.repositories[repo]['mirror_packages']} " f"{self.repos.repositories[repo]['mirror_packages']} "
f"{self.repos.repositories[repo]['path']}") f"{self.repos.repositories[repo]['path']}")
self.import_gpg_key(mirror='https://www.slackbuilds.org/')
self.multi_process.process(lftp_command) self.multi_process.process(lftp_command)
# It checks if there is a SLACKBUILDS.TXT file, otherwise it's going to create one. # It checks if there is a SLACKBUILDS.TXT file, otherwise it's going to create one.