cca76e8dfe
It may happen a package fails to properly install (especially for
openstack-selinux). Unfortunately, in such cases rpm will just output
some warning lost in the output, and will still exit with a success code
(0).
This patch allows to leverage the "--verify" option of RPM. If a package
spec file has a %verifyscript scriptlet, it will be called, and do
whatever is described in it.
In openstack-selinux case, it will ensure everything is actually
installed without issue[1].
If a package doesn't have the %verifyscript, rpm will just exit 0
without any error nor warning.
Note:
the failed_when condition allows to:
- protect against missing package (openvswitch)
- ensure we're actually failing on the %verifyscript
The second part is useful when we don't get the doc for package -
apparently, this is the case for python3-pyyaml, at least in CI
(molecule).
[1] https://review.rdoproject.org/r/c/openstack/openstack-selinux-distgit/+/43578
Change-Id: Iec1e79c9c1cbb6b7e5e7b768d425aab8270c1d89
(cherry picked from commit
|
||
---|---|---|
.. | ||
defaults | ||
meta | ||
molecule/default | ||
tasks | ||
vars |