diff --git a/debootstrap b/debootstrap index a29d289..9fdd736 100755 --- a/debootstrap +++ b/debootstrap @@ -470,6 +470,19 @@ if ! doing_variant fakechroot && command -v apt-config >/dev/null; then fi fi +########################################################################### +# keep apt conf proxy settings in chroot #640992 +# export env for dldebs setup phase, and below during first_stage config apt +APT_CONF_PROXY="" +if ! doing_variant fakechroot && command -v apt-config >/dev/null; then + eval "$(apt-config shell APT_CONF_PROXY Acquire::http::Proxy)" + if [ -n "$APT_CONF_PROXY" ]; then + info APT_CONF_PROXY "Using apt conf proxy for setup: $APT_CONF_PROXY" + http_proxy="$APT_CONF_PROXY" + export http_proxy + fi +fi + ########################################################################### if [ -n "$DISABLE_KEYRING" ] && [ -n "$FORCE_KEYRING" ]; then error 1 BADARG "Both --no-check-gpg and --force-check-gpg specified, please pick one (at most)" @@ -829,6 +842,12 @@ if am_doing_phase first_stage; then else setup_apt_sources "$DEF_MIRROR" fi + + # configure apt proxy settings within chroot if detected above #640992 + if [ -n "$APT_CONF_PROXY" ]; then + info APT_CONF_PROXY "Configuring apt proxy: $APT_CONF_PROXY" + echo 'Acquire::http::Proxy "'$APT_CONF_PROXY'";' >> $TARGET/etc/apt/apt.conf.d/90proxy + fi fi if am_doing_phase second_stage; then
Attachment:
signature.asc
Description: PGP signature