mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-28 09:58:21 +01:00
Updated summary
This commit is contained in:
parent
fbd4d8f290
commit
5eca8a635e
1 changed files with 5 additions and 4 deletions
|
@ -212,15 +212,16 @@ class ViewMessage:
|
||||||
def summary(self, slackbuilds: list, dependencies: list, option: str):
|
def summary(self, slackbuilds: list, dependencies: list, option: str):
|
||||||
""" View the status of the packages action. """
|
""" View the status of the packages action. """
|
||||||
slackbuilds.extend(dependencies)
|
slackbuilds.extend(dependencies)
|
||||||
install = upgrade = remove = 0
|
install = upgrade = remove = build = 0
|
||||||
|
|
||||||
for sbo in slackbuilds:
|
for sbo in slackbuilds:
|
||||||
if not self.utils.is_installed(sbo):
|
if not self.utils.is_installed(sbo):
|
||||||
install += 1
|
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
|
upgrade += 1
|
||||||
elif self.utils.is_installed(sbo) and option == 'remove':
|
|
||||||
remove += 1
|
remove += 1
|
||||||
|
else:
|
||||||
|
build += 1
|
||||||
|
|
||||||
self.draw_bottom_line()
|
self.draw_bottom_line()
|
||||||
|
|
||||||
|
@ -229,7 +230,7 @@ class ViewMessage:
|
||||||
f'installed and {upgrade} will be upgraded.{self.endc}')
|
f'installed and {upgrade} will be upgraded.{self.endc}')
|
||||||
|
|
||||||
elif option == 'build':
|
elif option == 'build':
|
||||||
print(f'{self.grey}Total {install + upgrade} packages '
|
print(f'{self.grey}Total {build} packages '
|
||||||
f'will be build.{self.endc}')
|
f'will be build.{self.endc}')
|
||||||
|
|
||||||
elif option == 'remove':
|
elif option == 'remove':
|
||||||
|
|
Loading…
Reference in a new issue