From 53048ecb1a9c9c8e0fdccaaa39f4963cec5f0d38 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 26 Mar 2023 10:02:05 +0300 Subject: [PATCH] Fixed for vstring --- slpkg/utilities.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/slpkg/utilities.py b/slpkg/utilities.py index 60295627..ec409286 100644 --- a/slpkg/utilities.py +++ b/slpkg/utilities.py @@ -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. """