diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-04-05 17:29:31 +0100 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2020-04-23 09:38:02 +0000 |
commit | 38a5aed0dcdf71f43cecfadc6e34c659408b6a00 (patch) | |
tree | 48793210c32b970f78cf4561d3ca23369344fe19 /scripts/build/binary | |
parent | 1f63c620f0abdf08188975d083d5f11bebfd2433 (diff) | |
download | vyos-live-build-38a5aed0dcdf71f43cecfadc6e34c659408b6a00.tar.gz vyos-live-build-38a5aed0dcdf71f43cecfadc6e34c659408b6a00.zip |
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
Diffstat (limited to 'scripts/build/binary')
-rwxr-xr-x | scripts/build/binary | 17 |
1 files changed, 7 insertions, 10 deletions
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 |