Clarify pkg.installed pkg_verify documentation

There have been misunderstandings what the pkg_verify parameter does and
bug reports that it does not work, based on the wrong assumption that
this parameter changes the installation of new packages. The docstring
also stated that it was only provided by `yum`, but `zypper` also
provides this feature (actually it is `rpm` itself in both cases that
does the verification check)

Related issue: https://github.com/saltstack/salt/issues/44878
This commit is contained in:
Alexander Graul 2020-05-22 13:43:11 +02:00 committed by Megan Wilhite
parent 501e232472
commit 2ed5f3c29d

View file

@ -1279,14 +1279,15 @@ def installed(
.. versionadded:: 2014.7.0
For requested packages that are already installed and would not be
targeted for upgrade or downgrade, use pkg.verify to determine if any
of the files installed by the package have been altered. If files have
been altered, the reinstall option of pkg.install is used to force a
reinstall. Types to ignore can be passed to pkg.verify. Additionally,
``verify_options`` can be used to modify further the behavior of
pkg.verify. See examples below. Currently, this option is supported
for the following pkg providers: :mod:`yum <salt.modules.yumpkg>`.
Use pkg.verify to check if already installed packages require
reinstallion. Requested packages that are already installed and not
targeted for up- or downgrade are verified with pkg.verify to determine
if any file installed by the package have been modified or if package
dependencies are not fulfilled. ``ignore_types`` and ``verify_options``
can be passed to pkg.verify. See examples below. Currently, this option
is supported for the following pkg providers:
:mod:`yum <salt.modules.yumpkg>`,
:mod:`zypperpkg <salt.modules.zypperpkg>`.
Examples: