Updated view install

This commit is contained in:
Dimitris Zlatanidis 2022-12-17 17:27:52 +02:00
parent 88d9979f80
commit db3c8a2f42

View file

@ -117,24 +117,20 @@ class ViewMessage:
color = self.colors()
installed = self.utils.is_installed(sbo)
install, set_color = 'install', color['red']
install, set_color = 'install', color['cyan']
if '--reinstall' in self.flags:
install, set_color = 'reinstall', color['red']
if installed and '--reinstall' not in self.flags:
elif installed and '--reinstall' not in self.flags:
install, set_color = 'upgrade', color['yellow']
if installed and 'noarch' in installed:
self.configs.os_arch = 'noarch'
if installed:
print(f'[{set_color} {install} {color["endc"]}] -> '
f'{sbo}-{version} {set_color}'
f'({self.utils.split_installed_pkg(installed)[1]})'
f'{color["endc"]}')
else:
print(f'[{color["cyan"]} install {color["endc"]}] -> '
print(f'[{set_color} {install} {color["endc"]}] -> '
f'{sbo}-{version}')
def _view_removed(self, name: str):