Updated for downgrade

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2024-06-04 22:27:54 +03:00
parent 2f798e8cf2
commit 6d49af69f1
2 changed files with 4 additions and 0 deletions

View file

@ -9,6 +9,7 @@
* Updated message for invalid package version
* Updated upgrade.log file to json format
* Separation of the process bar with progress bar
* Updated to check downgrade packages (Thanks to marav)
### 5.0.9 - 23/05/2024

View file

@ -128,6 +128,9 @@ class Upgrade(Configs): # pylint: disable=[R0902]
if parse(repo_version) == parse(inst_version) and int(repo_build) > int(inst_build):
return True
if parse(repo_version) < parse(inst_version):
return True
except InvalidVersion as err:
if repo_version > inst_version: # Try to compare the strings.
return True