diff options
author | Simon McVittie <smcv@collabora.com> | 2018-11-12 16:58:56 +0000 |
---|---|---|
committer | Héctor Orón Martínez <zumbi@debian.org> | 2019-09-01 01:59:08 +0200 |
commit | 75103b2c817df8e8db6824168058e0b312c89df9 (patch) | |
tree | 8d90283266d3a3517f537bfb8103d4b4cfb43cbb | |
parent | d55f7891fb05b82ccc5b1d102df7753974848c56 (diff) |
debootstrap: Print the exact command we're going to run
debootstrap is not a simple command, and there are some subtleties to
the options we use, so we should log exactly what we did.
The incantation with `$(printf ' %q' "$@")` is to log the contents
of $@, correctly shell-quoted to avoid ambiguity (in case there are
spaces in an argument). It should expand to something like
running debootstrap: chroot /buildroot debootstrap --etc --etc...
Signed-off-by: Simon McVittie <smcv@collabora.com>
Forwarded: https://github.com/openSUSE/obs-build/pull/497
Gbp-Pq: Name debootstrap-Print-the-exact-command-we-re-going-to-run.patch
-rw-r--r-- | build-recipe-debootstrap | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/build-recipe-debootstrap b/build-recipe-debootstrap index 2e72fef..55c6191 100644 --- a/build-recipe-debootstrap +++ b/build-recipe-debootstrap @@ -53,7 +53,7 @@ recipe_build_debootstrap() { echo force-unsafe-io > "$BUILD_ROOT/$myroot/etc/dpkg/dpkg.cfg.d/force-unsafe-io" set -- chroot $BUILD_ROOT debootstrap --keep-debootstrap-dir --no-check-gpg --variant=buildd --arch="${arch}" --include="$FULL_PKG_LIST" "$dist" "$myroot" file:///.build.binaries - echo "running debootstrap..." + echo "running debootstrap:$(printf ' %q' "$@")..." if ! "$@" || ! chroot $BUILD_ROOT dpkg --configure -a; then cat $BUILD_ROOT/$myroot/debootstrap/debootstrap.log cleanup_and_exit 1 "Failed to setup debootstrap chroot" |