diff --git a/ChangeLog.txt b/ChangeLog.txt index 8fa42551..cb5f4721 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -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 diff --git a/slpkg/upgrade.py b/slpkg/upgrade.py index 5856f375..7983acfd 100644 --- a/slpkg/upgrade.py +++ b/slpkg/upgrade.py @@ -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