mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-30 04:01:39 +00:00
Calculate total size of the image + typos
This commit is contained in:
parent
3db920c40c
commit
f84d92d76f
2
debian/tests/default-bootstraps
vendored
2
debian/tests/default-bootstraps
vendored
@ -23,7 +23,7 @@ ALL_TRIPLETS="
|
||||
lubuntu::
|
||||
mythbuntu::
|
||||
ubuntu::
|
||||
ubuntu:ubiquity-ng:
|
||||
ubuntu:canary:
|
||||
ubuntu-base::
|
||||
ubuntu-budgie::
|
||||
ubuntu-budgie-desktop::
|
||||
|
@ -269,7 +269,7 @@ _get_live_passes ()
|
||||
[ -z "$passes" ] && return
|
||||
|
||||
for pass in $passes; do
|
||||
if echo $pass | grep -Eq '\.live*'; then
|
||||
if echo $pass | grep -Eq '\.live$'; then
|
||||
livepasses="$pass $livepasses"
|
||||
fi
|
||||
done
|
||||
|
@ -96,7 +96,7 @@ build_layered_squashfs () {
|
||||
squashfs_f_size="${base}.size"
|
||||
du -B 1 -s "overlay.${pass}/" | cut -f1 > "${squashfs_f_size}"
|
||||
|
||||
# We take first live path for "global" ISO properties (used by installers and checkers):
|
||||
# We take first live pass for "global" ISO properties (used by installers and checkers):
|
||||
# Prepare initrd + kernel
|
||||
# Main manifest and size files
|
||||
prefix="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
|
||||
@ -104,7 +104,18 @@ build_layered_squashfs () {
|
||||
for livepass in $LIVE_PASSES; do
|
||||
[ "$livepass" != "$pass" ] && continue
|
||||
lb binary_linux-image ${*}
|
||||
cp ${squashfs_f_size} "${prefix}.size"
|
||||
|
||||
totalsize=$(cat ${squashfs_f_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
|
||||
|
@ -8,7 +8,7 @@
|
||||
## under certain conditions; see COPYING for details.
|
||||
|
||||
## This is a fork of lb_chroot for layered live system.
|
||||
## We don't want leaking host configuratino in each layer, and so,
|
||||
## We don't want leaking host configuration in each layer, and so,
|
||||
## we clean and setup the chroot each time.
|
||||
## In addition, we create the squashfs for each layer, but top one (live)
|
||||
## which still can be configured after lb chroot call.
|
||||
@ -107,7 +107,7 @@ lb_chroot_includes () {
|
||||
}
|
||||
|
||||
reduce_pass_size () {
|
||||
# Remove duplicated files between parent and currant pass
|
||||
# Remove duplicated files between parent and current pass
|
||||
# Note the empty directories created in a child pass are not removed
|
||||
local pass=$1
|
||||
local parent="$(get_parent_pass $pass)"
|
||||
@ -188,7 +188,6 @@ create_chroot_pass () {
|
||||
lb chroot_apt install ${*}
|
||||
# Note: this triggers an upgrade + dist-ugprade; which may impact sublayers with more
|
||||
# diff content than desired. So only running this on root pass.
|
||||
# Also configure universe
|
||||
# Only configure universe on root passes
|
||||
if $(is_root_layer $pass); then
|
||||
lb chroot_archives chroot install ${*}
|
||||
|
Loading…
x
Reference in New Issue
Block a user