Updated for status

This commit is contained in:
Dimitris Zlatanidis 2023-03-28 17:29:47 +03:00
parent a5b7a547db
commit 0556b65aba
2 changed files with 6 additions and 13 deletions

View file

@ -225,17 +225,12 @@ class Packages(Configs):
repo_ver: str = BinQueries(package, self.repo).version()
help_text: str = f'Package: {package}-{repo_ver}'
upgradable: str = self.utils.is_package_upgradeable(package)
if self.mode == 'build':
if self.mode == 'upgrade' and upgradable:
status: bool = True
if self.mode == 'upgrade' and self.utils.is_package_upgradeable(package):
status: bool = True
if self.mode == 'install' and not self.utils.is_package_installed(package):
status: bool = True
if self.mode == 'install' and self.utils.is_package_upgradeable(package):
if self.mode == 'install' and upgradable:
status: bool = True
choices += [(package, repo_ver, status, help_text)]

View file

@ -361,17 +361,15 @@ class Slackbuilds(Configs):
repo_ver: str = SBoQueries(package).version()
description: str = SBoQueries(package).description()
help_text: str = f'Description: {description}'
upgradable: str = self.utils.is_package_upgradeable(package)
if self.mode == 'build':
status: bool = True
if self.mode == 'upgrade' and self.utils.is_package_upgradeable(package):
if self.mode == 'upgrade' and upgradable:
status: bool = True
if self.mode == 'install' and not self.utils.is_package_installed(package):
status: bool = True
if self.mode == 'install' and self.utils.is_package_upgradeable(package):
if self.mode == 'install' and upgradable:
status: bool = True
choices += [(package, repo_ver, status, help_text)]