Fixed for compare packages

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2024-05-11 12:05:19 +03:00
parent a52e929f01
commit c2cdf84c43
2 changed files with 16 additions and 10 deletions

View file

@ -1,5 +1,10 @@
## slpkg - ChangeLog
### 5.0.9 - 11/05/2024
- Bugfixes:
* Fixes the compare version with the upgrade command
### 5.0.8 - 10/05/2024
- Added:

View file

@ -123,6 +123,8 @@ class Upgrade(Configs): # pylint: disable=[R0902]
if parse(repo_version) == parse(inst_version) and int(repo_build) > int(inst_build):
return True
except InvalidVersion as err:
self._write_log_file(installed, inst_name, err)
# Different options to compare packages.
repo_package: str = self.data[inst_name]['package']
if repo_version > inst_version: # Try to compare the strings.
@ -133,7 +135,6 @@ class Upgrade(Configs): # pylint: disable=[R0902]
return True
if installed == repo_package[:-4]: # Not new packages in the repository.
return False
self._write_log_file(installed, inst_name, err)
return False