Commit 1888d310 authored by Holger Levsen's avatar Holger Levsen

d-i: fixup last commit, use --http-proxy correctly

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent bc9dbff8
......@@ -110,19 +110,25 @@ pdebuild_package() {
#
# prepare build
#
# use host apt proxy configuration for pbuilder too
if [ ! -z "$http_proxy" ] ; then
echo "echo '$(cat /etc/apt/apt.conf.d/80proxy)' > /etc/apt/apt.conf.d/80proxy" >> ${TMPFILE}
pbuilder_http_proxy="--http-proxy $http_proxy"
fi
# setup base.tgz
if [ ! -f /var/cache/pbuilder/base.tgz ] ; then
sudo pbuilder --create --http-proxy $http_proxy
sudo pbuilder --create $pbuilder_http_proxy
TMPFILE=$(mktemp)
cat >> $TMPFILE <<- EOF
# Preseeding man-db/auto-update to false
echo "man-db man-db/auto-update boolean false" | debconf-set-selections
EOF
sudo pbuilder --execute $http_proxy --save-after-exec -- ${TMPFILE}
sudo pbuilder --execute $pbuilder_http_proxy --save-after-exec -- ${TMPFILE}
rm ${TMPFILE}
else
ls -la /var/cache/pbuilder/base.tgz
file /var/cache/pbuilder/base.tgz
sudo pbuilder --update --http-proxy $http_proxy || ( sudo rm /var/cache/pbuilder/base.tgz ; sudo pbuilder --create )
sudo pbuilder --update $pbuilder_http_proxy || ( sudo rm /var/cache/pbuilder/base.tgz ; sudo pbuilder --create $pbuilder_http_proxy)
fi
#
# 3.0 quilt is not happy without an upstream tarball
......
......@@ -38,19 +38,26 @@ pdebuild_package() {
#
# prepare build
#
if [ -f /var/cache/pbuilder/base.tgz ] ; then
sudo pbuilder --create --http-proxy $http_proxy
# use host apt proxy configuration for pbuilder too
if [ ! -z "$http_proxy" ] ; then
echo "echo '$(cat /etc/apt/apt.conf.d/80proxy)' > /etc/apt/apt.conf.d/80proxy" >> ${TMPFILE}
pbuilder_http_proxy="--http-proxy $http_proxy"
fi
# setup base.tgz
if [ ! -f /var/cache/pbuilder/base.tgz ] ; then
sudo pbuilder --create $pbuilder_http_proxy
TMPFILE=$(mktemp)
cat >> $TMPFILE <<- EOF
# Preseeding man-db/auto-update to false
echo "man-db man-db/auto-update boolean false" | debconf-set-selections
EOF
sudo pbuilder --execute $http_proxy --save-after-exec -- ${TMPFILE}
sudo pbuilder --execute $pbuilder_http_proxy --save-after-exec -- ${TMPFILE}
rm ${TMPFILE}
else
sudo pbuilder --update --http-proxy $http_proxy
ls -la /var/cache/pbuilder/base.tgz
file /var/cache/pbuilder/base.tgz
sudo pbuilder --update $pbuilder_http_proxy || ( sudo rm /var/cache/pbuilder/base.tgz ; sudo pbuilder --create $pbuilder_http_proxy)
fi
#
# build
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment