From 38a5aed0dcdf71f43cecfadc6e34c659408b6a00 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Sun, 5 Apr 2020 17:29:31 +0100 Subject: chroot_prep: expand coverage it now covers: - `lb chroot_apt install-binary` - `lb chroot_archives {chroot|binary|source} {install|remove}` by expanding usage from: `lb chroot_prep {install|remove} HELPERS [ARGS]` to: `lb chroot_prep {install|remove} HELPERS [MODE[ MODE..]] [ARGS]` where `[MODE[ MODE..]]` is an optional set of one or more of: - archives-chroot, which specifies to use 'chroot' as the first param to the chroot_archives script - archives-binary, which specifies to use 'binary' - archives-source, which specifies to use 'source' - apt-install-binary, which specified to pass 'install-binary' instead of 'install' to chroot_apt thus _all_ chroot prep scripts can be run through this helper now! note, in the case of the binary stage, 'archives' is deliberately not added to CHROOT_PREP_OTHER, this is not a mistake! Gbp-Dch: Short --- scripts/build/binary | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'scripts/build/binary') diff --git a/scripts/build/binary b/scripts/build/binary index a641d2be0..a759a7899 100755 --- a/scripts/build/binary +++ b/scripts/build/binary @@ -33,14 +33,14 @@ lb binary_chroot "${@}" # Chroot preparation component lists # We deliberately exclude 'debianchroot' CHROOT_PREP_MOUNTS="devpts proc selinuxfs sysfs" -CHROOT_PREP_OTHER="dpkg tmpfs sysv-rc hosts resolv hostname" +CHROOT_PREP_OTHER="dpkg tmpfs sysv-rc hosts resolv hostname apt" -if [ "${LB_BUILD_WITH_CHROOT}" = "true" ] -then +if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]; then # Configuring chroot + # FIXME: cannot run in 'all' mode while excluding 'debianchroot', do we really need to exclude it? + #lb chroot_prep install all mode-apt-install-binary mode-archives-chroot "${@}" lb chroot_prep install "${CHROOT_PREP_MOUNTS}" "${@}" - lb chroot_prep install "${CHROOT_PREP_OTHER}" "${@}" - lb chroot_apt install-binary "${@}" + lb chroot_prep install "${CHROOT_PREP_OTHER}" mode-apt-install-binary mode-archives-chroot "${@}" lb chroot_archives chroot install "${@}" fi @@ -64,8 +64,7 @@ lb binary_grub-efi "${@}" lb binary_hooks "${@}" lb binary_checksums "${@}" -if [ "${LB_BUILD_WITH_CHROOT}" != "true" ] -then +if [ "${LB_BUILD_WITH_CHROOT}" != "true" ]; then lb chroot_prep install "${CHROOT_PREP_MOUNTS}" "${@}" fi @@ -78,12 +77,10 @@ lb binary_hdd "${@}" lb binary_zsync "${@}" -if [ "${LB_BUILD_WITH_CHROOT}" = "true" ] -then +if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]; then # Deconfiguring chroot Remove_stagefile chroot_archives - lb chroot_apt remove "${@}" lb chroot_prep remove "${CHROOT_PREP_OTHER}" "${@}" fi -- cgit v1.2.3