From 047f883e92d5aa3195320e2ae89271b79f50793b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lallement Date: Tue, 20 Nov 2018 17:51:41 +0100 Subject: [PATCH] Various fixes Fixed prefix for passes to not conflict with global prefix Set layer to none for layer without language packs Copy size and manifest to the target directory Make sure the diff always diffes existing manifests --- live-build/auto/build | 13 +++++++------ live-build/auto/config | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index d6642cd9..fca3b0e9 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -47,7 +47,7 @@ build_layered_squashfs() { create_manifest "chroot" "${squashfs_f_manifest}.full" # Delta manifest - diff -NU0 ${PWD}/livecd.${PROJECT}.${prefix}${prevpass}.manifest.full ${squashfs_f_manifest}.full|grep -v ^@ > $squashfs_f_manifest + diff -U0 ${PWD}/livecd.${PROJECT}.[0-9]{2..2}-${prevpass}.manifest.full ${squashfs_f_manifest}.full|grep -v ^@ > $squashfs_f_manifest squashfs_f_size="${base}.size" du -B 1 -s "chroot.${pass}/" | cut -f1 > "${squashfs_f_size}" @@ -539,13 +539,13 @@ EOF if [ -n "${PASSES}" ]; then CURPASS=1 PREVPASS="" - PREFIX="" + PASSPREFIX="" LOWER_LAYERS="" for _PASS in $PASSES do - PREFIX="$(printf "%02g" $CURPASS)-" - build_layered_squashfs "${_PASS}" "${PREVPASS}" "$PREFIX" ${LOWER_LAYERS} + PASSPREFIX="$(printf "%02g" $CURPASS)-" + build_layered_squashfs "${_PASS}" "${PREVPASS}" "$PASSPREFIX" ${LOWER_LAYERS} LOWER_LAYERS="chroot.${_PASS}:$LOWER_LAYERS" LOWER_LAYERS="${LOWER_LAYERS%:}" @@ -553,8 +553,9 @@ EOF CURPASS=$(( CURPASS + 1 )) done - # Full ISO manifest - cp "${PWD}/livecd.${PROJECT}.${PREFIX}${_PASS}.manifest.full" livecd.${PROJECT}.manifest + # Full ISO manifest & size from last PASS + cp "${PWD}/livecd.${PROJECT}.${PASSPREFIX}${_PASS}.size" "binary/$INITFS/filesystem.size" + cp "${PWD}/livecd.${PROJECT}.${PASSPREFIX}${_PASS}.manifest.full" "binary/$INITFS/filesystem.manifest" fi touch binary.success diff --git a/live-build/auto/config b/live-build/auto/config index 1a74e87b..a75d4875 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -141,7 +141,7 @@ add_layered_pass_delta() { local seed_regexp="$3" if [ -z "${seed_regexp}" ]; then - substract_package_lists ${2} "" >> config/package-lists/livecd-rootfs.removal-list.chroot_${1}_no-{$2} + substract_package_lists ${2} "" >> config/package-lists/livecd-rootfs.removal-list.chroot_${1}_no-${2} return fi @@ -405,9 +405,9 @@ case $PROJECT in layered) # 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_layered_pass_delta install-minimal desktop-minimal-default-languages '' # none (if no default langpack is selected) 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) + add_layered_pass_delta install desktop-default-languages '' # none (if no default langpack is selected) ;; esac