mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-28 09:58:21 +01:00
Updated for reinstall
This commit is contained in:
parent
f58bc20b3d
commit
24f4a03e73
1 changed files with 14 additions and 10 deletions
|
@ -40,6 +40,8 @@ class Packages(Configs):
|
||||||
self.dependencies: list = []
|
self.dependencies: list = []
|
||||||
self.install_order: list = []
|
self.install_order: list = []
|
||||||
self.binary_packages: list = []
|
self.binary_packages: list = []
|
||||||
|
self.slackware_command: str = self.installpkg
|
||||||
|
self.progress_message: str = f'{self.cyan}Installing{self.endc}'
|
||||||
|
|
||||||
self.option_for_reinstall: bool = self.utils.is_option(
|
self.option_for_reinstall: bool = self.utils.is_option(
|
||||||
['-r', '--reinstall'], flags)
|
['-r', '--reinstall'], flags)
|
||||||
|
@ -67,6 +69,8 @@ class Packages(Configs):
|
||||||
start: float = time.time()
|
start: float = time.time()
|
||||||
self.crating_the_package_urls_list()
|
self.crating_the_package_urls_list()
|
||||||
self.checksum_binary_packages()
|
self.checksum_binary_packages()
|
||||||
|
self.set_slackware_command()
|
||||||
|
self.set_progress_message()
|
||||||
self.install_packages()
|
self.install_packages()
|
||||||
elapsed_time: float = time.time() - start
|
elapsed_time: float = time.time() - start
|
||||||
|
|
||||||
|
@ -149,21 +153,21 @@ class Packages(Configs):
|
||||||
|
|
||||||
def install_packages(self) -> None:
|
def install_packages(self) -> None:
|
||||||
for package in self.binary_packages:
|
for package in self.binary_packages:
|
||||||
progress_message: str = f'{self.cyan}Installing{self.endc}'
|
command: str = f'{self.slackware_command} {self.tmp_slpkg}/{package}'
|
||||||
slack_command: str = self.installpkg
|
self.multi_proc.process(command, package, self.progress_message)
|
||||||
|
|
||||||
if (self.option_for_reinstall or self.utils.is_package_installed(package)
|
|
||||||
or self.mode == 'upgrade'):
|
|
||||||
progress_message: str = f'{self.cyan}Upgrading{self.endc}'
|
|
||||||
slack_command: str = self.reinstall
|
|
||||||
|
|
||||||
command: str = f'{slack_command} {self.tmp_slpkg}/{package}'
|
|
||||||
self.multi_proc.process(command, package, progress_message)
|
|
||||||
|
|
||||||
if not self.option_for_resolve_off:
|
if not self.option_for_resolve_off:
|
||||||
name: str = self.utils.split_package(Path(package).stem)['name']
|
name: str = self.utils.split_package(Path(package).stem)['name']
|
||||||
self.logs_deps.logging(name)
|
self.logs_deps.logging(name)
|
||||||
|
|
||||||
|
def set_progress_message(self):
|
||||||
|
if self.mode == 'upgrade' or self.option_for_reinstall:
|
||||||
|
self.progress_message: str = f'{self.cyan}Upgrading{self.endc}'
|
||||||
|
|
||||||
|
def set_slackware_command(self) -> None:
|
||||||
|
if self.mode == 'upgrade' or self.option_for_reinstall:
|
||||||
|
self.slackware_command: str = self.reinstall
|
||||||
|
|
||||||
def choose_package_dependencies(self) -> None:
|
def choose_package_dependencies(self) -> None:
|
||||||
if self.dependencies:
|
if self.dependencies:
|
||||||
height: int = 10
|
height: int = 10
|
||||||
|
|
Loading…
Reference in a new issue