Updated for install

This commit is contained in:
Dimitris Zlatanidis 2023-04-08 21:41:50 +03:00
parent 9406ab301e
commit 586b2f31c0
2 changed files with 10 additions and 11 deletions

View file

@ -138,6 +138,9 @@ class Packages(Configs):
if self.upgrade.is_package_upgradeable(name): if self.upgrade.is_package_upgradeable(name):
return True return True
if self.utils.is_package_installed(name) and self.utils.is_option(self.flag_reinstall, self.flags):
return True
return False return False
def checksum(self) -> None: def checksum(self) -> None:

View file

@ -137,21 +137,17 @@ class Slackbuilds(Configs):
and continue to install if the package is upgradable or the --reinstall option and continue to install if the package is upgradable or the --reinstall option
applied. applied.
""" """
if (self.utils.is_option(self.flag_skip_installed, self.flags)
and not self.utils.is_option(self.flag_reinstall, self.flags)
and self.mode != 'build'):
return False
if self.utils.is_option(self.flag_reinstall, self.flags) and self.mode != 'build':
return True
if not self.utils.is_package_installed(name) and self.mode != 'build': if not self.utils.is_package_installed(name) and self.mode != 'build':
return True return True
if not self.upgrade.is_package_upgradeable(name) and self.mode not in ['build', 'upgrade']: if self.upgrade.is_package_upgradeable(name) and self.mode != 'build':
return False return True
return True if (self.utils.is_package_installed(name) and self.utils.is_option(self.flag_reinstall, self.flags)
and self.mode != 'build'):
return True
return False
def prepare_slackbuilds_for_build(self) -> None: def prepare_slackbuilds_for_build(self) -> None:
""" Downloads files and sources. """ """ Downloads files and sources. """