Rename chroot.$PASS -> overlay.$PASS

sil2100/core18-pi3-arm64
Jean-Baptiste Lallement 6 years ago
parent e0d30dd2d3
commit 2d2ce6eea4

@ -9,4 +9,5 @@ rm -f binary.manifest binary.manifest-desktop binary.log
rm -f livecd.* rm -f livecd.*
rm -rf userdata rm -rf userdata
rm -rf chroot.* rm -rf chroot.*
rm -rf overlay.*
rm -rf *.manifest.full rm -rf *.manifest.full

@ -57,11 +57,11 @@ build_layered_squashfs() {
fi fi
if [ -n "${lowerlayers}" ]; then if [ -n "${lowerlayers}" ]; then
mount_overlay ${lowerlayers} "chroot.${pass}/" chroot/ mount_overlay ${lowerlayers} "overlay.${pass}/" chroot/
else else
# first pass # first pass
rmdir chroot 2>/dev/null||true rmdir chroot 2>/dev/null||true
ln -s "chroot.${pass}/" chroot ln -s "overlay.${pass}/" chroot
fi fi
# Full manifest until that PASS # 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 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" 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} \ mksquashfs . ${squashfs_f} \
-no-progress -xattrs -comp xz ) -no-progress -xattrs -comp xz )
@ -87,8 +87,8 @@ build_layered_squashfs() {
# Handle direct sublayer of current one # Handle direct sublayer of current one
# Extract the name of the pass corresponding to the sublayer # 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 for subpass in $(ls -d overlay.${pass}_* 2>/dev/null | sed -e "s/overlay\.\(${pass}_[^_]\+\).*/\1/"); do
lowerlayers_for_subpass="chroot.${pass}:${lowerlayers}" lowerlayers_for_subpass="overlay.${pass}:${lowerlayers}"
lowerlayers_for_subpass="${lowerlayers_for_subpass%:}" lowerlayers_for_subpass="${lowerlayers_for_subpass%:}"
build_layered_squashfs "${subpass}" "${pass}" "${prefix}" "${lowerlayers_for_subpass}" ${*} build_layered_squashfs "${subpass}" "${pass}" "${prefix}" "${lowerlayers_for_subpass}" ${*}
done done
@ -104,14 +104,14 @@ do
build_layered_squashfs "${_PASS}" "${PREVPASS}" "$PASSPREFIX" "${LOWER_LAYERS}" ${*} build_layered_squashfs "${_PASS}" "${PREVPASS}" "$PASSPREFIX" "${LOWER_LAYERS}" ${*}
LOWER_LAYERS="chroot.${_PASS}:$LOWER_LAYERS" LOWER_LAYERS="overlay.${_PASS}:$LOWER_LAYERS"
LOWER_LAYERS="${LOWER_LAYERS%:}" LOWER_LAYERS="${LOWER_LAYERS%:}"
PREVPASS=${_PASS} PREVPASS=${_PASS}
CURPASS=$(( CURPASS + 1 )) CURPASS=$(( CURPASS + 1 ))
done done
# remount last "main" pass on chroot for lb binary # 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 # Prepare initrd + kernel
lb binary_linux-image ${*} lb binary_linux-image ${*}

@ -114,15 +114,15 @@ create_chroot_pass() {
shift 4 # restore ${*} shift 4 # restore ${*}
# We have already treated that pass # We have already treated that pass
if [ -d "chroot.${pass}/" ]; then if [ -d "overlay.${pass}/" ]; then
return return
fi fi
export PASS=${pass} export PASS=${pass}
if [ "${passtype}" != "first" ]; then if [ "${passtype}" != "first" ]; then
mkdir chroot.${pass} mkdir overlay.${pass}
mount_overlay ${lowerlayers} "chroot.${pass}/" chroot/ mount_overlay ${lowerlayers} "overlay.${pass}/" chroot/
fi fi
# Configuring chroot # Configuring chroot
@ -205,7 +205,7 @@ create_chroot_pass() {
lb chroot_cache save ${*} lb chroot_cache save ${*}
if [ "${passtype}" = "first" ]; then if [ "${passtype}" = "first" ]; then
mv chroot chroot.${pass} mv chroot overlay.${pass}
mkdir chroot mkdir chroot
else else
umount chroot umount chroot
@ -214,7 +214,7 @@ create_chroot_pass() {
# Handle direct sublayer of current one # Handle direct sublayer of current one
# Extract the name of the pass corresponding to the sublayer # 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 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%:}" lowerlayers_for_subpass="${lowerlayers_for_subpass%:}"
create_chroot_pass "${subpass}" "${pass}" "${lowerlayers_for_subpass}" "" ${*} create_chroot_pass "${subpass}" "${pass}" "${lowerlayers_for_subpass}" "" ${*}
done done
@ -236,7 +236,7 @@ do
create_chroot_pass "$_PASS" "$PREVPASS" "$LOWER_LAYERS" "$PASSTYPE" ${*} create_chroot_pass "$_PASS" "$PREVPASS" "$LOWER_LAYERS" "$PASSTYPE" ${*}
LOWER_LAYERS="chroot.${_PASS}:$LOWER_LAYERS" LOWER_LAYERS="overlay.${_PASS}:$LOWER_LAYERS"
LOWER_LAYERS="${LOWER_LAYERS%:}" LOWER_LAYERS="${LOWER_LAYERS%:}"
PREVPASS=${_PASS} PREVPASS=${_PASS}

Loading…
Cancel
Save