Fixed for vstring

This commit is contained in:
Dimitris Zlatanidis 2023-03-26 10:02:05 +03:00
parent 6e27545c6b
commit 53048ecb1a

View file

@ -33,14 +33,14 @@ class Utilities:
self.bred: str = f'{self.bold}{self.red}'
self.installed_packages: list = list(self.all_installed())
self.installed_package_names: list = list(self.all_installed_names())
def is_package_installed(self, name: str) -> str:
""" Returns the installed package name. """
for package in self.installed_packages:
pkg: str = self.split_binary_pkg(package)[0]
for package_name in self.installed_package_names:
if pkg == name:
return package
if package_name == name:
return package_name
return ''
@ -127,8 +127,8 @@ class Utilities:
if installed:
installed_version: str = self.split_binary_pkg(installed)[1]
return (str(LooseVersion(repository_version + repo_build_tag)) >
str(LooseVersion(installed_version + inst_build_tag)))
return (str(LooseVersion(f'{repository_version}.{repo_build_tag}')) >
str(LooseVersion(f'{repository_version}.{repo_build_tag}')))
def read_build_tag(self, sbo: str) -> str:
""" Patching SBo TAG from the configuration file. """