mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-04-27 11:01:18 +00:00
live-build/auto/build: Create one manifest by layer in diff format and one full manifest with all the layers in standard format
This commit is contained in:
parent
ca63d43696
commit
d5a16296f4
@ -481,18 +481,28 @@ EOF
|
|||||||
|
|
||||||
# Create layered squashfs system
|
# Create layered squashfs system
|
||||||
CURPASS=1
|
CURPASS=1
|
||||||
|
LASTPASS=$(echo $PASSES|wc -w)
|
||||||
|
prev_manifest=""
|
||||||
if [ "${IMAGEFORMAT:-}" = live-layered ]; then
|
if [ "${IMAGEFORMAT:-}" = live-layered ]; then
|
||||||
for _PASS in $PASSES
|
for _PASS in $PASSES
|
||||||
do
|
do
|
||||||
squashfs_f="${PWD}/livecd.${PROJECT}.$(printf "%02g" $CURPASS)-${_PASS}.squashfs"
|
base="${PWD}/livecd.${PROJECT}.$(printf "%02g" $CURPASS)-${_PASS}"
|
||||||
|
squashfs_f="${base}.squashfs"
|
||||||
|
|
||||||
(cd "chroot.${_PASS}/" &&
|
(cd "chroot.${_PASS}/" &&
|
||||||
mksquashfs . ${squashfs_f} \
|
mksquashfs . ${squashfs_f} \
|
||||||
-no-progress -xattrs -comp xz )
|
-no-progress -xattrs -comp xz )
|
||||||
|
|
||||||
squashfs_f_manifest="${squashfs_f}.manifest"
|
squashfs_f_manifest="${base}.manifest"
|
||||||
create_manifest "chroot.${_PASS}/" "${squashfs_f_manifest}"
|
create_manifest "chroot.${_PASS}/" "${squashfs_f_manifest}.full"
|
||||||
squashfs_f_size="${squashfs_f}.size"
|
# We want manifest to only contain the diff of current pass
|
||||||
|
diff -NU0 ${prev_manifest}.full ${squashfs_f_manifest}.full|grep -v ^@ > $squashfs_f_manifest
|
||||||
|
prev_manifest=$squashfs_f_manifest
|
||||||
|
if [ $CURPASS -eq $LASTPASS ]; then
|
||||||
|
cp "${squashfs_f_manifest}.full" livecd.${PROJECT}.manifest
|
||||||
|
fi
|
||||||
|
|
||||||
|
squashfs_f_size="${base}.size"
|
||||||
du -B 1 -s "chroot.${_PASS}/" | cut -f1 > "${squashfs_f_size}"
|
du -B 1 -s "chroot.${_PASS}/" | cut -f1 > "${squashfs_f_size}"
|
||||||
|
|
||||||
CURPASS=$(( CURPASS + 1 ))
|
CURPASS=$(( CURPASS + 1 ))
|
||||||
|
@ -9,3 +9,4 @@ 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 *.manifest.full
|
||||||
|
Loading…
x
Reference in New Issue
Block a user