diff --git a/slpkg/binary/install.py b/slpkg/binary/install.py index f13c8401..1a985d49 100644 --- a/slpkg/binary/install.py +++ b/slpkg/binary/install.py @@ -223,6 +223,8 @@ class BinaryInstall(object): name = split_package(package)[0] rep_ver = split_package(package)[1] ins_ver = GetFromInstalled(name).version()[1:] + if not ins_ver: + ins_ver = "0" if LooseVersion(rep_ver) < LooseVersion(ins_ver): self.msg.template(78) print("| Package {0} don't downgrade, " diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index 9dc9d5a9..bd323ee3 100644 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -359,6 +359,8 @@ class SBoInstall(object): name = "-".join(prgnam.split("-")[:-1]) sbo_ver = prgnam.split("-")[-1] ins_ver = GetFromInstalled(name).version()[1:] + if not ins_ver: + ins_ver = "0" if LooseVersion(sbo_ver) < LooseVersion(ins_ver): self.msg.template(78) print("| Package {0} don't downgrade, "