aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-02-20 08:06:09 +0100
committerGuido Günther <agx@sigxcpu.org>2017-02-20 08:10:16 +0100
commit8f93dc0c572e7a5600c9bc023858cc416a463cc1 (patch)
tree9fb70738596071a893d224a698e7bd31c858793e /bin
parentf4aa76bfcda1ded4649cd071b123ef8d7bf2344d (diff)
git-pbuilder: don't do set -x by default
to avoid spewig on stderr. Use GIT_PBUILDER_DEBUG to enable it.
Diffstat (limited to 'bin')
-rw-r--r--bin/git-pbuilder19
1 files changed, 13 insertions, 6 deletions
diff --git a/bin/git-pbuilder b/bin/git-pbuilder
index e34a8eaa..a3bd2824 100644
--- a/bin/git-pbuilder
+++ b/bin/git-pbuilder
@@ -267,21 +267,21 @@ EOE
# Run the builder.
if [ no = "$GIT_PBUILDER_AUTOCONF" ] ; then
- set -x
+ [ ! "$GIT_PBUILDER_DEBUG" ] || set -x
sudo "$BUILDER" "$action" "${OPTIONS[@]}" "$@"
else
if [ "$EXT" = '-backports' ] ; then
OTHERMIRROR="deb $BACKPORTS $DIST$EXT main"
- set -x
+ [ ! "$GIT_PBUILDER_DEBUG" ] || set -x
sudo "$BUILDER" "$action" --distribution "$DIST" \
--othermirror "$OTHERMIRROR" "${OPTIONS[@]}" "$@"
elif [ "$EXT" = '-lts' ] ; then
OTHERMIRROR="deb $LTS $DIST$EXT main"
- set -x
+ [ ! "$GIT_PBUILDER_DEBUG" ] || set -x
sudo "$BUILDER" "$action" --distribution "$DIST" \
--othermirror "$OTHERMIRROR" "${OPTIONS[@]}" "$@"
else
- set -x
+ [ ! "$GIT_PBUILDER_DEBUG" ] || set -x
sudo "$BUILDER" "$action" --distribution "$DIST" \
"${OPTIONS[@]}" "$@"
fi
@@ -327,12 +327,14 @@ done
# Now we can finally run pdebuild. The quoting here is tricky, but this
# seems to pass everything through properly.
if [ no = "$GIT_PBUILDER_AUTOCONF" ] ; then
- set -e; set -x
+ set -e
+ [ ! "$GIT_PBUILDER_DEBUG" ] || set -x
pdebuild --pbuilder "$BUILDER" --debbuildopts "$DEBBUILDOPTS" \
"${PDEBUILDOPTS[@]}" -- "${OPTIONS[@]}"
{ set +x; } 2>/dev/null; set +e
else
- set -e; set -x
+ set -e
+ [ ! "$GIT_PBUILDER_DEBUG" ] || set -x
pdebuild --buildresult "$OUTPUT_DIR" --pbuilder "$BUILDER" \
--debbuildopts "$DEBBUILDOPTS" "${PDEBUILDOPTS[@]}" -- "${OPTIONS[@]}"
{ set +x; } 2>/dev/null; set +e
@@ -514,6 +516,11 @@ Set this environment variable to change the default location for the
pbuilder tgz files (F</var/cache/pbuilder>) when BUILDER is set to
C<pbuilder>.
+=item GIT_PBUILDER_DEBUG
+
+Set this environment variable to get additional debugging output like how
+cowbuilder is invoked.
+
=back
=head1 FILES