From 2d2ce6eea41fe43c3be09fdcd2ab775c36456867 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lallement Date: Thu, 17 Jan 2019 16:40:11 +0100 Subject: [PATCH] Rename chroot.$PASS -> overlay.$PASS --- live-build/auto/clean | 1 + live-build/lb_binary_layered | 16 ++++++++-------- live-build/lb_chroot_layered | 12 ++++++------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/live-build/auto/clean b/live-build/auto/clean index 82a7cce4..ab4ea402 100755 --- a/live-build/auto/clean +++ b/live-build/auto/clean @@ -9,4 +9,5 @@ rm -f binary.manifest binary.manifest-desktop binary.log rm -f livecd.* rm -rf userdata rm -rf chroot.* +rm -rf overlay.* rm -rf *.manifest.full diff --git a/live-build/lb_binary_layered b/live-build/lb_binary_layered index e6b762ab..b100339a 100755 --- a/live-build/lb_binary_layered +++ b/live-build/lb_binary_layered @@ -57,11 +57,11 @@ build_layered_squashfs() { fi if [ -n "${lowerlayers}" ]; then - mount_overlay ${lowerlayers} "chroot.${pass}/" chroot/ + mount_overlay ${lowerlayers} "overlay.${pass}/" chroot/ else # first pass rmdir chroot 2>/dev/null||true - ln -s "chroot.${pass}/" chroot + ln -s "overlay.${pass}/" chroot fi # Full manifest until that PASS @@ -72,9 +72,9 @@ build_layered_squashfs() { diff -NU0 ${PWD}/livecd.${PROJECT}.[0-9][0-9]-${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}" + du -B 1 -s "overlay.${pass}/" | cut -f1 > "${squashfs_f_size}" - (cd "chroot.${pass}/" && + (cd "overlay.${pass}/" && mksquashfs . ${squashfs_f} \ -no-progress -xattrs -comp xz ) @@ -87,8 +87,8 @@ build_layered_squashfs() { # Handle direct sublayer of current one # Extract the name of the pass corresponding to the sublayer - for subpass in $(ls -d chroot.${pass}_* 2>/dev/null | sed -e "s/chroot\.\(${pass}_[^_]\+\).*/\1/"); do - lowerlayers_for_subpass="chroot.${pass}:${lowerlayers}" + for subpass in $(ls -d overlay.${pass}_* 2>/dev/null | sed -e "s/overlay\.\(${pass}_[^_]\+\).*/\1/"); do + lowerlayers_for_subpass="overlay.${pass}:${lowerlayers}" lowerlayers_for_subpass="${lowerlayers_for_subpass%:}" build_layered_squashfs "${subpass}" "${pass}" "${prefix}" "${lowerlayers_for_subpass}" ${*} done @@ -104,14 +104,14 @@ do build_layered_squashfs "${_PASS}" "${PREVPASS}" "$PASSPREFIX" "${LOWER_LAYERS}" ${*} - LOWER_LAYERS="chroot.${_PASS}:$LOWER_LAYERS" + LOWER_LAYERS="overlay.${_PASS}:$LOWER_LAYERS" LOWER_LAYERS="${LOWER_LAYERS%:}" PREVPASS=${_PASS} CURPASS=$(( CURPASS + 1 )) done # remount last "main" pass on chroot for lb binary -mount_overlay "${LOWER_LAYERS}" "chroot.${_PASS}/" chroot/ +mount_overlay "${LOWER_LAYERS}" "overlay.${_PASS}/" chroot/ # Prepare initrd + kernel lb binary_linux-image ${*} diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index 722fa619..89b84724 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -114,15 +114,15 @@ create_chroot_pass() { shift 4 # restore ${*} # We have already treated that pass - if [ -d "chroot.${pass}/" ]; then + if [ -d "overlay.${pass}/" ]; then return fi export PASS=${pass} if [ "${passtype}" != "first" ]; then - mkdir chroot.${pass} - mount_overlay ${lowerlayers} "chroot.${pass}/" chroot/ + mkdir overlay.${pass} + mount_overlay ${lowerlayers} "overlay.${pass}/" chroot/ fi # Configuring chroot @@ -205,7 +205,7 @@ create_chroot_pass() { lb chroot_cache save ${*} if [ "${passtype}" = "first" ]; then - mv chroot chroot.${pass} + mv chroot overlay.${pass} mkdir chroot else umount chroot @@ -214,7 +214,7 @@ create_chroot_pass() { # Handle direct sublayer of current one # Extract the name of the pass corresponding to the sublayer for subpass in $(ls config/package-lists/*list.chroot_${pass}_* 2>/dev/null | sed -e "s/.*list\.chroot_\(${pass}_[^_]\+\).*/\1/"); do - lowerlayers_for_subpass="chroot.${pass}:${lowerlayers}" + lowerlayers_for_subpass="overlay.${pass}:${lowerlayers}" lowerlayers_for_subpass="${lowerlayers_for_subpass%:}" create_chroot_pass "${subpass}" "${pass}" "${lowerlayers_for_subpass}" "" ${*} done @@ -236,7 +236,7 @@ do create_chroot_pass "$_PASS" "$PREVPASS" "$LOWER_LAYERS" "$PASSTYPE" ${*} - LOWER_LAYERS="chroot.${_PASS}:$LOWER_LAYERS" + LOWER_LAYERS="overlay.${_PASS}:$LOWER_LAYERS" LOWER_LAYERS="${LOWER_LAYERS%:}" PREVPASS=${_PASS}