mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-05 07:41:31 +00:00
Remove inidrd and vmlinuz from live layers after they've been moved to casper
This commit is contained in:
parent
f5d3233c64
commit
3dce125d72
@ -767,3 +767,12 @@ is_root_layer () {
|
|||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_live_layer () {
|
||||||
|
local pass=$1
|
||||||
|
for livepass in $LIVE_PASSES; do
|
||||||
|
[ "$livepass" != "$pass" ] && continue
|
||||||
|
return 0
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
@ -86,6 +86,12 @@ build_layered_squashfs () {
|
|||||||
lb_binary_includes $pass ${*}
|
lb_binary_includes $pass ${*}
|
||||||
lb binary_hooks ${*}
|
lb binary_hooks ${*}
|
||||||
|
|
||||||
|
# Copy initrd and vmlinuz outside of chroot and remove them from the layer squashfs
|
||||||
|
if $(is_live_layer "$pass"); then
|
||||||
|
lb binary_linux-image ${*}
|
||||||
|
rm -f chroot/boot/initrd.img-* chroot/boot/vmlinu{x,z}-*
|
||||||
|
fi
|
||||||
|
|
||||||
# Full manifest until that PASS
|
# Full manifest until that PASS
|
||||||
squashfs_f_manifest="${base}.manifest"
|
squashfs_f_manifest="${base}.manifest"
|
||||||
create_manifest "chroot" "${squashfs_f_manifest}.full"
|
create_manifest "chroot" "${squashfs_f_manifest}.full"
|
||||||
@ -100,25 +106,19 @@ build_layered_squashfs () {
|
|||||||
# Prepare initrd + kernel
|
# Prepare initrd + kernel
|
||||||
# Main manifest and size files
|
# Main manifest and size files
|
||||||
prefix="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
|
prefix="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
|
||||||
if [ ! -e "${prefix}.manifest" ]; then
|
if [ ! -e "${prefix}.manifest" ] && $(is_live_layer "$pass"); then
|
||||||
for livepass in $LIVE_PASSES; do
|
totalsize=$(cat ${squashfs_f_size})
|
||||||
[ "$livepass" != "$pass" ] && continue
|
curpass="$pass"
|
||||||
lb binary_linux-image ${*}
|
while :; do
|
||||||
|
curpass=$(get_parent_pass $curpass)
|
||||||
|
# We climbed up the tree to the root layer, we are done
|
||||||
|
[ -z "$curpass" ] && break
|
||||||
|
|
||||||
totalsize=$(cat ${squashfs_f_size})
|
totalsize=$(expr $totalsize + $(cat "${PWD}/livecd.${PROJECT}.${curpass}.size"))
|
||||||
curpass="$pass"
|
|
||||||
while :; do
|
|
||||||
curpass=$(get_parent_pass $curpass)
|
|
||||||
# We climbed up the tree to the root layer, we are done
|
|
||||||
[ -z "$curpass" ] && break
|
|
||||||
|
|
||||||
totalsize=$(expr $totalsize + $(cat "${PWD}/livecd.${PROJECT}.${curpass}.size"))
|
|
||||||
done
|
|
||||||
echo ${totalsize} > "${prefix}.size"
|
|
||||||
|
|
||||||
cp "${squashfs_f_manifest}.full" "${prefix}.manifest"
|
|
||||||
break
|
|
||||||
done
|
done
|
||||||
|
echo ${totalsize} > "${prefix}.size"
|
||||||
|
|
||||||
|
cp "${squashfs_f_manifest}.full" "${prefix}.manifest"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
(cd "overlay.${pass}/" &&
|
(cd "overlay.${pass}/" &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user