Add '-E' options to pass proxy env for sudo

script install-deps.sh doesn't pass proxy options
 INSTALLER_CMD="sudo -H ${PKG_MANAGER} -y install"

Added -E (similar to elsewhere in script) to allow dnf/yum
installation of packages.

Updated OS_FAMILY "Suse", "Debian" and "RedHat" for consistency.

Change-Id: I8838c9e69c5cc874abee965bf685c13ffb9a4db0
Closes-bug: #1668544
This commit is contained in:
James McCarthy 2017-02-28 09:43:08 +00:00
parent 7ab562c5b1
commit 1bb4bc9816
1 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ CHECK_CMD_PKGS=(
# is installed
if [ -x '/usr/bin/zypper' ]; then
OS_FAMILY="Suse"
INSTALLER_CMD="sudo -H zypper install -y"
INSTALLER_CMD="sudo -H -E zypper install -y"
CHECK_CMD="zypper search --match-exact --installed"
PKG_MAP=(
[gcc]=gcc
@ -35,7 +35,7 @@ if [ -x '/usr/bin/zypper' ]; then
fi
elif [ -x '/usr/bin/apt-get' ]; then
OS_FAMILY="Debian"
INSTALLER_CMD="sudo -H apt-get -y install"
INSTALLER_CMD="sudo -H -E apt-get -y install"
CHECK_CMD="dpkg -l"
PKG_MAP=( [gcc]=gcc
[git]=git
@ -51,7 +51,7 @@ elif [ -x '/usr/bin/apt-get' ]; then
elif [ -x '/usr/bin/dnf' ] || [ -x '/usr/bin/yum' ]; then
OS_FAMILY="RedHat"
PKG_MANAGER=$(which dnf || which yum)
INSTALLER_CMD="sudo -H ${PKG_MANAGER} -y install"
INSTALLER_CMD="sudo -H -E ${PKG_MANAGER} -y install"
CHECK_CMD="rpm -q"
PKG_MAP=(
[gcc]=gcc