mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-25 09:58:41 +01:00
Updated for ponce
This commit is contained in:
parent
5a6c7de600
commit
b53f8227c0
2 changed files with 7 additions and 10 deletions
|
@ -32,7 +32,8 @@
|
|||
SBO_REPO_TAG = "_SBo"
|
||||
|
||||
# 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].
|
||||
PONCE_REPO = false
|
||||
PONCE_REPO_PATH = "/var/lib/slpkg/repository/ponce/"
|
||||
|
@ -49,7 +50,6 @@
|
|||
REMOVEPKG = "removepkg"
|
||||
|
||||
# You can choose downloader between wget and curl.
|
||||
# Ponce repository works only with 'lftp' downloader.
|
||||
# Default is wget. [wget/curl].
|
||||
DOWNLOADER = "wget"
|
||||
# Wget downloader options.
|
||||
|
@ -59,9 +59,6 @@
|
|||
# --show-progress, Force wget to display the progress bar in any verbosity.
|
||||
WGET_OPTIONS = "-c -N -q --show-progress"
|
||||
# Curl downloader options.
|
||||
# Pass the options you want here.
|
||||
CURL_OPTIONS = ""
|
||||
# Lftp downloader options.
|
||||
# 'LFTP_MIRROR_OPTIONS' are used only for the ponce repository to transfer files
|
||||
# from the ponce repository.
|
||||
# Lftp downloader options are used to synchronize with the ponce repository.
|
||||
LFTP_MIRROR_OPTIONS = "-c mirror --parallel=100 --only-newer"
|
||||
|
|
|
@ -44,15 +44,15 @@ class UpdateRepository(Configs):
|
|||
subprocess.call(f'lftp {self.lftp_mirror_options} {self.ponce_repo_url} {self.ponce_repo_path}',
|
||||
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')
|
||||
|
||||
# Generating the SLACKBUILDS.TXT file.
|
||||
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.
|
||||
shutil.move(f'{self.ponce_repo_path}{self.sbo_txt}', f'{self.sbo_repo_path}{self.sbo_txt}')
|
||||
# Move the SLACKBUILDS.TXT to the repository to install the data into the database.
|
||||
shutil.move(f'{self.ponce_repo_path}{self.ponce_txt}', f'{self.sbo_repo_path}{self.ponce_txt}')
|
||||
|
||||
self.delete_sbo_data()
|
||||
|
||||
|
|
Loading…
Reference in a new issue