mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
aptpkg will specify --install-recommends if enabled by the SLS
This is to resolve #35422. The "install_recommends" flag in the SLS file would apply --no-install-recommends to false, but if set to True it would not enforce --install-recommends. It should not be assumed that apt will install the recommends packages, since that can be disabled globally. https://github.com/saltstack/salt/issues/35422
This commit is contained in:
parent
2ef596673f
commit
f54bf445b5
1 changed files with 5 additions and 2 deletions
|
@ -559,8 +559,11 @@ def install(name=None,
|
|||
else:
|
||||
cmd_prefix += ['-o', 'DPkg::Options::=--force-confold']
|
||||
cmd_prefix += ['-o', 'DPkg::Options::=--force-confdef']
|
||||
if 'install_recommends' in kwargs and not kwargs['install_recommends']:
|
||||
cmd_prefix.append('--no-install-recommends')
|
||||
if 'install_recommends' in kwargs:
|
||||
if not kwargs['install_recommends']:
|
||||
cmd_prefix.append('--no-install-recommends')
|
||||
else:
|
||||
cmd_prefix.append('--install-recommends')
|
||||
if 'only_upgrade' in kwargs and kwargs['only_upgrade']:
|
||||
cmd_prefix.append('--only-upgrade')
|
||||
if skip_verify:
|
||||
|
|
Loading…
Add table
Reference in a new issue