mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-05 11:02:14 +01:00
Updated for options
This commit is contained in:
parent
1d944aea9a
commit
fb6bc9cd6d
3 changed files with 12 additions and 10 deletions
|
@ -85,7 +85,7 @@ class Argparse(Configs):
|
|||
self.flag_short_parallel: str = '-P'
|
||||
self.flag_binary: str = '--binary'
|
||||
self.flag_short_binary: str = '-B'
|
||||
self.flag_bin_repository: str = '--repo='
|
||||
self.flag_bin_repository: str = '--repository='
|
||||
self.flag_short_bin_repository: str = '-O='
|
||||
self.flag_directory: str = '--directory='
|
||||
self.flag_short_directory: str = '-z='
|
||||
|
@ -477,7 +477,7 @@ class Argparse(Configs):
|
|||
def update(self) -> None:
|
||||
if len(self.args) == 1:
|
||||
update = UpdateRepository(self.flags, self.binary_repo)
|
||||
update.repository()
|
||||
update.repositories()
|
||||
raise SystemExit()
|
||||
self.usage.help_short(1)
|
||||
|
||||
|
@ -543,7 +543,7 @@ class Argparse(Configs):
|
|||
|
||||
def clean_data(self) -> None:
|
||||
if len(self.args) == 1:
|
||||
update = UpdateRepository(self.flags)
|
||||
update = UpdateRepository(self.flags, self.binary_repo)
|
||||
update.drop_the_tables()
|
||||
raise SystemExit()
|
||||
self.usage.help_short(1)
|
||||
|
|
|
@ -21,10 +21,10 @@ from slpkg.models.models import (Base, engine, SBoTable,
|
|||
class UpdateRepository(Configs):
|
||||
""" Deletes and install the data. """
|
||||
|
||||
def __init__(self, flags: list, repo: str):
|
||||
def __init__(self, flags: list, repository: str):
|
||||
super(Configs, self).__init__()
|
||||
self.flags: list = flags
|
||||
self.repo: str = repo
|
||||
self.repository: str = repository
|
||||
self.session = Session
|
||||
self.view = ViewMessage(self.flags)
|
||||
|
||||
|
@ -59,7 +59,7 @@ class UpdateRepository(Configs):
|
|||
|
||||
def binary_repositories(self):
|
||||
""" Update the binary repositories. """
|
||||
if self.repos.gnome_repo and self.repo == self.repos.gnome_repo_name or self.repo == '*':
|
||||
if self.repos.gnome_repo and self.repository == self.repos.gnome_repo_name or self.repository == '*':
|
||||
urls: list = []
|
||||
print('Updating the packages list...\n')
|
||||
print(f"Downloading the '{self.green}{self.repos.gnome_repo_name}{self.endc}' repository, please wait...\n")
|
||||
|
@ -79,7 +79,7 @@ class UpdateRepository(Configs):
|
|||
self.data.install_gnome_data()
|
||||
print()
|
||||
|
||||
if self.repos.conraid_repo and self.repo == self.repos.conraid_repo_name or self.repo == '*':
|
||||
if self.repos.conraid_repo and self.repository == self.repos.conraid_repo_name or self.repository == '*':
|
||||
urls: list = []
|
||||
print('Updating the packages list...\n')
|
||||
print(f"Downloading the '{self.green}{self.repos.conraid_repo_name}{self.endc}' "
|
||||
|
@ -162,7 +162,7 @@ class UpdateRepository(Configs):
|
|||
|
||||
return queue.put(is_update)
|
||||
|
||||
def repository(self) -> None:
|
||||
def repositories(self) -> None:
|
||||
""" Starting multiprocessing download process. """
|
||||
queue = Queue()
|
||||
message = f'Checking for news, please wait...'
|
||||
|
|
|
@ -40,8 +40,8 @@ class Usage(Configs):
|
|||
f' slpkg [{self.yellow}OPTIONS{self.endc}] [-y, --yes, -j, --jobs, -o, --resolve-off, -r, --reinstall]\n'
|
||||
f' slpkg [{self.yellow}OPTIONS{self.endc}] [-k, --skip-installed, -E, --full-reverse, -S, --search]\n'
|
||||
f' slpkg [{self.yellow}OPTIONS{self.endc}] [-n, --no-silent, -p, --pkg-version, -G, --generate-only]\n'
|
||||
f' slpkg [{self.yellow}OPTIONS{self.endc}] [-P, --parallel, -z, --directory=[PATH]]\n'
|
||||
f' slpkg [{self.yellow}OPTIONS{self.endc}] [-F, --file-pattern=[PATTERN]]\n'
|
||||
f' slpkg [{self.yellow}OPTIONS{self.endc}] [-P, --parallel, -B, --binary, -O, --repository=[REPO]]\n'
|
||||
f' slpkg [{self.yellow}OPTIONS{self.endc}] [-z, --directory=[PATH], -F, --file-pattern=[PATTERN]]\n'
|
||||
" \nIf you need more information please try 'slpkg --help'.")
|
||||
|
||||
print(args)
|
||||
|
@ -82,6 +82,8 @@ class Usage(Configs):
|
|||
f' {self.yellow}-p, --pkg-version{self.endc} Print the repository package version.\n'
|
||||
f' {self.yellow}-G, --generate-only{self.endc} Generates only the SLACKBUILDS.TXT file.\n'
|
||||
f' {self.yellow}-P, --parallel{self.endc} Download files in parallel.\n'
|
||||
f' {self.yellow}-B, --binary{self.endc} Switch with binaries repositories.\n'
|
||||
f' {self.yellow}-O, --repository={self.endc}[REPO] Set the binary repository.\n'
|
||||
f' {self.yellow}-z, --directory={self.endc}[PATH] Download files to a specific path.\n'
|
||||
f' {self.yellow}-F, --file-pattern={self.endc}[PATTERN] Include specific installed files.\n'
|
||||
'\n -h, --help Show this message and exit.\n'
|
||||
|
|
Loading…
Reference in a new issue