From a712392436d1186c3e1175d772a4d4a6854f9dbc Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sat, 8 Apr 2023 20:41:58 +0300 Subject: [PATCH] Updated for repo dict --- slpkg/binaries/queries.py | 3 --- slpkg/main.py | 6 +++--- slpkg/sbos/slackbuild.py | 5 ++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/slpkg/binaries/queries.py b/slpkg/binaries/queries.py index 2c8ea599..d228c3cf 100644 --- a/slpkg/binaries/queries.py +++ b/slpkg/binaries/queries.py @@ -16,9 +16,6 @@ class BinQueries: self.black = Blacklist() - # if self.name in self.black.packages(): - # self.name: str = '' - def repository_data(self) -> dict: """ Returns a dictionary with the repository data. """ repos_dict: dict = {} diff --git a/slpkg/main.py b/slpkg/main.py index 17cd167b..e0b3f295 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -540,7 +540,7 @@ class Argparse(Configs): install = Packages(packages, self.flags, self.binary_repo, mode=command) install.execute() else: - install = Slackbuilds(packages, self.flags, mode=command) + install = Slackbuilds(self.sbo_repo_dict, packages, self.flags, mode=command) install.execute() raise SystemExit() self.usage.help_short(1) @@ -612,7 +612,7 @@ class Argparse(Configs): self.check.exists_in_the_database(packages) self.check.is_package_unsupported(packages) - build = Slackbuilds(packages, self.flags, mode=command) + build = Slackbuilds(self.sbo_repo_dict, packages, self.flags, mode=command) build.execute() raise SystemExit() self.usage.help_short(1) @@ -637,7 +637,7 @@ class Argparse(Configs): self.check.exists_in_the_database(packages) self.check.is_package_unsupported(packages) - install = Slackbuilds(packages, self.flags, mode=command) + install = Slackbuilds(self.sbo_repo_dict, packages, self.flags, mode=command) install.execute() raise SystemExit() self.usage.help_short(1) diff --git a/slpkg/sbos/slackbuild.py b/slpkg/sbos/slackbuild.py index d28acf9c..04125bc2 100644 --- a/slpkg/sbos/slackbuild.py +++ b/slpkg/sbos/slackbuild.py @@ -17,7 +17,6 @@ from slpkg.utilities import Utilities from slpkg.dialog_box import DialogBox from slpkg.downloader import Downloader from slpkg.views.views import ViewMessage -from slpkg.sbos.queries import SBoQueries from slpkg.progress_bar import ProgressBar from slpkg.repositories import Repositories from slpkg.sbos.dependencies import Requires @@ -28,9 +27,10 @@ from slpkg.models.models import session as Session class Slackbuilds(Configs): """ Download build and install the SlackBuilds. """ - def __init__(self, slackbuilds: list, flags: list, mode: str): + def __init__(self, sbo_repo_dict: dict, slackbuilds: list, flags: list, mode: str): __slots__ = 'slackbuilds', 'flags', 'mode' super(Configs, self).__init__() + self.sbo_repo_dict = sbo_repo_dict self.slackbuilds: list = slackbuilds self.flags: list = flags self.mode: str = mode @@ -65,7 +65,6 @@ class Slackbuilds(Configs): self.flag_parallel: list = ['-P', '--parallel'] self.slackbuilds: list = self.utils.apply_package_pattern(self.flags, self.slackbuilds) - self.sbo_repo_dict: dict = SBoQueries('').repository_data() # Patch the TAG from configs. if self.repos.patch_repo_tag: