From 01e629870e243765b4ce1f4166a70bef94ade2f1 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 9 Dec 2022 17:02:38 +0200 Subject: [PATCH 1/3] Fixed remove packages --- ChangeLog.txt | 4 ++++ slpkg/checks.py | 4 ++-- slpkg/main.py | 2 +- slpkg/views/views.py | 7 ++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index e90191ca..019fc6b9 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +4.3.6 - 08/12/2022 +Fixed: +- Remove packages + 4.3.5 - 07/12/2022 Updated: - Code style diff --git a/slpkg/checks.py b/slpkg/checks.py index 63d0f34e..3aaf0f7e 100644 --- a/slpkg/checks.py +++ b/slpkg/checks.py @@ -42,8 +42,8 @@ class Check: for sbo in slackbuilds: for package in os.listdir(self.configs.log_packages): - if (package.startswith(f'{sbo}-') and - package.endswith(self.configs.sbo_repo_tag)): + pkg = '-'.join(package.split('-')[:-3]) + if sbo == pkg and package.endswith(self.configs.sbo_repo_tag): found.append(sbo) for sbo in slackbuilds: diff --git a/slpkg/main.py b/slpkg/main.py index 560dfbcc..74dfa82a 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -24,7 +24,7 @@ from slpkg.update_repository import UpdateRepository class Argparse: def __init__(self, args): - self.args: list = args + self.args = args self.usage = Usage() if len(self.args) == 0: diff --git a/slpkg/views/views.py b/slpkg/views/views.py index 68357819..caf37124 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -67,7 +67,6 @@ class ViewMessage: """ View remove packages. """ print('The following packages will be removed:\n') slackbuilds, dependencies, deps = [], [], [] - for pkg in packages: self._view_installed_packages(pkg) slackbuilds.append(pkg) @@ -145,10 +144,8 @@ class ViewMessage: color = self.colors() for package in installed: - black = package.split('-')[0] - if (package.startswith(f'{name}-') and - self.configs.sbo_repo_tag in package and - black not in self.black.get()): + pkg = '-'.join(package.split('-')[:-3]) + if pkg == name and self.configs.sbo_repo_tag in package and pkg not in self.black.get(): self.installed_packages.append(package) print(f'[{color["red"]} delete {color["endc"]}] -> {package}') From 7b760d1b353f2b291676584b8fb15ea548b2b1fa Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 9 Dec 2022 17:03:10 +0200 Subject: [PATCH 2/3] Fixed remove packages --- ChangeLog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 019fc6b9..1a628fd1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -13,7 +13,7 @@ Updated: - Remove dataclasses and switch to __init__ - Version print command Added: -- Version to the requires in the view packages command +- Version to the requirements in the view packages command - Short cli menu 4.3.3 - 01/12/2022 From 80afbdcd42ed2cdc95c3b6ede107f619b91b0f8f Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 9 Dec 2022 17:11:38 +0200 Subject: [PATCH 3/3] Updated for version 4.3.6 Signed-off-by: Dimitris Zlatanidis --- README.rst | 4 ++-- setup.cfg | 2 +- slpkg/views/version.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 6119cf93..7af87c33 100644 --- a/README.rst +++ b/README.rst @@ -30,8 +30,8 @@ Install from the official third-party `SBo repository