mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-26 09:58:31 +01:00
Updated for repo_tag
This commit is contained in:
parent
f30199c5ee
commit
5a6c7de600
8 changed files with 11 additions and 17 deletions
|
@ -65,7 +65,7 @@ Télécharger les scripts et les sources des SlackBuilds sans les construire ni
|
|||
.B -R, remove
|
||||
.RS
|
||||
Supprimer les paquets avec leurs dépendances s'ils ont été installés avec la méthode \fB'slpkg install'\fP.
|
||||
Slpkg examine la configuration \fB'sbo_repo_tag'\fP pour trouver les paquets à supprimer.
|
||||
Slpkg examine la configuration \fB'REPO_TAG'\fP pour trouver les paquets à supprimer.
|
||||
.RE
|
||||
.P
|
||||
.B -f, find
|
||||
|
|
|
@ -68,7 +68,7 @@ Download the SlackBuilds scripts and the sources without building or installing
|
|||
.B -R, remove
|
||||
.RS
|
||||
Removes packages with dependencies if the packages was installed with 'slpkg install' method.
|
||||
Slpkg looks at the 'sbo_repo_tag' configuration to find packages for removal by default, except if you are using --file-pattern option.
|
||||
Slpkg looks at the 'REPO_TAG' configuration to find packages for removal by default, except if you are using --file-pattern option.
|
||||
.RE
|
||||
.P
|
||||
.B -f, find
|
||||
|
|
|
@ -161,6 +161,10 @@ class Configs:
|
|||
f"\nIf you have upgraded the '{prog_name}' probably you need to run:\n"
|
||||
f"mv {etc_path}/{prog_name}.toml.new {etc_path}/{prog_name}.toml\n")
|
||||
|
||||
repo_tag: str = sbo_repo_tag
|
||||
if ponce_repo:
|
||||
repo_tag: str = ponce_repo_tag
|
||||
|
||||
# Creating the paths if not exists
|
||||
paths = [
|
||||
tmp_slpkg,
|
||||
|
|
|
@ -33,7 +33,7 @@ class Argparse(Configs):
|
|||
self.args: list = args
|
||||
self.flags: list = []
|
||||
self.directory = self.tmp_slpkg
|
||||
self.file_pattern: str = f'*{self.sbo_repo_tag}'
|
||||
self.file_pattern: str = f'*{self.repo_tag}'
|
||||
self.dialogbox = DialogBox()
|
||||
self.utils = Utilities()
|
||||
self.usage = Usage()
|
||||
|
@ -304,13 +304,7 @@ class Argparse(Configs):
|
|||
title: str = f' Choose packages you want to {method} '
|
||||
repo_packages: list = SBoQueries('').sbos()
|
||||
|
||||
# Grab all the installed packages
|
||||
pattern: str = f'*{self.sbo_repo_tag}'
|
||||
|
||||
if method == 'find' and self.file_pattern:
|
||||
pattern: str = self.file_pattern
|
||||
|
||||
installed: list = list(self.utils.all_installed(pattern))
|
||||
installed: list = list(self.utils.all_installed(self.file_pattern))
|
||||
|
||||
if method in ['remove', 'find']:
|
||||
|
||||
|
|
|
@ -61,10 +61,6 @@ class Slackbuilds(Configs):
|
|||
self.flag_jobs: list = ['-j', '--jobs']
|
||||
self.flag_no_silent: list = ['-n', '--no-silent']
|
||||
|
||||
self.repo_tag: str = self.sbo_repo_tag
|
||||
if self.ponce_repo:
|
||||
self.repo_tag: str = self.ponce_repo_tag
|
||||
|
||||
def execute(self) -> None:
|
||||
""" Starting build or install the slackbuilds. """
|
||||
self.creating_dictionary()
|
||||
|
|
|
@ -81,7 +81,7 @@ class Utilities:
|
|||
name: str = '-'.join(package.split('-')[:-3])
|
||||
version: str = ''.join(package[len(name):].split('-')[:-2])
|
||||
arch: str = ''.join(package[len(name + version) + 2:].split('-')[:-1])
|
||||
build: str = ''.join(package[len(name + version + arch) + 3:].split('-')).replace(self.configs.sbo_repo_tag, '')
|
||||
build: str = ''.join(package[len(name + version + arch) + 3:].split('-')).replace(self.configs.repo_tag, '')
|
||||
tag: str = ''.join(package[len(name + version + arch + build) + 4:].split('-'))
|
||||
|
||||
return [name, version, arch, build, tag]
|
||||
|
|
|
@ -35,7 +35,7 @@ class Help(Configs):
|
|||
"dependencies for removal.",
|
||||
'download': "Download the SlackBuilds scripts and the sources without building or installing it.",
|
||||
'remove': "Removes packages with dependencies if the packages was installed with 'slpkg install' method. "
|
||||
"Slpkg looks at the 'sbo_repo_tag' configuration to find packages for removal by default, except "
|
||||
"Slpkg looks at the 'REPO_TAG' configuration to find packages for removal by default, except "
|
||||
"if you are using '--file-pattern=' option.",
|
||||
'find': "Find your installed packages on your system.",
|
||||
'view': "View information packages from the repository and get everything in your terminal.",
|
||||
|
|
|
@ -39,7 +39,7 @@ class ViewMessage(Configs):
|
|||
self.flag_resolve_off: list = ['-o', '--resolve-off']
|
||||
self.flag_reinstall: list = ['-r', '--reinstall']
|
||||
self.flag_yes: list = ['-y', '--yes']
|
||||
self.file_pattern: str = f'*{self.sbo_repo_tag}'
|
||||
self.file_pattern: str = f'*{self.repo_tag}'
|
||||
|
||||
def view_packages(self, package, version, mode):
|
||||
""" Printing the main packages. """
|
||||
|
|
Loading…
Reference in a new issue