Updated names

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-10-29 19:52:52 +03:00
parent 93a0059757
commit e064584e14

View file

@ -22,11 +22,12 @@ class Upgrade:
for pkg in os.listdir(self.log_packages):
if pkg.endswith(self.sbo_repo_tag):
name = '-'.join(pkg.split('-')[:-3])
inst_pkg_name = '-'.join(pkg.split('-')[:-3])
if name in repo_packages:
installed_ver = pkg.replace(name + '-', '').split('-')[0]
repo_ver = SBoQueries(name).version()
if inst_pkg_name in repo_packages:
installed_ver = pkg.replace(
inst_pkg_name + '-', '').split('-')[0]
repo_ver = SBoQueries(inst_pkg_name).version()
if LooseVersion(repo_ver) > LooseVersion(installed_ver):
yield name
yield inst_pkg_name