From a2d478e3e2d32d7d3ab5c3b3065b355c2a7e41f6 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 1 Mar 2023 22:59:09 +0200 Subject: [PATCH] Updated for ponce repo --- configs/slpkg.toml | 4 ++-- slpkg/downloader.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configs/slpkg.toml b/configs/slpkg.toml index b55c500e..fc024530 100644 --- a/configs/slpkg.toml +++ b/configs/slpkg.toml @@ -81,8 +81,8 @@ # Default is true. [true/false]. ASCII_CHARACTERS = true - # Set the 'PONCE_REPO = true' to switch with the ponce repository. - # Do not unset SBO_REPO_URL and SBO_TXT. + # Set the 'PONCE_REPO = true' and 'DOWNLOADER = lftp' to switch with + # the ponce repository. Do not unset SBO_REPO_URL and SBO_TXT. # NOTE: Ponce repository works only with 'lftp' downloader. ######################################################################### # This is not going to fully support this repository, since it does not # diff --git a/slpkg/downloader.py b/slpkg/downloader.py index d8d8e370..241034d8 100644 --- a/slpkg/downloader.py +++ b/slpkg/downloader.py @@ -52,7 +52,8 @@ class Downloader(Configs, Utilities): stdout=self.stdout) elif self.downloader == 'lftp': - if 'ponce' in self.url: + if self.ponce_repo and 'ponce' in self.url: + # Download files from a directory. self.output = subprocess.call(f"lftp {self.lftp_mirror_options} {self.url} {self.path}", shell=True, stderr=self.stderr, stdout=self.stdout) # Create /path/name.Slackbuild @@ -61,6 +62,7 @@ class Downloader(Configs, Utilities): if slackbuild.is_file(): os.chmod(slackbuild, 0o775) else: + # Download binaries files and the sources. self.output = subprocess.call(f"lftp {self.lftp_get_options} {self.url} -o {self.path}", shell=True, stderr=self.stderr, stdout=self.stdout)