mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Updated view install
This commit is contained in:
parent
88d9979f80
commit
db3c8a2f42
1 changed files with 3 additions and 7 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue