From 3f08738b67aaa87b4f3e4d6616de2ede624bb7cc Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Thu, 8 Dec 2011 02:23:09 -0500 Subject: [PATCH] mk-sbuild: fix embarrasing bad logic error in http_proxy usage The logic here is simply wrong, and it would result in setting proxy to empty value if DEBOOTSTRAP_PROXY or http_proxy was non-empty. --- mk-sbuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk-sbuild b/mk-sbuild index eade0d2..a044dd2 100755 --- a/mk-sbuild +++ b/mk-sbuild @@ -480,9 +480,9 @@ if [ -n "$DEBOOTSTRAP_EXCLUDE" ] ; then fi # if http_proxy is set in the environment (even empty) set 'proxy' to it -[ "$proxy" = "_unset_" -a "${DEBOOTSTRAP_PROXY-xx}" = "xx" ] && +[ "$proxy" = "_unset_" -a "${DEBOOTSTRAP_PROXY-xx}" != "xx" ] && proxy=${DEBOOTSTRAP_PROXY} -[ "$proxy" = "_unset_" -a "${http_proxy-xx}" = "xx" ] && proxy=${http_proxy} +[ "$proxy" = "_unset_" -a "${http_proxy-xx}" != "xx" ] && proxy=${http_proxy} if [ "$proxy" = "_unset_" ]; then _out=$(apt-config shell x Acquire::HTTP::Proxy) && _out=$(sh -c 'eval $1 && echo $x' -- "$_out") && [ -n "$_out" ] &&