mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Fixed upgrade and reinstall
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
478b5ab8fa
commit
ebac198794
3 changed files with 6 additions and 5 deletions
|
@ -1,6 +1,8 @@
|
||||||
4.3.8 - 17/12/2022
|
4.3.8 - 17/12/2022
|
||||||
BugFixed:
|
BugFixed:
|
||||||
- View installed version
|
- View installed version
|
||||||
|
Fixed:
|
||||||
|
- Colors and messages for upgrade and reinstall
|
||||||
|
|
||||||
4.3.7 - 09/12/2022
|
4.3.7 - 09/12/2022
|
||||||
Updated:
|
Updated:
|
||||||
|
|
|
@ -19,7 +19,7 @@ class Upgrade:
|
||||||
|
|
||||||
def packages(self):
|
def packages(self):
|
||||||
""" Compares version of packages and returns the maximum. """
|
""" 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()
|
repo_packages = SBoQueries('').names()
|
||||||
black = Blacklist().get()
|
black = Blacklist().get()
|
||||||
|
|
|
@ -120,16 +120,15 @@ class ViewMessage:
|
||||||
install, set_color = 'install', color['red']
|
install, set_color = 'install', color['red']
|
||||||
|
|
||||||
if '--reinstall' in self.flags:
|
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']
|
install, set_color = 'upgrade', color['yellow']
|
||||||
|
|
||||||
if installed and 'noarch' in installed:
|
if installed and 'noarch' in installed:
|
||||||
self.configs.os_arch = 'noarch'
|
self.configs.os_arch = 'noarch'
|
||||||
|
|
||||||
if installed:
|
if installed:
|
||||||
|
|
||||||
if '--reinstall' not in self.flags:
|
|
||||||
install = 'installed'
|
|
||||||
|
|
||||||
print(f'[{set_color} {install} {color["endc"]}] -> '
|
print(f'[{set_color} {install} {color["endc"]}] -> '
|
||||||
f'{sbo}-{version} {set_color}'
|
f'{sbo}-{version} {set_color}'
|
||||||
f'({installed.split(self.configs.os_arch)[0][:-1].split("-")[-1]})'
|
f'({installed.split(self.configs.os_arch)[0][:-1].split("-")[-1]})'
|
||||||
|
|
Loading…
Add table
Reference in a new issue