From ea4bdfde05d8b971be467540002c742f77563f4d Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 27 Apr 2023 17:22:48 +0300 Subject: [PATCH] Updated for status --- slpkg/binaries/install.py | 13 +++---------- slpkg/sbos/slackbuild.py | 16 +++------------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/slpkg/binaries/install.py b/slpkg/binaries/install.py index 4cc7fbc5..fece4f32 100644 --- a/slpkg/binaries/install.py +++ b/slpkg/binaries/install.py @@ -215,21 +215,14 @@ class Packages(Configs): title: str = ' Choose dependencies you want to install ' for package in dependencies: - status: bool = False + status: bool = True repo_ver: str = self.data[package][0] help_text: str = f'Package: {package} {repo_ver}' - upgradable: bool = self.upgrade.is_package_upgradeable(package) installed: str = self.utils.is_package_installed(package) - if self.mode == 'upgrade' and upgradable: - status: bool = True - - if self.mode == 'install' and upgradable: - status: bool = True - - if self.mode == 'install' and not installed: - status: bool = True + if installed: + status: bool = False if self.option_for_reinstall: status: bool = True diff --git a/slpkg/sbos/slackbuild.py b/slpkg/sbos/slackbuild.py index 17d52e54..aad7ea89 100644 --- a/slpkg/sbos/slackbuild.py +++ b/slpkg/sbos/slackbuild.py @@ -360,25 +360,15 @@ class Slackbuilds(Configs): title: str = ' Choose dependencies you want to install ' for package in dependencies: - status: bool = False + status: bool = True repo_ver: str = self.data[package][2] description: str = self.data[package][8] help_text: str = f'Description: {description}' - upgradable: bool = self.upgrade.is_package_upgradeable(package) installed: str = self.utils.is_package_installed(package) - if self.mode == 'build': - status: bool = True - - if self.mode == 'upgrade': - status: bool = True - - if self.mode == 'install' and upgradable: - status: bool = True - - if self.mode == 'install' and not installed: - status: bool = True + if installed: + status: bool = False if self.option_for_reinstall: status: bool = True