From d49f54401b235d4b2c0c41d998edb07cddaa2d82 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 4 Apr 2023 20:46:13 +0300 Subject: [PATCH] Updated for bin installation --- slpkg/binaries/install.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/slpkg/binaries/install.py b/slpkg/binaries/install.py index 2d97307e..f5b47d83 100644 --- a/slpkg/binaries/install.py +++ b/slpkg/binaries/install.py @@ -154,16 +154,19 @@ class Packages(Configs): def install_packages(self) -> None: """ Install the packages. """ - message: str = f'{self.cyan}Installing{self.endc}' - slack_command: str = self.installpkg - if self.utils.is_option(self.flag_reinstall, self.flags) or self.mode == 'upgrade': - message: str = f'{self.cyan}Upgrade{self.endc}' - slack_command: str = self.reinstall - for package in self.binary_packages: - self.process_message: str = f"package '{package}' to install" - command: str = f'{slack_command} {self.tmp_slpkg}/{package}' + message: str = f'{self.cyan}Installing{self.endc}' + slack_command: str = self.installpkg + + if (self.utils.is_option(self.flag_reinstall, self.flags) and + self.utils.is_package_installed(package) or self.mode == 'upgrade'): + + message: str = f'{self.cyan}Upgrade{self.endc}' + slack_command: str = self.reinstall + + command: str = f'{slack_command} {self.tmp_slpkg}/{package}' + self.process_message: str = f"package '{package}' to install" self.multi_process(command, package, message) if not self.utils.is_option(self.flag_resolve_off, self.flags):