Enhancement: Exit non-zero if specified packages are unavailable
lorengordon opened this issue · 1 comments
Problem Description:
Yum exits zero if any of the specified packages install successfully. This leads to false successes, when a specified package is unavailable.
If all of the specified packages are unavailable, then yum exits non-zero.
Expected Behavior:
Expected the build to fail if any specified packages did not get installed into the AMI.
Actual Behavior:
Build "succeeds" even when specified packages do not get installed.
(Detailed) Steps to reproduce:
Specify an available package and an unavailable package in the EXTRARPMS options.
(Optional) Fix options:
-
Loop over all packages, to install them individually. This will cause yum to exit non-zero if any of the packages are unavailable.
-
Test that all the specified packages actually are all installed after each
yum install
. -
Parse the
yum history
. -
Tee the yum output and parse that.
Also, would like to apply the fix to both AMIgen7 and AMIgen6...
Was closed by #60. Run script with errexit enabled and it will exit nonzero if specified packages are not present.