Fixed upgrade and reinstall

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-12-17 16:57:42 +02:00
parent 478b5ab8fa
commit ebac198794
3 changed files with 6 additions and 5 deletions

View file

@ -1,6 +1,8 @@
4.3.8 - 17/12/2022
BugFixed:
- View installed version
Fixed:
- Colors and messages for upgrade and reinstall
4.3.7 - 09/12/2022
Updated:

View file

@ -19,7 +19,7 @@ class Upgrade:
def packages(self):
""" Compares version of packages and returns the maximum. """
print("Do not forget to run 'slpkg update' before.")
print("Do not forget to run 'slpkg update' before.\n")
repo_packages = SBoQueries('').names()
black = Blacklist().get()

View file

@ -120,16 +120,15 @@ class ViewMessage:
install, set_color = 'install', color['red']
if '--reinstall' in self.flags:
install, set_color = 'reinstall', color['red']
if 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:
if '--reinstall' not in self.flags:
install = 'installed'
print(f'[{set_color} {install} {color["endc"]}] -> '
f'{sbo}-{version} {set_color}'
f'({installed.split(self.configs.os_arch)[0][:-1].split("-")[-1]})'