Fixed remove miltiple packages with dependencies

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-11-28 21:19:00 +02:00
parent ba78267936
commit 7f2d426ed9
2 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,7 @@
4.3.2 - 28/11/2022
Fixed:
- Remove multiple packages with dependencies
4.3.1 - 26/11/2022 4.3.1 - 26/11/2022
Added: Added:
- Category in the view command - Category in the view command

View file

@ -69,11 +69,14 @@ class ViewMessage:
self._view_installed_packages(pkg) self._view_installed_packages(pkg)
slackbuilds.append(pkg) slackbuilds.append(pkg)
dependencies.append(self.session.query( requires = self.session.query(
LogsDependencies.requires).filter( LogsDependencies.requires).filter(
LogsDependencies.name == pkg).first()) LogsDependencies.name == pkg).first()
if None not in dependencies and '--resolve-off' not in self.flags: if requires:
dependencies.append(requires)
if dependencies and '--resolve-off' not in self.flags:
print('\nDependencies:') print('\nDependencies:')
for i in range(0, len(dependencies)): for i in range(0, len(dependencies)):
@ -138,7 +141,8 @@ class ViewMessage:
for package in installed: for package in installed:
black = package.split('-')[0] black = package.split('-')[0]
if (package.startswith(f'{name}-') and if (package.startswith(f'{name}-') and
self.sbo_repo_tag in package and black not in self.black.get()): self.sbo_repo_tag in package and
black not in self.black.get()):
self.installed_packages.append(package) self.installed_packages.append(package)
print(f'[{color["RED"]} delete {color["ENDC"]}] -> {package}') print(f'[{color["RED"]} delete {color["ENDC"]}] -> {package}')