diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2017-08-28 11:29:54 +0200 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2017-09-01 10:22:09 +0200 |
commit | 036b6161f250c0a798c987f0a6cf2ed9b987bd93 (patch) | |
tree | 80ec78b8bc025b1e9cf86c7d4317de915435ce42 /scripts/build/chroot_package-lists | |
parent | 5ca1ded228e6ed7c069a95842d1dff96f22248b7 (diff) | |
download | vyos-live-build-036b6161f250c0a798c987f0a6cf2ed9b987bd93.tar.gz vyos-live-build-036b6161f250c0a798c987f0a6cf2ed9b987bd93.zip |
Check all dependencies independent of LB_BUILD_WITH_CHROOT
Since commit fdc9250bc (Changing package dependency checks within chroot
to work outside as well), Check_package automatically checks for
LB_BUILD_WITH_CHROOT and works inside as well as outside of the chroot,
so no need to check LB_BUILD_WITH_CHROOT before calling them.
Install_package and Remove_package are just a no-op when building
without chroot, so they can also be called unconditionally.
Restore_cache and Save_cache do not check LB_BUILD_WITH_CHROOT but it
it should not hurt to call them when not needed (which already happened
in some cases).
This commit makes all Check_package calls unconditional on
LB_BUILD_WITH_CHROOT.
For binary_syslinux, this fixes the check (which used outdated paths
outside the chroot since 7b6dfd9d1), for binary_grub-efi,
binary_package-lists and chroot_package-lists this simplifies the code
(but also causes the check to become package-based instead of file-based
on apt-based systems), and for binary_loadlin and binary_win32-loader
this adds the check outside the chroot which was previously missing.
Diffstat (limited to 'scripts/build/chroot_package-lists')
-rwxr-xr-x | scripts/build/chroot_package-lists | 45 |
1 files changed, 12 insertions, 33 deletions
diff --git a/scripts/build/chroot_package-lists b/scripts/build/chroot_package-lists index d64fe49e0..26a24061d 100755 --- a/scripts/build/chroot_package-lists +++ b/scripts/build/chroot_package-lists @@ -49,26 +49,14 @@ then exit 0 fi -case "${LB_BUILD_WITH_CHROOT}" in - true) - # Checking depends - Check_package chroot /usr/bin/grep-aptavail dctrl-tools - - # Restoring cache - Restore_cache cache/packages.chroot - - # Installing depends - Install_package - ;; - - false) - if [ ! -e /usr/bin/grep-aptavail ]; then - # dctrl-tools - Echo_error "/usr/bin/grep-aptavail - no such file." - exit 1 - fi - ;; -esac +# Checking depends +Check_package chroot /usr/bin/grep-aptavail dctrl-tools + +# Restoring cache +Restore_cache cache/packages.chroot + +# Installing depends +Install_package if [ -e "${LIVE_BUILD}/share/bin/Packages" ] then @@ -102,19 +90,10 @@ done rm -f chroot/bin/Packages -case "${LB_BUILD_WITH_CHROOT}" in - true) - # Removing dctrl-tools again if the user has not installed it - if ! grep -qs dctrl-tools chroot/root/packages.chroot - then - # Removing depends - Remove_package - fi - - # Saving cache - Save_cache cache/packages.chroot - ;; -esac +Remove_package + +# Saving cache +Save_cache cache/packages.chroot # Creating stage file Create_stagefile .build/chroot_package-lists.${_PASS} |