[Qa-jenkins-scm] [jenkins.debian.net] 04/04: reproducible: setup_schroot: set up apt http_proxy in the chroot only if $http_proxy is defined

Holger Levsen holger at moszumanska.debian.org
Sat Apr 18 16:02:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 0aa7517b0c8f58b4fb68eac29a73def9fe447a12
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Mon Apr 6 18:14:00 2015 +0200

    reproducible: setup_schroot: set up apt http_proxy in the chroot only if $http_proxy is defined
---
 bin/reproducible_setup_schroot.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/reproducible_setup_schroot.sh b/bin/reproducible_setup_schroot.sh
index c8f9a56..41dc235 100755
--- a/bin/reproducible_setup_schroot.sh
+++ b/bin/reproducible_setup_schroot.sh
@@ -47,7 +47,9 @@ bootstrap() {
 
 	echo -e '#!/bin/sh\nexit 101'              | sudo tee   $CHROOT_TARGET/usr/sbin/policy-rc.d >/dev/null
 	sudo chmod +x $CHROOT_TARGET/usr/sbin/policy-rc.d
-	echo "Acquire::http::Proxy \"$http_proxy\";" | sudo tee    $CHROOT_TARGET/etc/apt/apt.conf.d/80proxy >/dev/null
+	if [ ! -z "$http_proxy" ] ; then
+		echo "Acquire::http::Proxy \"$http_proxy\";" | sudo tee    $CHROOT_TARGET/etc/apt/apt.conf.d/80proxy >/dev/null
+	fi
 	echo "deb-src $MIRROR $SUITE main"        | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list > /dev/null
 
 	sudo chroot $CHROOT_TARGET apt-get update

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list