Preserve env when calling yum with sudo
In particular we need [http|https]_proxy to be preserved. Change-Id: I5bcd1b1deac917a1be8d8155f1283e330e3d5862
This commit is contained in:
parent
2ed4c1d860
commit
63641aa2ce
@ -80,7 +80,7 @@ function _install_pkg_manager {
|
|||||||
sudo sed -i "s,/etc/pki/rpm-gpg,$TARGET_ROOT/etc/pki/rpm-gpg,g" \
|
sudo sed -i "s,/etc/pki/rpm-gpg,$TARGET_ROOT/etc/pki/rpm-gpg,g" \
|
||||||
$TARGET_ROOT/etc/yum.repos.d/*repo
|
$TARGET_ROOT/etc/yum.repos.d/*repo
|
||||||
|
|
||||||
sudo yum -y \
|
sudo -E yum -y \
|
||||||
--setopt=cachedir=$YUM_CACHE/$ARCH/$DIB_RELEASE \
|
--setopt=cachedir=$YUM_CACHE/$ARCH/$DIB_RELEASE \
|
||||||
--setopt=reposdir=$TARGET_ROOT/etc/yum.repos.d \
|
--setopt=reposdir=$TARGET_ROOT/etc/yum.repos.d \
|
||||||
--installroot $TARGET_ROOT \
|
--installroot $TARGET_ROOT \
|
||||||
@ -121,8 +121,8 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# bootstrap the environment within the chroot
|
# bootstrap the environment within the chroot
|
||||||
sudo chroot $TARGET_ROOT ${YUM} makecache
|
sudo -E chroot $TARGET_ROOT ${YUM} makecache
|
||||||
sudo chroot $TARGET_ROOT ${YUM} -y \
|
sudo -E chroot $TARGET_ROOT ${YUM} -y \
|
||||||
--setopt=cachedir=/tmp/yum/$ARCH/$DIB_RELEASE \
|
--setopt=cachedir=/tmp/yum/$ARCH/$DIB_RELEASE \
|
||||||
install passwd findutils sudo util-linux-ng
|
install passwd findutils sudo util-linux-ng
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user