From 8868522e78c8e7a2415f744ae22012b0cbbb1e54 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Thu, 8 Nov 2018 15:40:16 +0000 Subject: [PATCH] When calling snap-seed-parse append stdout to file, but redirect stderr to stdout, thus unbreak autopkgtests. --- debian/changelog | 5 +++++ live-build/auto/build | 3 ++- live-build/functions | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 070d76b2..1b7f4f9a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,13 @@ livecd-rootfs (2.544) UNRELEASED; urgency=medium + [ Steve Langasek ] * Properly fix the hard-linking of vmlinuz, taken astray by my misguided merge review. + [ Dimitri John Ledkov ] + * When calling snap-seed-parse append stdout to file, but redirect + stderr to stdout, thus unbreak autopkgtests. + -- Steve Langasek Fri, 02 Nov 2018 14:46:30 -0700 livecd-rootfs (2.543) disco; urgency=medium diff --git a/live-build/auto/build b/live-build/auto/build index eb83f8d8..0bead613 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -550,8 +550,9 @@ if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; th fi # '--initramfs none' produces different manifest names. +# NB! we want stdout appended to the manifest, yet stderr to be printed on stdout if [ -e "binary/$INITFS/filesystem.packages" ]; then - ./config/snap-seed-parse "chroot/" >> "binary/${INITFS}/filesystem.packages" + ./config/snap-seed-parse "chroot/" 2>&1 >> "binary/${INITFS}/filesystem.packages" ln "binary/$INITFS/filesystem.packages" "$PREFIX.manifest" chmod 644 "$PREFIX.manifest" fi diff --git a/live-build/functions b/live-build/functions index 9f4f02fd..f12a364b 100644 --- a/live-build/functions +++ b/live-build/functions @@ -43,13 +43,14 @@ create_empty_disk_image() { dd if=/dev/zero of="$1" bs=1 count=0 seek="${imagesize}" } +# NB! we want stdout appended to the manifest, yet stderr to be printed on stdout create_manifest() { local chroot_root=${1} local target_file=${2} echo "create_manifest chroot_root: ${chroot_root}" dpkg-query --show --admindir="${chroot_root}/var/lib/dpkg" > ${target_file} echo "create_manifest call to dpkg-query finished." - ./config/snap-seed-parse "${chroot_root}" >> ${target_file} + ./config/snap-seed-parse "${chroot_root}" 2>&1 >> ${target_file} echo "create_manifest call to snap_seed_parse finished." echo "create_manifest finished" }