mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-23 16:51:32 +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::
|
lubuntu::
|
||||||
mythbuntu::
|
mythbuntu::
|
||||||
ubuntu::
|
ubuntu::
|
||||||
ubuntu:ubiquity-ng:
|
ubuntu:canary:
|
||||||
ubuntu-base::
|
ubuntu-base::
|
||||||
ubuntu-budgie::
|
ubuntu-budgie::
|
||||||
ubuntu-budgie-desktop::
|
ubuntu-budgie-desktop::
|
||||||
|
@ -269,7 +269,7 @@ _get_live_passes ()
|
|||||||
[ -z "$passes" ] && return
|
[ -z "$passes" ] && return
|
||||||
|
|
||||||
for pass in $passes; do
|
for pass in $passes; do
|
||||||
if echo $pass | grep -Eq '\.live*'; then
|
if echo $pass | grep -Eq '\.live$'; then
|
||||||
livepasses="$pass $livepasses"
|
livepasses="$pass $livepasses"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -96,7 +96,7 @@ build_layered_squashfs () {
|
|||||||
squashfs_f_size="${base}.size"
|
squashfs_f_size="${base}.size"
|
||||||
du -B 1 -s "overlay.${pass}/" | cut -f1 > "${squashfs_f_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
|
# Prepare initrd + kernel
|
||||||
# Main manifest and size files
|
# Main manifest and size files
|
||||||
prefix="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
|
prefix="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
|
||||||
@ -104,7 +104,18 @@ build_layered_squashfs () {
|
|||||||
for livepass in $LIVE_PASSES; do
|
for livepass in $LIVE_PASSES; do
|
||||||
[ "$livepass" != "$pass" ] && continue
|
[ "$livepass" != "$pass" ] && continue
|
||||||
lb binary_linux-image ${*}
|
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"
|
cp "${squashfs_f_manifest}.full" "${prefix}.manifest"
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
## under certain conditions; see COPYING for details.
|
## under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
## This is a fork of lb_chroot for layered live system.
|
## 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.
|
## we clean and setup the chroot each time.
|
||||||
## In addition, we create the squashfs for each layer, but top one (live)
|
## In addition, we create the squashfs for each layer, but top one (live)
|
||||||
## which still can be configured after lb chroot call.
|
## which still can be configured after lb chroot call.
|
||||||
@ -107,7 +107,7 @@ lb_chroot_includes () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
reduce_pass_size () {
|
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
|
# Note the empty directories created in a child pass are not removed
|
||||||
local pass=$1
|
local pass=$1
|
||||||
local parent="$(get_parent_pass $pass)"
|
local parent="$(get_parent_pass $pass)"
|
||||||
@ -188,7 +188,6 @@ create_chroot_pass () {
|
|||||||
lb chroot_apt install ${*}
|
lb chroot_apt install ${*}
|
||||||
# Note: this triggers an upgrade + dist-ugprade; which may impact sublayers with more
|
# Note: this triggers an upgrade + dist-ugprade; which may impact sublayers with more
|
||||||
# diff content than desired. So only running this on root pass.
|
# diff content than desired. So only running this on root pass.
|
||||||
# Also configure universe
|
|
||||||
# Only configure universe on root passes
|
# Only configure universe on root passes
|
||||||
if $(is_root_layer $pass); then
|
if $(is_root_layer $pass); then
|
||||||
lb chroot_archives chroot install ${*}
|
lb chroot_archives chroot install ${*}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user