yum/install-packages output cleanup

Rather than echo the package list separately, turn on tracing around
the yum/dnf call so that we get more complete output.  No loss of
info, as this effecitvely shows the packgae list; plus it has the
bonus that it makes more sense in the logs, because otherwise you get
all the yum/dnf output without knowing what the call was.

Change-Id: I44df6e944af602e6b03f669c15a521056de1ad79
This commit is contained in:
Ian Wienand 2017-01-18 11:16:18 +11:00
parent e3b67a3d45
commit cc177cc215

View File

@ -27,6 +27,9 @@ MAP_ELEMENT=
# allow override for dnf, as shipped by default with >=F22
YUM=${YUM:-yum}
# save global xtrace state
_xtrace=$(set +o | grep xtrace)
SCRIPTNAME=$(basename $0)
function show_options () {
echo "Usage: $SCRIPTNAME [package ...]"
@ -103,7 +106,7 @@ if [ -n "$WHITELIST" ]; then
exit 0
fi
echo "Running install-packages ${ACTION}. Package list: $PKGS"
echo "Running install-packages ${ACTION}."
if [ "$ACTION" == "download" ]; then
mkdir -p $DOWNLOAD_PATH
@ -130,6 +133,7 @@ if [ -n "$WHITELIST" ]; then
# point.
#
# [1] https://bugzilla.redhat.com/show_bug.cgi?id=965567
set -o xtrace
${YUM} -v -y $ACTION $EXTRA_ARGS $PKGS
if [ "$ACTION" == "install" ]; then
@ -138,6 +142,7 @@ if [ -n "$WHITELIST" ]; then
dnf mark install $PKGS
fi
fi
$_xtrace
# probably not the right place for this; but python-pip package on
# fedora/rh calls pip "pip-python" while the rest of the work