mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Updated for repo name
This commit is contained in:
parent
e9c98e2ec0
commit
87f58a0fba
7 changed files with 27 additions and 18 deletions
|
@ -1,18 +1,21 @@
|
||||||
# Repositories configuration file.
|
# Repositories configuration file.
|
||||||
[REPOSITORIES]
|
[REPOSITORIES]
|
||||||
|
|
||||||
|
SBO_REPO_NAME = "sbo"
|
||||||
SBO_REPO_URL = "https://slackbuilds.org/slackbuilds/15.0/"
|
SBO_REPO_URL = "https://slackbuilds.org/slackbuilds/15.0/"
|
||||||
SBO_REPO_TXT = "SLACKBUILDS.TXT"
|
SBO_REPO_TXT = "SLACKBUILDS.TXT"
|
||||||
SBO_REPO_CHGLOG_TXT = "ChangeLog.txt"
|
SBO_REPO_CHGLOG_TXT = "ChangeLog.txt"
|
||||||
SBO_REPO_TAR_SUFFIX = ".tar.gz"
|
SBO_REPO_TAR_SUFFIX = ".tar.gz"
|
||||||
SBO_REPO_TAG = "_SBo"
|
SBO_REPO_TAG = "_SBo"
|
||||||
|
|
||||||
|
PONCE_REPO_NAME = "ponce"
|
||||||
PONCE_REPO = false
|
PONCE_REPO = false
|
||||||
PONCE_REPO_URL = "https://cgit.ponce.cc/slackbuilds/plain/"
|
PONCE_REPO_URL = "https://cgit.ponce.cc/slackbuilds/plain/"
|
||||||
PONCE_REPO_TXT = "SLACKBUILDS.TXT"
|
PONCE_REPO_TXT = "SLACKBUILDS.TXT"
|
||||||
PONCE_REPO_CHGLOG_TXT = "ChangeLog.txt"
|
PONCE_REPO_CHGLOG_TXT = "ChangeLog.txt"
|
||||||
PONCE_REPO_TAG = "_SBo"
|
PONCE_REPO_TAG = "_SBo"
|
||||||
|
|
||||||
|
GNOME_REPO_NAME = "gnome"
|
||||||
GNOME_REPO = true
|
GNOME_REPO = true
|
||||||
GNOME_REPO_URL = "https://reddoglinux.ddns.net/linux/gnome/43.x/x86_64/"
|
GNOME_REPO_URL = "https://reddoglinux.ddns.net/linux/gnome/43.x/x86_64/"
|
||||||
GNOME_REPO_PKG_TXT = "PACKAGES.TXT"
|
GNOME_REPO_PKG_TXT = "PACKAGES.TXT"
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
# File suffix for list packages.
|
# File suffix for list packages.
|
||||||
# Change here if you are going to use '.sqf' files.
|
# Change here if you are going to use '.sqf' files.
|
||||||
FILE_LIST_SUFFIX = ".pkgs"
|
FILE_LIST_SUFFIX = ".pkgs"
|
||||||
# Configs for displaying colorful menu. Default is true. [true/false].
|
# Configs for displaying colorful menu. Default is true. [true/false]
|
||||||
COLORS = true
|
COLORS = true
|
||||||
# Dialog is a program that will let you present a variety of questions or
|
# Dialog is a program that will let you present a variety of questions or
|
||||||
# display messages using dialog boxes from a shell script.
|
# display messages using dialog boxes from a shell script.
|
||||||
# Default is true. [true/false].
|
# Default is true. [true/false]
|
||||||
DIALOG = true
|
DIALOG = true
|
||||||
# If silent mode is true, it does not print the commands as they are executed.
|
# If silent mode is true, it does not print the commands as they are executed.
|
||||||
# Default is true. [true/false].
|
# Default is true. [true/false]
|
||||||
SILENT_MODE = true
|
SILENT_MODE = true
|
||||||
# Choose ascii printable characters.
|
# Choose ascii printable characters.
|
||||||
# If true, it uses the extended characters, otherwise the basic ones.
|
# If true, it uses the extended characters, otherwise the basic ones.
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
# Set false to all the questions. If set false, option --yes will not work.
|
# Set false to all the questions. If set false, option --yes will not work.
|
||||||
# Default is true. [true/false].
|
# Default is true. [true/false].
|
||||||
ASK_QUESTION = true
|
ASK_QUESTION = true
|
||||||
# Download sources in parallel. Default is false. [true/false].
|
# Download sources in parallel. Default is false. [true/false]
|
||||||
PARALLEL_DOWNLOADS = false
|
PARALLEL_DOWNLOADS = false
|
||||||
# Pass your file pattern here, instead, you can use '--file-pattern=' or '-F=' option.
|
# Pass your file pattern here, instead, you can use '--file-pattern=' or '-F=' option.
|
||||||
FILE_PATTERN = ""
|
FILE_PATTERN = ""
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
REMOVEPKG = "removepkg"
|
REMOVEPKG = "removepkg"
|
||||||
|
|
||||||
# You can choose a downloader among wget, curl and lftp.
|
# You can choose a downloader among wget, curl and lftp.
|
||||||
# Default is wget. [wget/curl/lftp].
|
# Default is wget. [wget/curl/lftp]
|
||||||
DOWNLOADER = "wget"
|
DOWNLOADER = "wget"
|
||||||
# Wget downloader options.
|
# Wget downloader options.
|
||||||
# -c, --continue: resume getting a partially-downloaded file.
|
# -c, --continue: resume getting a partially-downloaded file.
|
||||||
|
|
|
@ -42,18 +42,18 @@ class CheckUpdates(Configs):
|
||||||
|
|
||||||
if self.utils.is_option(self.flag_binary, self.flags):
|
if self.utils.is_option(self.flag_binary, self.flags):
|
||||||
if self.repos.gnome_repo:
|
if self.repos.gnome_repo:
|
||||||
repo: str = 'gnome'
|
repo: str = self.repos.gnome_repo_name
|
||||||
self.local_chg_txt: Path = Path(self.repos.gnome_repo_path, self.repos.gnome_repo_chglog_pkg_txt)
|
self.local_chg_txt: Path = Path(self.repos.gnome_repo_path, self.repos.gnome_repo_chglog_pkg_txt)
|
||||||
self.repo_chg_txt: str = f'{self.repos.gnome_repo_url}{self.repos.gnome_repo_chglog_pkg_txt}'
|
self.repo_chg_txt: str = f'{self.repos.gnome_repo_url}{self.repos.gnome_repo_chglog_pkg_txt}'
|
||||||
compare: bool = self.compare_dates()
|
compare: bool = self.compare_dates()
|
||||||
else:
|
else:
|
||||||
if self.repos.ponce_repo:
|
if self.repos.ponce_repo:
|
||||||
repo: str = 'ponce'
|
repo: str = self.repos.ponce_repo_name
|
||||||
self.local_chg_txt: Path = Path(self.repos.ponce_repo_path, self.repos.ponce_repo_chglog_txt)
|
self.local_chg_txt: Path = Path(self.repos.ponce_repo_path, self.repos.ponce_repo_chglog_txt)
|
||||||
self.repo_chg_txt: str = f'{self.repos.ponce_repo_url}{self.repos.ponce_repo_chglog_txt}'
|
self.repo_chg_txt: str = f'{self.repos.ponce_repo_url}{self.repos.ponce_repo_chglog_txt}'
|
||||||
compare: bool = self.compare_dates()
|
compare: bool = self.compare_dates()
|
||||||
else:
|
else:
|
||||||
repo: str = 'sbo'
|
repo: str = self.repos.sbo_repo_name
|
||||||
self.local_chg_txt: Path = Path(self.repos.sbo_repo_path, self.repos.sbo_repo_chglog_txt)
|
self.local_chg_txt: Path = Path(self.repos.sbo_repo_path, self.repos.sbo_repo_chglog_txt)
|
||||||
self.repo_chg_txt: str = f'{self.repos.sbo_repo_url}{self.repos.sbo_repo_chglog_txt}'
|
self.repo_chg_txt: str = f'{self.repos.sbo_repo_url}{self.repos.sbo_repo_chglog_txt}'
|
||||||
compare: bool = self.compare_dates()
|
compare: bool = self.compare_dates()
|
||||||
|
|
|
@ -71,7 +71,6 @@ class CreateData(Configs):
|
||||||
|
|
||||||
def install_gnome_data(self) -> None:
|
def install_gnome_data(self) -> None:
|
||||||
""" Install the data for SBo repository. """
|
""" Install the data for SBo repository. """
|
||||||
repo: str = 'gnome'
|
|
||||||
pkg_tag = [
|
pkg_tag = [
|
||||||
'PACKAGE NAME:',
|
'PACKAGE NAME:',
|
||||||
'PACKAGE MIRROR:',
|
'PACKAGE MIRROR:',
|
||||||
|
@ -80,7 +79,7 @@ class CreateData(Configs):
|
||||||
'PACKAGE SIZE (uncompressed):',
|
'PACKAGE SIZE (uncompressed):',
|
||||||
'PACKAGE DESCRIPTION:',
|
'PACKAGE DESCRIPTION:',
|
||||||
]
|
]
|
||||||
path = Path(self.lib_path, 'repositories', repo, self.repos.gnome_repo_pkg_txt)
|
path = Path(self.lib_path, 'repositories', self.repos.gnome_repo_name, self.repos.gnome_repo_pkg_txt)
|
||||||
|
|
||||||
pkg_txt: list = self.utils.read_file(path)
|
pkg_txt: list = self.utils.read_file(path)
|
||||||
|
|
||||||
|
@ -122,7 +121,7 @@ class CreateData(Configs):
|
||||||
|
|
||||||
if len(cache) == 8:
|
if len(cache) == 8:
|
||||||
data: str = BinariesTable(
|
data: str = BinariesTable(
|
||||||
repo=repo,
|
repo=self.repos.gnome_repo_name,
|
||||||
name=cache[0],
|
name=cache[0],
|
||||||
version=cache[1],
|
version=cache[1],
|
||||||
package=cache[2],
|
package=cache[2],
|
||||||
|
|
|
@ -25,6 +25,7 @@ class Repositories(Configs):
|
||||||
|
|
||||||
self.repos: dict = {}
|
self.repos: dict = {}
|
||||||
|
|
||||||
|
self.sbo_repo_name: str = 'sbo'
|
||||||
self.sbo_repo_path: Path = Path(self.lib_path, 'repositories', 'sbo')
|
self.sbo_repo_path: Path = Path(self.lib_path, 'repositories', 'sbo')
|
||||||
self.sbo_repo_url: str = "https://slackbuilds.org/slackbuilds/15.0/"
|
self.sbo_repo_url: str = "https://slackbuilds.org/slackbuilds/15.0/"
|
||||||
self.sbo_repo_txt: str = "SLACKBUILDS.TXT"
|
self.sbo_repo_txt: str = "SLACKBUILDS.TXT"
|
||||||
|
@ -32,6 +33,7 @@ class Repositories(Configs):
|
||||||
self.sbo_repo_tar_suffix: str = ".tar.gz"
|
self.sbo_repo_tar_suffix: str = ".tar.gz"
|
||||||
self.sbo_repo_tag: str = "_SBo"
|
self.sbo_repo_tag: str = "_SBo"
|
||||||
|
|
||||||
|
self.ponce_repo_name: str = 'ponce'
|
||||||
self.ponce_repo: bool = False
|
self.ponce_repo: bool = False
|
||||||
self.ponce_repo_path: Path = Path(self.lib_path, 'repositories', 'ponce')
|
self.ponce_repo_path: Path = Path(self.lib_path, 'repositories', 'ponce')
|
||||||
self.ponce_repo_url: str = "https://cgit.ponce.cc/slackbuilds/plain/"
|
self.ponce_repo_url: str = "https://cgit.ponce.cc/slackbuilds/plain/"
|
||||||
|
@ -39,6 +41,7 @@ class Repositories(Configs):
|
||||||
self.ponce_repo_chglog_txt: str = "ChangeLog.txt"
|
self.ponce_repo_chglog_txt: str = "ChangeLog.txt"
|
||||||
self.ponce_repo_tag: str = "_SBo"
|
self.ponce_repo_tag: str = "_SBo"
|
||||||
|
|
||||||
|
self.gnome_repo_name: str = 'gnome'
|
||||||
self.gnome_repo: bool = True
|
self.gnome_repo: bool = True
|
||||||
self.gnome_repo_path: Path = Path(self.lib_path, 'repositories', 'gnome')
|
self.gnome_repo_path: Path = Path(self.lib_path, 'repositories', 'gnome')
|
||||||
self.gnome_repo_url: str = "https://reddoglinux.ddns.net/linux/gnome/43.x/x86_64/"
|
self.gnome_repo_url: str = "https://reddoglinux.ddns.net/linux/gnome/43.x/x86_64/"
|
||||||
|
@ -55,18 +58,21 @@ class Repositories(Configs):
|
||||||
with open(self.repositories_file_toml, 'rb') as repo:
|
with open(self.repositories_file_toml, 'rb') as repo:
|
||||||
self.repos: dict = tomli.load(repo)['REPOSITORIES']
|
self.repos: dict = tomli.load(repo)['REPOSITORIES']
|
||||||
|
|
||||||
|
self.sbo_repo_name: str = self.repos['SBO_REPO_NAME']
|
||||||
self.sbo_repo_url: str = self.repos['SBO_REPO_URL']
|
self.sbo_repo_url: str = self.repos['SBO_REPO_URL']
|
||||||
self.sbo_repo_txt: str = self.repos['SBO_REPO_TXT']
|
self.sbo_repo_txt: str = self.repos['SBO_REPO_TXT']
|
||||||
self.sbo_repo_chglog_txt: str = self.repos['SBO_REPO_CHGLOG_TXT']
|
self.sbo_repo_chglog_txt: str = self.repos['SBO_REPO_CHGLOG_TXT']
|
||||||
self.sbo_repo_tar_suffix: str = self.repos['SBO_REPO_TAR_SUFFIX']
|
self.sbo_repo_tar_suffix: str = self.repos['SBO_REPO_TAR_SUFFIX']
|
||||||
self.sbo_repo_tag: str = self.repos['SBO_REPO_TAG']
|
self.sbo_repo_tag: str = self.repos['SBO_REPO_TAG']
|
||||||
|
|
||||||
|
self.ponce_repo_name: str = self.repos['PONCE_REPO_NAME']
|
||||||
self.ponce_repo: bool = self.repos['PONCE_REPO']
|
self.ponce_repo: bool = self.repos['PONCE_REPO']
|
||||||
self.ponce_repo_url: str = self.repos['PONCE_REPO_URL']
|
self.ponce_repo_url: str = self.repos['PONCE_REPO_URL']
|
||||||
self.ponce_repo_txt: str = self.repos['PONCE_REPO_TXT']
|
self.ponce_repo_txt: str = self.repos['PONCE_REPO_TXT']
|
||||||
self.ponce_repo_chglog_txt: str = self.repos['PONCE_REPO_CHGLOG_TXT']
|
self.ponce_repo_chglog_txt: str = self.repos['PONCE_REPO_CHGLOG_TXT']
|
||||||
self.ponce_repo_tag: str = self.repos['PONCE_REPO_TAG']
|
self.ponce_repo_tag: str = self.repos['PONCE_REPO_TAG']
|
||||||
|
|
||||||
|
self.gnome_repo_name: str = self.repos['GNOME_REPO_NAME']
|
||||||
self.gnome_repo: bool = self.repos['GNOME_REPO']
|
self.gnome_repo: bool = self.repos['GNOME_REPO']
|
||||||
self.gnome_repo_url: str = self.repos['GNOME_REPO_URL']
|
self.gnome_repo_url: str = self.repos['GNOME_REPO_URL']
|
||||||
self.gnome_repo_pkg_txt: str = self.repos['GNOME_REPO_PKG_TXT']
|
self.gnome_repo_pkg_txt: str = self.repos['GNOME_REPO_PKG_TXT']
|
||||||
|
|
|
@ -61,7 +61,7 @@ class UpdateRepository(Configs):
|
||||||
""" Update the binary repositories. """
|
""" Update the binary repositories. """
|
||||||
if self.repos.gnome_repo:
|
if self.repos.gnome_repo:
|
||||||
print('Updating the packages list...\n')
|
print('Updating the packages list...\n')
|
||||||
print(f"Downloading the '{self.green}gnome{self.endc}' repository, please wait...\n")
|
print(f"Downloading the '{self.green}{self.repos.gnome_repo_name}{self.endc}' repository, please wait...\n")
|
||||||
repo: str = 'gnome'
|
repo: str = 'gnome'
|
||||||
self.make_dirs(repo)
|
self.make_dirs(repo)
|
||||||
|
|
||||||
|
@ -81,10 +81,11 @@ class UpdateRepository(Configs):
|
||||||
def slackbuild_repositories(self):
|
def slackbuild_repositories(self):
|
||||||
""" Update the slackbuild repositories. """
|
""" Update the slackbuild repositories. """
|
||||||
if self.repos.ponce_repo:
|
if self.repos.ponce_repo:
|
||||||
self.make_dirs('gnome')
|
self.make_dirs(self.repos.gnome_repo_name)
|
||||||
if not self.utils.is_option(self.flag_generate, self.flags):
|
if not self.utils.is_option(self.flag_generate, self.flags):
|
||||||
print('Updating the packages list...\n')
|
print('Updating the packages list...\n')
|
||||||
print(f"Downloading the '{self.green}ponce{self.endc}' repository, please wait...\n")
|
print(f"Downloading the '{self.green}{self.repos.gnome_repo_name}"
|
||||||
|
f"{self.endc}' repository, please wait...\n")
|
||||||
self.delete_file(self.repos.ponce_repo_path, self.repos .ponce_repo_txt)
|
self.delete_file(self.repos.ponce_repo_path, self.repos .ponce_repo_txt)
|
||||||
lftp_command: str = (f'lftp {self.lftp_mirror_options} {self.repos.ponce_repo_url} '
|
lftp_command: str = (f'lftp {self.lftp_mirror_options} {self.repos.ponce_repo_url} '
|
||||||
f'{self.repos.ponce_repo_path}')
|
f'{self.repos.ponce_repo_path}')
|
||||||
|
@ -103,13 +104,13 @@ class UpdateRepository(Configs):
|
||||||
print('\n')
|
print('\n')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.make_dirs('sbo')
|
self.make_dirs(self.repos.sbo_repo_name)
|
||||||
print('Updating the packages list...\n')
|
print('Updating the packages list...\n')
|
||||||
|
|
||||||
self.delete_file(self.repos.sbo_repo_path, self.repos.sbo_repo_txt)
|
self.delete_file(self.repos.sbo_repo_path, self.repos.sbo_repo_txt)
|
||||||
self.delete_file(self.repos.sbo_repo_path, self.repos.sbo_repo_chglog_txt)
|
self.delete_file(self.repos.sbo_repo_path, self.repos.sbo_repo_chglog_txt)
|
||||||
|
|
||||||
print(f"Downloading the '{self.green}sbo{self.endc}' repository, please wait...\n")
|
print(f"Downloading the '{self.green}{self.repos.sbo_repo_name}{self.endc}' repository, please wait...\n")
|
||||||
lftp_command: str = f'lftp {self.lftp_mirror_options} {self.repos.sbo_repo_url} {self.repos.sbo_repo_path}'
|
lftp_command: str = f'lftp {self.lftp_mirror_options} {self.repos.sbo_repo_url} {self.repos.sbo_repo_path}'
|
||||||
self.utils.process(lftp_command)
|
self.utils.process(lftp_command)
|
||||||
|
|
||||||
|
|
|
@ -51,9 +51,9 @@ class Ascii(Configs):
|
||||||
self.bgreen: str = f'{self.bold}{self.green}'
|
self.bgreen: str = f'{self.bold}{self.green}'
|
||||||
self.bred: str = f'{self.bold}{self.red}'
|
self.bred: str = f'{self.bold}{self.red}'
|
||||||
|
|
||||||
self.repo: str = 'sbo'
|
self.repo: str = self.repos.sbo_repo_name
|
||||||
if self.repos.ponce_repo:
|
if self.repos.ponce_repo:
|
||||||
self.repo: str = 'ponce'
|
self.repo: str = self.repos.ponce_repo_name
|
||||||
|
|
||||||
def draw_package_title_box(self, message: str, title: str) -> None:
|
def draw_package_title_box(self, message: str, title: str) -> None:
|
||||||
""" Drawing package title box. """
|
""" Drawing package title box. """
|
||||||
|
|
Loading…
Add table
Reference in a new issue