mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-19 10:27:07 +01:00
Updated for naming
This commit is contained in:
parent
3e9f742465
commit
6e03e29c6a
1 changed files with 15 additions and 17 deletions
|
@ -24,7 +24,6 @@ from slpkg.logging_deps import LoggingDeps
|
|||
from slpkg.repositories import Repositories
|
||||
from slpkg.sbos.dependencies import Requires
|
||||
from slpkg.logging_config import LoggingConfig
|
||||
from slpkg.models.models import session as Session
|
||||
|
||||
|
||||
class Slackbuilds(Configs):
|
||||
|
@ -38,7 +37,6 @@ class Slackbuilds(Configs):
|
|||
self.flags: list = flags
|
||||
self.mode: str = mode
|
||||
|
||||
self.session = Session
|
||||
self.errors = Errors()
|
||||
self.repos = Repositories()
|
||||
self.utils = Utilities()
|
||||
|
@ -102,15 +100,15 @@ class Slackbuilds(Configs):
|
|||
|
||||
def creating_dependencies_list(self) -> None:
|
||||
if not self.option_for_resolve_off:
|
||||
for sbo in self.slackbuilds:
|
||||
deps: tuple = Requires(self.data, sbo).resolve()
|
||||
for slackbuild in self.slackbuilds:
|
||||
dependencies: tuple = Requires(self.data, slackbuild).resolve()
|
||||
|
||||
for dep in deps:
|
||||
for dependency in dependencies:
|
||||
# Skip installed package when the option --skip-installed is applied.
|
||||
if self.option_for_skip_installed and self.utils.is_package_installed(dep):
|
||||
if self.option_for_skip_installed and self.utils.is_package_installed(dependency):
|
||||
continue
|
||||
|
||||
self.dependencies.append(dep)
|
||||
self.dependencies.append(dependency)
|
||||
|
||||
def remove_duplicate_from_dependencies_list(self) -> None:
|
||||
if self.dependencies:
|
||||
|
@ -176,8 +174,8 @@ class Slackbuilds(Configs):
|
|||
|
||||
def download_the_sources(self) -> None:
|
||||
if self.sources:
|
||||
for pkg, sbo_sources in self.sources.items():
|
||||
down_urls = Downloader(Path(self.build_path, pkg), sbo_sources, self.flags)
|
||||
for package, sbo_sources in self.sources.items():
|
||||
down_urls = Downloader(Path(self.build_path, package), sbo_sources, self.flags)
|
||||
down_urls.download()
|
||||
print()
|
||||
|
||||
|
@ -225,24 +223,24 @@ class Slackbuilds(Configs):
|
|||
line: str = f'TAG=${{TAG:-{self.repo_tag}}}\n'
|
||||
script.write(line)
|
||||
|
||||
def install_package(self, package_name: str) -> None:
|
||||
package: str = self.find_package_for_install(package_name)
|
||||
self.set_slackware_command(package_name)
|
||||
def install_package(self, name: str) -> None:
|
||||
package: str = self.find_package_for_install(name)
|
||||
self.set_slackware_command(name)
|
||||
|
||||
message: str = f'{self.cyan}Installing{self.endc}'
|
||||
self.process_message: str = f"package '{package_name}' to install"
|
||||
self.process_message: str = f"package '{name}' to install"
|
||||
|
||||
if self.mode == 'upgrade':
|
||||
message: str = f'{self.cyan}Upgrade{self.endc}'
|
||||
self.process_message: str = f"package '{package_name}' to upgrade"
|
||||
self.process_message: str = f"package '{name}' to upgrade"
|
||||
|
||||
command: str = f'{self.slackware_command} {self.tmp_path}/{package}'
|
||||
|
||||
self.multi_process(command, package, message)
|
||||
|
||||
def set_slackware_command(self, package_name: str) -> None:
|
||||
def set_slackware_command(self, name: str) -> None:
|
||||
self.slackware_command: str = self.installpkg
|
||||
if self.option_for_reinstall and self.utils.is_package_installed(package_name):
|
||||
if self.option_for_reinstall and self.utils.is_package_installed(name):
|
||||
self.slackware_command: str = self.reinstall
|
||||
|
||||
def find_package_for_install(self, name: str) -> str:
|
||||
|
@ -307,7 +305,7 @@ class Slackbuilds(Configs):
|
|||
else:
|
||||
self.utils.process(command, self.stderr, self.stdout)
|
||||
|
||||
def choose_package_dependencies(self):
|
||||
def choose_package_dependencies(self) -> None:
|
||||
if self.dependencies:
|
||||
height: int = 10
|
||||
width: int = 70
|
||||
|
|
Loading…
Reference in a new issue