Updated for ponce

This commit is contained in:
Dimitris Zlatanidis 2023-03-04 22:08:34 +02:00
parent 5a6c7de600
commit b53f8227c0
2 changed files with 7 additions and 10 deletions

View file

@ -32,7 +32,8 @@
SBO_REPO_TAG = "_SBo" SBO_REPO_TAG = "_SBo"
# PONCE REPOSITORY CONFIGS. # PONCE REPOSITORY CONFIGS.
# Set the 'PONCE_REPO = true' to switch with the ponce repository. # Set the 'PONCE_REPO = true' to switch with the ponce repository and
# run 'slpkg update' to update the database.
# Default is false. [true/false]. # Default is false. [true/false].
PONCE_REPO = false PONCE_REPO = false
PONCE_REPO_PATH = "/var/lib/slpkg/repository/ponce/" PONCE_REPO_PATH = "/var/lib/slpkg/repository/ponce/"
@ -49,7 +50,6 @@
REMOVEPKG = "removepkg" REMOVEPKG = "removepkg"
# You can choose downloader between wget and curl. # You can choose downloader between wget and curl.
# Ponce repository works only with 'lftp' downloader.
# Default is wget. [wget/curl]. # Default is wget. [wget/curl].
DOWNLOADER = "wget" DOWNLOADER = "wget"
# Wget downloader options. # Wget downloader options.
@ -59,9 +59,6 @@
# --show-progress, Force wget to display the progress bar in any verbosity. # --show-progress, Force wget to display the progress bar in any verbosity.
WGET_OPTIONS = "-c -N -q --show-progress" WGET_OPTIONS = "-c -N -q --show-progress"
# Curl downloader options. # Curl downloader options.
# Pass the options you want here.
CURL_OPTIONS = "" CURL_OPTIONS = ""
# Lftp downloader options. # Lftp downloader options are used to synchronize with the ponce repository.
# 'LFTP_MIRROR_OPTIONS' are used only for the ponce repository to transfer files
# from the ponce repository.
LFTP_MIRROR_OPTIONS = "-c mirror --parallel=100 --only-newer" LFTP_MIRROR_OPTIONS = "-c mirror --parallel=100 --only-newer"

View file

@ -44,15 +44,15 @@ class UpdateRepository(Configs):
subprocess.call(f'lftp {self.lftp_mirror_options} {self.ponce_repo_url} {self.ponce_repo_path}', subprocess.call(f'lftp {self.lftp_mirror_options} {self.ponce_repo_url} {self.ponce_repo_path}',
shell=True) shell=True)
print(f'Generating the {self.sbo_txt} file... ', end='', flush=True) print(f'Generating the {self.ponce_txt} file... ', end='', flush=True)
print('\n') print('\n')
# Generating the SLACKBUILDS.TXT file. # Generating the SLACKBUILDS.TXT file.
os.chdir(self.ponce_repo_path) os.chdir(self.ponce_repo_path)
subprocess.call(f'./gen_sbo_txt.sh > {self.sbo_txt}', shell=True) subprocess.call(f'./gen_sbo_txt.sh > {self.ponce_txt}', shell=True)
# Move the SLACKBUILDS.TXT to the repository for install the data into the database. # Move the SLACKBUILDS.TXT to the repository to install the data into the database.
shutil.move(f'{self.ponce_repo_path}{self.sbo_txt}', f'{self.sbo_repo_path}{self.sbo_txt}') shutil.move(f'{self.ponce_repo_path}{self.ponce_txt}', f'{self.sbo_repo_path}{self.ponce_txt}')
self.delete_sbo_data() self.delete_sbo_data()