From 42d1d7761206c12ab78acd2f33114f42bfddb9c8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lallement Date: Tue, 20 Nov 2018 13:09:05 +0100 Subject: [PATCH] Layered Ubuntu desktop by default Default Ubuntu desktop to the layered format Remove the requirement on setting IMAGEFORMAT to layered to build a layered image and relies on PASSED instead. --- live-build/auto/build | 4 ++-- live-build/auto/config | 33 +++++++++++++-------------------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index 07025195..d6642cd9 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -305,7 +305,7 @@ rm -f /usr/sbin/update-initramfs dpkg-divert --quiet --remove --rename /usr/sbin/update-initramfs EOF - if [ "${IMAGEFORMAT:-}" = live-layered ]; then + if [ -n "${PASSES}" ]; then PATH="config/:$PATH" lb chroot_layered "$@" else lb chroot "$@" @@ -536,7 +536,7 @@ EOF fi # Create layered squashfs system - if [ "${IMAGEFORMAT:-}" = live-layered ]; then + if [ -n "${PASSES}" ]; then CURPASS=1 PREVPASS="" PREFIX="" diff --git a/live-build/auto/config b/live-build/auto/config index 0b413631..df64f296 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -70,9 +70,6 @@ add_binary_hook () } if [ -z "${IMAGEFORMAT:-}" ]; then - if [ ${SUBPROJECT:-} = layered ]; then - IMAGEFORMAT=live-layered - fi case $PROJECT:${SUBPROJECT:-} in ubuntu-cpc:*) if [ "$SUBARCH" = "raspi3" ]; then @@ -193,12 +190,6 @@ case $IMAGEFORMAT in exit 0 ;; - live-layered) - # Stop lb creating filesystem.squashfs by skipping lb_binary_rootfs and lb_binary_manifest - skip_lb_stage binary_rootfs - skip_lb_stage binary_manifest - ;; - none) OPTS="${OPTS:+$OPTS }--chroot-filesystem $IMAGEFORMAT" ;; @@ -213,6 +204,12 @@ case $IMAGEFORMAT in ;; esac +if [ -n "${PASSES}" ]; then + # Stop lb creating filesystem.squashfs by skipping lb_binary_rootfs and lb_binary_manifest + skip_lb_stage binary_rootfs + skip_lb_stage binary_manifest +fi + if [ "$PREINSTALLED" = "true" ]; then # Touch a random file that we can refer back to during build, # cause that's wildly hackish @@ -307,22 +304,18 @@ esac case $PROJECT in ubuntu|ubuntu-dvd) + PASSES="install-minimal install live" + add_task install-minimal minimal standard ubuntu-desktop-minimal ubuntu-desktop-minimal-default-languages + add_task install ubuntu-desktop ubuntu-desktop-default-languages + LIVE_TASK='ubuntu-live' + case ${SUBPROJECT:-} in layered) - PASSES="install-minimal install live" - add_task install-minimal minimal standard ubuntu-desktop-minimal - # LANG PASS for minimal + # LANG PASS for minimal and install add_layered_pass_delta install-minimal desktop-minimal-default-languages '^desktop-minimal-(?!default-languages)[^.]+$' add_layered_pass_delta install-minimal desktop-minimal-default-languages 'nolangpacks' # none (if no default langpack is selected) - add_task install ubuntu-desktop - # LANG PASS for install add_layered_pass_delta install desktop-default-languages '^desktop-(?!default-languages|minimal|common)[^.]+$' add_layered_pass_delta install desktop-default-languages 'nolangpacks' # none (if no default langpack is selected) - LIVE_TASK='ubuntu-live' - ;; - *) - add_task install minimal standard ubuntu-desktop - LIVE_TASK='ubuntu-live' ;; esac @@ -689,7 +682,7 @@ case $SUBPROJECT in ;; esac -if [ "${IMAGEFORMAT:-}" != live-layered ]; then +if [ -z "${PASSES}" ]; then # we'll expand the base seed given here according to the STRUCTURE file, and # then look in all of the seeds found to see which snaps are seeded case $PROJECT:${SUBPROJECT:-} in