diff --git a/slpkg/binaries/install.py b/slpkg/binaries/install.py index b7681035..e6aa1b96 100644 --- a/slpkg/binaries/install.py +++ b/slpkg/binaries/install.py @@ -138,6 +138,9 @@ class Packages(Configs): if self.upgrade.is_package_upgradeable(name): return True + if self.utils.is_package_installed(name) and self.utils.is_option(self.flag_reinstall, self.flags): + return True + return False def checksum(self) -> None: diff --git a/slpkg/sbos/slackbuild.py b/slpkg/sbos/slackbuild.py index 04125bc2..b0458558 100644 --- a/slpkg/sbos/slackbuild.py +++ b/slpkg/sbos/slackbuild.py @@ -137,21 +137,17 @@ class Slackbuilds(Configs): and continue to install if the package is upgradable or the --reinstall option 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': return True - if not self.upgrade.is_package_upgradeable(name) and self.mode not in ['build', 'upgrade']: - return False + if self.upgrade.is_package_upgradeable(name) and self.mode != 'build': + 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: """ Downloads files and sources. """