diff --git a/configs/slpkg.toml b/configs/slpkg.toml index e2b4a3cd..8874828d 100644 --- a/configs/slpkg.toml +++ b/configs/slpkg.toml @@ -124,12 +124,6 @@ LFTP_GET_OPTIONS = "-c get -e" # Ponce repositories or for the local repositories. LFTP_MIRROR_OPTIONS = "-c mirror --parallel=100 --only-newer --delete" -# Extra lftp options by repository, using a key = value pair. -# Example, if you want to exclude some files or directories: -# {"slack" = "-x source/ -x patches/", "sbo" = "-x '*.tar.gz*'"} -# Be sure of the name, as set it in the /etc/slpkg/repositories.toml file. -LFTP_MIRROR_EXTRA_OPTIONS = {} - # Python urllib3 settings used for checking between two changelog files. # Timeouts allow you to control how long (in seconds) requests are allowed # to run before being aborted. In simple cases, you can specify a timeout diff --git a/slpkg/configs.py b/slpkg/configs.py index 4a7abe70..9e141a48 100644 --- a/slpkg/configs.py +++ b/slpkg/configs.py @@ -50,7 +50,6 @@ class Configs: curl_options: str = '' lftp_get_options: str = '-c get -e' lftp_mirror_options: str = '-c mirror --parallel=100 --only-newer --delete' - lftp_mirror_extra_options = {} ascii_characters: bool = True ask_question: bool = True parallel_downloads: bool = False @@ -97,7 +96,6 @@ class Configs: curl_options: str = config['CURL_OPTIONS'] lftp_get_options: str = config['LFTP_GET_OPTIONS'] lftp_mirror_options: str = config['LFTP_MIRROR_OPTIONS'] - lftp_mirror_extra_options = config['LFTP_MIRROR_EXTRA_OPTIONS'] ascii_characters: bool = config['ASCII_CHARACTERS'] file_list_suffix: str = config['FILE_LIST_SUFFIX'] parallel_downloads: bool = config['PARALLEL_DOWNLOADS'] diff --git a/slpkg/dialog_configs.py b/slpkg/dialog_configs.py index 3279189a..cf0f46f0 100644 --- a/slpkg/dialog_configs.py +++ b/slpkg/dialog_configs.py @@ -133,7 +133,6 @@ class FormConfigs(Configs): 'SPINNING_BAR =', 'CASE_SENSITIVE =', 'PROCESS_LOG =', - 'LFTP_MIRROR_EXTRA_OPTIONS =', 'URLLIB_RETRIES =', 'URLLIB_REDIRECT =', 'URLLIB_TIMEOUT =', diff --git a/slpkg/update_repositories.py b/slpkg/update_repositories.py index 51286489..2547aa4b 100644 --- a/slpkg/update_repositories.py +++ b/slpkg/update_repositories.py @@ -34,7 +34,6 @@ class UpdateRepositories(Configs): self.download = Downloader(flags) self.repos_for_update: dict = {} - self.lftp_extra_options: str = ' ' self.option_for_repository: bool = self.utils.is_option( ('-o', '--repository'), flags) @@ -74,22 +73,16 @@ class UpdateRepositories(Configs): if self.option_for_repository: self.view_downloading_message(self.repository) - self.set_lftp_extra_options(self.repository) repositories[self.repository]() else: for repo, update in self.repos_for_update.items(): if update: self.view_downloading_message(repo) - self.set_lftp_extra_options(repo) repositories[repo]() def view_downloading_message(self, repo: str) -> None: print(f"Syncing with the repository '{self.green}{repo}{self.endc}', please wait...\n") - def set_lftp_extra_options(self, repository: str) -> None: - if self.lftp_mirror_extra_options.get(repository): - self.lftp_extra_options: str = f' {self.lftp_mirror_extra_options[repository]} ' - def slack_repository(self) -> None: urls: dict = {} self.utils.create_directory(self.repos.slack_repo_path) @@ -402,8 +395,7 @@ class UpdateRepositories(Configs): self.utils.remove_file_if_exists(self.repos.ponce_repo_path, self.repos.ponce_repo_slackbuilds) self.utils.remove_file_if_exists(self.repos.ponce_repo_path, self.repos.ponce_repo_changelog) - lftp_command: str = (f'lftp {self.lftp_mirror_options}{self.lftp_extra_options}' - f'{self.repos.ponce_repo_mirror[0]} {self.repos.ponce_repo_path}') + lftp_command: str = f'lftp {self.lftp_mirror_options} {self.repos.ponce_repo_mirror[0]} {self.repos.ponce_repo_path}' self.multi_process.process(lftp_command) @@ -418,8 +410,7 @@ class UpdateRepositories(Configs): self.utils.remove_file_if_exists(self.repos.sbo_repo_path, self.repos.sbo_repo_slackbuilds) self.utils.remove_file_if_exists(self.repos.sbo_repo_path, self.repos.sbo_repo_changelog) - lftp_command: str = (f'lftp {self.lftp_mirror_options}{self.lftp_extra_options}' - f'{self.repos.sbo_repo_mirror[0]} {self.repos.sbo_repo_path}') + lftp_command: str = f'lftp {self.lftp_mirror_options} {self.repos.sbo_repo_mirror[0]} {self.repos.sbo_repo_path}' self.multi_process.process(lftp_command)