From fdf00f27db19f572ac1d8fd3714c5b412556dbf3 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 13 Mar 2015 11:50:02 +1100 Subject: [PATCH] Add defaults for yum proxy variables Without these defaults, sourcing functions-common with -u turned on (as say ./tools/build_wheels.sh does) will bail out with unset variable errors. Also fix up quoting, and add no_proxy for zypper run Change-Id: Ideb441634243c1c5ce7db3a375c2d98617e9d1dc --- functions-common | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/functions-common b/functions-common index 4739e42e90..838ca53f6a 100644 --- a/functions-common +++ b/functions-common @@ -1019,8 +1019,8 @@ function yum_install { # The manual check for missing packages is because yum -y assumes # missing packages are OK. See # https://bugzilla.redhat.com/show_bug.cgi?id=965567 - $sudo http_proxy=$http_proxy https_proxy=$https_proxy \ - no_proxy=$no_proxy \ + $sudo http_proxy="${http_proxy:-}" https_proxy="${https_proxy:-}" \ + no_proxy="${no_proxy:-}" \ ${YUM:-yum} install -y "$@" 2>&1 | \ awk ' BEGIN { fail=0 } @@ -1042,7 +1042,8 @@ function zypper_install { [[ "$OFFLINE" = "True" ]] && return local sudo="sudo" [[ "$(id -u)" = "0" ]] && sudo="env" - $sudo http_proxy=$http_proxy https_proxy=$https_proxy \ + $sudo http_proxy="${http_proxy:-}" https_proxy="${https_proxy:-}" \ + no_proxy="${no_proxy:-}" \ zypper --non-interactive install --auto-agree-with-licenses "$@" }