diff --git a/slpkg/upgrade.py b/slpkg/upgrade.py index 87fede45..9a57b810 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'] + repo_version: str = self.data[inst_name]['version'].replace('_', '-') repo_build: str = self.data[inst_name]['build'] - inst_version: str = self.utils.split_package(installed)['version'] + inst_version: str = self.utils.split_package(installed)['version'].replace('_', '-') inst_build: str = self.utils.split_package(installed)['build'] try: if parse(repo_version) > parse(inst_version): @@ -78,6 +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 self._write_log_file(installed, inst_name, err) return False return False