From 5eca8a635e0a1bec0208a31fd425ad58d1e9a11c Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 4 Jan 2023 17:05:17 +0200 Subject: [PATCH] Updated summary --- slpkg/views/views.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/slpkg/views/views.py b/slpkg/views/views.py index 8e8f67a6..ed8b1e6d 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -212,15 +212,16 @@ class ViewMessage: def summary(self, slackbuilds: list, dependencies: list, option: str): """ View the status of the packages action. """ slackbuilds.extend(dependencies) - install = upgrade = remove = 0 + install = upgrade = remove = build = 0 for sbo in slackbuilds: if not self.utils.is_installed(sbo): install += 1 - elif self.utils.is_installed(sbo) and '--reinstall' in self.flags: + elif self.utils.is_installed(sbo) or self.utils.is_installed(sbo) and '--reinstall' in self.flags: upgrade += 1 - elif self.utils.is_installed(sbo) and option == 'remove': remove += 1 + else: + build += 1 self.draw_bottom_line() @@ -229,7 +230,7 @@ class ViewMessage: f'installed and {upgrade} will be upgraded.{self.endc}') elif option == 'build': - print(f'{self.grey}Total {install + upgrade} packages ' + print(f'{self.grey}Total {build} packages ' f'will be build.{self.endc}') elif option == 'remove':