From 413a53d4825c5600c66efcec4fa8a710cee5857f Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Tue, 3 Oct 2017 17:31:27 +0200 Subject: [PATCH] When SUBPROJECT environment variable is not set assume it to be "" --- live-build/auto/build | 8 ++++---- live-build/auto/config | 20 +++++++++---------- .../ubuntu-cpc/hooks/032-disk-image.binary | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index 6fc4459d..443482e3 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -31,13 +31,13 @@ Expire-Date: 0 lb bootstrap "$@" - if [ "$SUBPROJECT" = minimized ] \ + if [ "${SUBPROJECT:-}" = minimized ] \ && ! Chroot chroot dpkg -l tzdata 2>&1 |grep -q ^ii; then # workaround for tzdata purge not removing these files rm -f chroot/etc/localtime chroot/etc/timezone fi - if [ "$SUBPROJECT" = minimized ]; then + if [ "${SUBPROJECT:-}" = minimized ]; then # set up dpkg filters to skip installing docs on minimizedd system mkdir -p chroot/etc/dpkg/dpkg.cfg.d cat > chroot/etc/dpkg/dpkg.cfg.d/excludes <> config/chroot -echo "SUBPROJECT=\"$SUBPROJECT\"" >> config/chroot +echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/chroot echo "LB_BINARY_HOOKS=\"$BINARY_HOOKS\"" >> config/binary echo "BUILDSTAMP=\"$NOW\"" >> config/binary -echo "SUBPROJECT=\"$SUBPROJECT\"" >> config/binary +echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/binary case $ARCH+$SUBARCH in armhf+raspi2) @@ -783,7 +783,7 @@ EOF config/archives/proposed.list.binary fi -case $PROJECT:$SUBPROJECT in +case $PROJECT:${SUBPROJECT:-} in *-dvd:*) . config/bootstrap @@ -869,7 +869,7 @@ EOF fi fi -case $SUBPROJECT in +case ${SUBPROJECT:-} in ubuntu-rtm|ubuntu-rtm/*) # debootstrap doesn't know about ubuntu-rtm series directly. Rather # than having to teach it, we employ a few hacks to make it use the diff --git a/live-build/ubuntu-cpc/hooks/032-disk-image.binary b/live-build/ubuntu-cpc/hooks/032-disk-image.binary index a6e5d9bb..7cde62f6 100755 --- a/live-build/ubuntu-cpc/hooks/032-disk-image.binary +++ b/live-build/ubuntu-cpc/hooks/032-disk-image.binary @@ -116,7 +116,7 @@ if [ "${should_install_grub}" -eq 1 ]; then rm mountpoint/tmp/device.map - if [ "$SUBPROJECT" = minimized ] && [ -n "$partuuid" ]; then + if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then echo "partuuid found for root device; forcing it in Grub" mkdir -p mountpoint/etc/default/grub.d echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid