From ed7e432275c4bf88b3a15097666d728865cd782a Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sat, 11 Jul 2015 05:29:11 +0300 Subject: [PATCH] Fix matching installed name with repo name --- slpkg/sbo/slackbuild.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index fa52c979..28fed924 100644 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -222,11 +222,17 @@ class SBoInstall(object): color yellow for packages to upgrade and color red if not installed. """ + inst_name = "" + # split sbo name with version and get name + sbo_name = "-".join(sbo.split("-")[:-1]) + # split installed package and get installed name + find = find_package(sbo_name + "-", self.meta.pkg_path) + if find: + inst_name = split_package(find[0])[0] if find_package(sbo, self.meta.pkg_path): paint = self.meta.color["GREEN"] count_ins += 1 - elif find_package("-".join(sbo.split("-")[:-1]) + "-", - self.meta.pkg_path): + elif sbo_name == inst_name: paint = self.meta.color["YELLOW"] count_upg += 1 else: