Updated for repo dict

This commit is contained in:
Dimitris Zlatanidis 2023-04-08 20:41:58 +03:00
parent 606031581e
commit a712392436
3 changed files with 5 additions and 9 deletions

View file

@ -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 = {}

View file

@ -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)

View file

@ -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: