diff --git a/slpkg/upgrade.py b/slpkg/upgrade.py index 9a57b810..509a942d 100644 --- a/slpkg/upgrade.py +++ b/slpkg/upgrade.py @@ -67,9 +67,9 @@ class Upgrade(Configs): """ Returns True for upgradeable packages. """ inst_name: str = self.utils.split_package(installed)['name'] if self.data.get(inst_name): - repo_version: str = self.data[inst_name]['version'].replace('_', '-') + repo_version: str = self.data[inst_name]['version'] repo_build: str = self.data[inst_name]['build'] - inst_version: str = self.utils.split_package(installed)['version'].replace('_', '-') + inst_version: str = self.utils.split_package(installed)['version'] inst_build: str = self.utils.split_package(installed)['build'] try: if parse(repo_version) > parse(inst_version): @@ -78,8 +78,8 @@ class Upgrade(Configs): if parse(repo_version) == parse(inst_version) and int(repo_build) > int(inst_build): return True except InvalidVersion as err: - # if repo_version > inst_version: - # return True + if repo_version.replace('_', '-') > inst_version.replace('_', '-'): + return True self._write_log_file(installed, inst_name, err) return False return False