Fix for compare build

This commit is contained in:
Dimitris Zlatanidis 2024-03-29 23:02:14 +02:00
parent ca1934be26
commit d0c4852135

View file

@ -71,7 +71,7 @@ class Upgrade(Configs):
return True
if parse(repo_version) == parse(inst_version):
if repo_build > inst_build:
if int(repo_build) > int(inst_build):
return True
except ValueError:
return False
@ -155,7 +155,7 @@ class Upgrade(Configs):
if found_packages:
print()
title: str = f"{'packages':<18} {'Version':<15} {'Build':<6} {'Repository':<15} {'Build':<5} {'Repo':>15}"
title: str = f"{'packages':<18} {'Repository':<15} {'Build':<6} {'Installed':<15} {'Build':<5} {'Repo':>15}"
print(len(title) * '=')
print(f'{self.bgreen}{title}{self.endc}')
print(len(title) * '=')
@ -182,8 +182,8 @@ class Upgrade(Configs):
if mode == 'add':
color: str = self.cyan
print(f"{color}{name:<18}{self.endc} {inst_version:<15} {inst_build:<6} {repo_version:<15} "
f"{repo_build:<5} {repo:>15}")
print(f"{color}{name:<18}{self.endc} {repo_version:<15} {repo_build:<6} {inst_version:<15} "
f"{inst_build:<5} {repo:>15}")
print(len(title) * '=')
print(f'{self.grey}Packages to upgrade {self.sum_upgrade}, packages to remove '