mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Updated for sbo class
This commit is contained in:
parent
8e8d36afb0
commit
65f1fe50b8
1 changed files with 6 additions and 11 deletions
|
@ -86,6 +86,7 @@ class Slackbuilds(Configs):
|
|||
def execute(self) -> None:
|
||||
self.creating_dependencies_list()
|
||||
self.remove_duplicate_from_dependencies_list()
|
||||
self.choose_package_dependencies()
|
||||
self.add_dependencies_to_install_order()
|
||||
self.clean_the_main_slackbuilds()
|
||||
self.add_main_packages_to_install_order()
|
||||
|
@ -113,9 +114,7 @@ class Slackbuilds(Configs):
|
|||
|
||||
def remove_duplicate_from_dependencies_list(self) -> None:
|
||||
if self.dependencies:
|
||||
# Remove duplicate packages and keeps the order.
|
||||
dependencies: list = list(OrderedDict.fromkeys(self.dependencies))
|
||||
self.dependencies: list = self.choose_package_dependencies(dependencies)
|
||||
self.dependencies: list = list(OrderedDict.fromkeys(self.dependencies))
|
||||
|
||||
def add_dependencies_to_install_order(self) -> None:
|
||||
self.install_order.extend(self.dependencies)
|
||||
|
@ -308,14 +307,14 @@ class Slackbuilds(Configs):
|
|||
else:
|
||||
self.utils.process(command, self.stderr, self.stdout)
|
||||
|
||||
def choose_package_dependencies(self, dependencies: list) -> list:
|
||||
def choose_package_dependencies(self):
|
||||
height: int = 10
|
||||
width: int = 70
|
||||
list_height: int = 0
|
||||
choices: list = []
|
||||
title: str = ' Choose dependencies you want to install '
|
||||
|
||||
for package in dependencies:
|
||||
for package in self.dependencies:
|
||||
status: bool = True
|
||||
repo_ver: str = self.data[package][2]
|
||||
description: str = self.data[package][8]
|
||||
|
@ -333,11 +332,7 @@ class Slackbuilds(Configs):
|
|||
)
|
||||
|
||||
text: str = f'There are {len(choices)} dependencies:'
|
||||
code, tags = self.dialogbox.checklist(text, dependencies, title, height,
|
||||
width, list_height, choices)
|
||||
if not code:
|
||||
return dependencies
|
||||
code, self.dependencies = self.dialogbox.checklist(
|
||||
text, self.dependencies, title, height, width, list_height, choices)
|
||||
|
||||
os.system('clear')
|
||||
|
||||
return tags
|
||||
|
|
Loading…
Reference in a new issue