debootstrap: Optionally use 'eatmydata'
If 'eatmydata' is found, use it. On a CI system calling 'sync' influences the other processes that are running on the shared host. 'debootstrap' calls 'sync' in its second stage. For live-build, the synchronisation is not required.
This commit is contained in:
parent
ddf289332c
commit
d5bd2259be
|
@ -35,6 +35,7 @@ Recommends:
|
||||||
xz-utils,
|
xz-utils,
|
||||||
Suggests:
|
Suggests:
|
||||||
e2fsprogs,
|
e2fsprogs,
|
||||||
|
eatmydata,
|
||||||
git,
|
git,
|
||||||
parted,
|
parted,
|
||||||
mtd-utils,
|
mtd-utils,
|
||||||
|
|
|
@ -30,6 +30,15 @@ fi
|
||||||
Echo_message "Begin bootstrapping system..."
|
Echo_message "Begin bootstrapping system..."
|
||||||
|
|
||||||
Check_package host /usr/sbin/debootstrap debootstrap
|
Check_package host /usr/sbin/debootstrap debootstrap
|
||||||
|
Check_installed host /usr/bin/eatmydata eatmydata
|
||||||
|
if [ "${INSTALL_STATUS}" -eq 0 ]
|
||||||
|
then
|
||||||
|
Echo_message "eatmydata found. It will be used do disable the sync command in the second stage of debootstrap"
|
||||||
|
_EATMYDATA="eatmydata"
|
||||||
|
else
|
||||||
|
# eatmydata is optional
|
||||||
|
_EATMYDATA=""
|
||||||
|
fi
|
||||||
|
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
Check_stagefile "bootstrap"
|
Check_stagefile "bootstrap"
|
||||||
|
@ -110,7 +119,7 @@ if [ -n "${LB_BOOTSTRAP_QEMU_ARCHITECTURE}" ]; then
|
||||||
Echo_message "Running debootstrap second stage under QEMU"
|
Echo_message "Running debootstrap second stage under QEMU"
|
||||||
Chroot chroot /bin/sh /debootstrap/debootstrap --second-stage ${FOREIGN_DEBOOTSTRAP_OPTIONS}
|
Chroot chroot /bin/sh /debootstrap/debootstrap --second-stage ${FOREIGN_DEBOOTSTRAP_OPTIONS}
|
||||||
else
|
else
|
||||||
debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
|
${_EATMYDATA} debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If there's an os-release file, copy it to /etc/ and add some extra fields that identify the live image
|
# If there's an os-release file, copy it to /etc/ and add some extra fields that identify the live image
|
||||||
|
|
Loading…
Reference in New Issue