aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-06-23 10:21:25 +0200
committerGuido Günther <agx@sigxcpu.org>2017-06-23 13:40:29 +0200
commit021fe9dfb39815827e14199ff480d8c00096df55 (patch)
tree9dc9fba10a40751b0ee61d2fa885afaff9ddf6f2 /bin
parent0b4a348a53fccf792f95619cc966dbf82924bb1a (diff)
git-pbuilder: drop environment variables that passed in our config
We don't want to pass them on to pdebuild since this can trip up the invoked build system e.g. https://anonscm.debian.org/cgit/pkg-mozilla/icedove.git/commit/?id=56f8f4b728fa0a1075ccce1883a29bbe1daae303
Diffstat (limited to 'bin')
-rw-r--r--bin/git-pbuilder7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/git-pbuilder b/bin/git-pbuilder
index 309f2266..57e4cfe2 100644
--- a/bin/git-pbuilder
+++ b/bin/git-pbuilder
@@ -37,6 +37,12 @@ shell_quote () {
echo "$1" | sed -e "s/'/'\"'\"'/g" -e "1 s/^/'/" -e "\$ s/\$/'/"
}
+# unset variables we inherited from the environment ourselfes
+# Names like DIST are very generic and can trip up other build systems
+unset_env() {
+ export -n DIST BUILDER ARCH
+}
+
# Set default BUILDER, DIST, and ARCH based on the name we were invoked as.
# This allows people to create symlinks like git-pbuilder-squeeze and
# git-qemubuilder-squeeze-amd64 pointing to git-pbuilder and auto-detecting
@@ -326,6 +332,7 @@ done
# Now we can finally run pdebuild. The quoting here is tricky, but this
# seems to pass everything through properly.
+unset_env
if [ no = "$GIT_PBUILDER_AUTOCONF" ] ; then
set -e
[ ! "$GIT_PBUILDER_DEBUG" ] || set -x