mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-28 09:58:21 +01:00
Fixed for installing
This commit is contained in:
parent
e2eca62151
commit
5d4d961e7d
1 changed files with 14 additions and 2 deletions
|
@ -82,6 +82,12 @@ class Packages(Configs):
|
|||
if not self.utils.is_option(self.flag_resolve_off, self.flags):
|
||||
|
||||
for pkg in self.packages:
|
||||
|
||||
# Skip installed package when the option --skip-installed is applied.
|
||||
if (self.utils.is_option(self.flag_skip_installed, self.flags) and
|
||||
self.utils.is_package_installed(pkg)):
|
||||
continue
|
||||
|
||||
self.packages_requires += Required(pkg, self.repo).resolve()
|
||||
|
||||
# Clean dependencies from the dependencies list if already added with main packages.
|
||||
|
@ -124,12 +130,18 @@ class Packages(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):
|
||||
if (self.utils.is_option(self.flag_skip_installed, self.flags)
|
||||
and not self.utils.is_option(self.flag_reinstall, self.flags)):
|
||||
return False
|
||||
|
||||
if self.upgrade.is_package_upgradeable(name) or self.utils.is_option(self.flag_reinstall, self.flags):
|
||||
if self.utils.is_option(self.flag_reinstall, self.flags):
|
||||
return True
|
||||
|
||||
if not self.upgrade.is_package_upgradeable(name):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def checksum(self) -> None:
|
||||
""" Packages checksums. """
|
||||
md5 = Md5sum(self.flags)
|
||||
|
|
Loading…
Reference in a new issue