Updated for view

This commit is contained in:
Dimitris Zlatanidis 2023-01-20 20:43:05 +02:00
parent 3afe3145b2
commit 960080a868

View file

@ -39,26 +39,15 @@ class ViewMessage(Configs):
def view_packages(self, package, version, mode): def view_packages(self, package, version, mode):
""" Printing the main packages. """ """ Printing the main packages. """
is_installed = self.utils.is_installed(package) color = self.red
inst_ver = self.utils.split_installed_pkg(is_installed)[1]
color = self.cyan if mode == 'install':
if mode == 'install' and is_installed: color = self.cyan
color = self.grey
if mode == 'install' and self.flag_reinstall in self.flags and is_installed:
color = self.yellow
if mode == 'install' and self.utils.is_repo_version_bigger(package):
color = self.violet
if mode == 'remove':
color = self.red
if mode == 'build': if mode == 'build':
color = self.yellow color = self.yellow
if mode == 'upgrade': if mode == 'upgrade':
color = self.violet color = self.violet
if inst_ver:
package = f'{package}-{inst_ver}'
self.ascii.draw_view_package(package, version, color) self.ascii.draw_view_package(package, version, color)
def view_skipping_packages(self, sbo, version): def view_skipping_packages(self, sbo, version):