FreeBSD pkgng fix for non-interactive install.

In pkgng the way to install packages and assumming yes in pre and post install scripts is to use
-y, same as apt-get or yum, for example. Also env variable ASSUME_ALWAYS_YES=YES can be used, but
in this case, is a good idea to follow others package manager implementation.
Also remove the check where only -y is used if pkgng is executed in dryrun mode. In this case
there is no difference between dryrun or not.
This commit is contained in:
abednarik 2015-12-21 19:02:03 -03:00
parent f43f3d166c
commit 8ac213001a

View file

@ -730,7 +730,7 @@ def install(name=None,
if pkg_params is None or len(pkg_params) == 0:
return {}
opts = ''
opts = 'y'
repo_opts = ''
if salt.utils.is_true(orphan):
opts += 'A'
@ -742,8 +742,6 @@ def install(name=None,
opts += 'U'
if salt.utils.is_true(dryrun):
opts += 'n'
if not salt.utils.is_true(dryrun):
opts += 'y'
if salt.utils.is_true(quiet):
opts += 'q'
if salt.utils.is_true(reinstall_requires):