mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Updated for repos dict
This commit is contained in:
parent
5de1525d5f
commit
8865d0a58b
4 changed files with 7 additions and 8 deletions
|
@ -16,16 +16,16 @@ from slpkg.views.views import ViewMessage
|
|||
from slpkg.progress_bar import ProgressBar
|
||||
from slpkg.repositories import Repositories
|
||||
from slpkg.binaries.required import Required
|
||||
from slpkg.binaries.queries import BinQueries
|
||||
from slpkg.models.models import LogsDependencies
|
||||
from slpkg.models.models import session as Session
|
||||
|
||||
|
||||
class Packages(Configs):
|
||||
|
||||
def __init__(self, packages: list, flags: list, repo: str, mode: str):
|
||||
__slots__ = 'packages', 'flags', 'repo', 'mode'
|
||||
def __init__(self, bin_repo_dict: dict, packages: list, flags: list, repo: str, mode: str):
|
||||
__slots__ = 'bin_repo_dict', 'packages', 'flags', 'repo', 'mode'
|
||||
super(Configs, self).__init__()
|
||||
self.bin_repo_dict: dict = bin_repo_dict
|
||||
self.packages: list = packages
|
||||
self.flags: list = flags
|
||||
self.repo: str = repo
|
||||
|
@ -60,7 +60,6 @@ class Packages(Configs):
|
|||
self.flag_no_silent: list = ['-n', '--no-silent']
|
||||
self.flag_resolve_off: list = ['-o', '--resolve-off']
|
||||
|
||||
self.bin_repo_dict: dict = BinQueries(self.repo).repository_data()
|
||||
self.packages: list = self.utils.apply_package_pattern(self.flags, self.packages, self.repo)
|
||||
|
||||
def execute(self) -> None:
|
||||
|
|
|
@ -16,7 +16,7 @@ class Check(Configs):
|
|||
""" Some checks before proceed. """
|
||||
|
||||
def __init__(self, flags: list, sbo_repo_dict: dict, bin_repo_dict: dict):
|
||||
__slots__ = 'flags'
|
||||
__slots__ = 'flags', 'sbo_repo_dict', 'bin_repo_dict'
|
||||
super(Configs, self).__init__()
|
||||
self.flags: list = flags
|
||||
self.sbo_repo_dict: dict = sbo_repo_dict
|
||||
|
|
|
@ -537,7 +537,7 @@ class Argparse(Configs):
|
|||
raise SystemExit()
|
||||
|
||||
if self.utils.is_option(self.flag_binaries, self.flags):
|
||||
install = Packages(packages, self.flags, self.binary_repo, mode=command)
|
||||
install = Packages(self.bin_repo_dict, packages, self.flags, self.binary_repo, mode=command)
|
||||
install.execute()
|
||||
else:
|
||||
install = Slackbuilds(self.sbo_repo_dict, packages, self.flags, mode=command)
|
||||
|
@ -631,7 +631,7 @@ class Argparse(Configs):
|
|||
if self.utils.is_option(self.flag_binaries, self.flags):
|
||||
self.check.exists_in_the_database(packages)
|
||||
|
||||
install = Packages(packages, self.flags, self.binary_repo, mode=command)
|
||||
install = Packages(self.bin_repo_dict, packages, self.flags, self.binary_repo, mode=command)
|
||||
install.execute()
|
||||
else:
|
||||
self.check.exists_in_the_database(packages)
|
||||
|
|
|
@ -28,7 +28,7 @@ class Slackbuilds(Configs):
|
|||
""" Download build and install the SlackBuilds. """
|
||||
|
||||
def __init__(self, sbo_repo_dict: dict, slackbuilds: list, flags: list, mode: str):
|
||||
__slots__ = 'slackbuilds', 'flags', 'mode'
|
||||
__slots__ = 'sbo_repo_dict', 'slackbuilds', 'flags', 'mode'
|
||||
super(Configs, self).__init__()
|
||||
self.sbo_repo_dict = sbo_repo_dict
|
||||
self.slackbuilds: list = slackbuilds
|
||||
|
|
Loading…
Add table
Reference in a new issue