From 48a8a13b2ea6d4868fd8aaf9e480d1902e58b12d Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 1 Jun 2022 11:40:33 +0300 Subject: [PATCH] Switched to query --- slpkg/pkg/manager.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/slpkg/pkg/manager.py b/slpkg/pkg/manager.py index f4c3dd45..fd8b476c 100644 --- a/slpkg/pkg/manager.py +++ b/slpkg/pkg/manager.py @@ -35,6 +35,7 @@ from slpkg.messages import Msg from slpkg.dialog_box import DialogUtil from slpkg.splitting import split_package from slpkg.__metadata__ import MetaData as _meta_ +from slpkg.sbo.greps import SBoGrep from slpkg.slack.slackware_repo import slackware_repository @@ -617,15 +618,13 @@ class PackageManager(Utils): """Grabs packages """ pkg_list, pkg_size = [], [] - for line in packages.splitlines(): - if repo == "sbo": + if repo == "sbo": + pkg_list = SBoGrep(name="").names() - if line.startswith("SLACKBUILD NAME: "): - pkg_list.append(line[17:].strip()) - pkg_size.append("0 K") + else: - else: + for line in packages.splitlines(): if line.startswith("PACKAGE NAME: "): pkg_list.append(line[15:].strip()) @@ -649,7 +648,6 @@ class PackageManager(Utils): self.meta.lib_path + "sbo_repo/SLACKBUILDS.TXT")): packages = self.read_file(f"{self.meta.lib_path}" "sbo_repo/SLACKBUILDS.TXT") - else: if (os.path.isfile(