From cc177cc2156623732715b973ccc58bfb2dd40343 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 18 Jan 2017 11:16:18 +1100 Subject: [PATCH] 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 --- elements/yum/bin/install-packages | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/elements/yum/bin/install-packages b/elements/yum/bin/install-packages index 3dc72c846..218c72e64 100755 --- a/elements/yum/bin/install-packages +++ b/elements/yum/bin/install-packages @@ -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