From 036b6161f250c0a798c987f0a6cf2ed9b987bd93 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 28 Aug 2017 11:29:54 +0200 Subject: 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. --- scripts/build/binary_loadlin | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'scripts/build/binary_loadlin') diff --git a/scripts/build/binary_loadlin b/scripts/build/binary_loadlin index 69f740beb..d74a47021 100755 --- a/scripts/build/binary_loadlin +++ b/scripts/build/binary_loadlin @@ -43,19 +43,20 @@ Check_lockfile .lock # Creating lock file Create_lockfile .lock + case "${LB_ARCHITECTURES}" in amd64|i386) - case "${LB_BUILD_WITH_CHROOT}" in - true) - # Checking depends - Check_package chroot /usr/lib/loadlin/loadlin.exe.gz loadlin + # Checking depends + Check_package chroot /usr/lib/loadlin/loadlin.exe.gz loadlin - # Restoring cache - Restore_cache cache/packages.binary + # Restoring cache + Restore_cache cache/packages.binary - # Installing depends - Install_package + # Installing depends + Install_package + case "${LB_BUILD_WITH_CHROOT}" in + true) _PREFIX="chroot" ;; @@ -69,15 +70,11 @@ case "${LB_ARCHITECTURES}" in gunzip -c "${_PREFIX}/usr/lib/loadlin/loadlin.exe.gz" > binary/tools/loadlin.exe gunzip -c "${_PREFIX}/usr/share/doc/loadlin/manual.txt.gz" > binary/tools/loadlin.txt - case "${LB_BUILD_WITH_CHROOT}" in - true) - # Saving cache - Save_cache cache/packages.binary + # Saving cache + Save_cache cache/packages.binary - # Removing depends - Remove_package - ;; - esac + # Removing depends + Remove_package cat > binary/install/install.bat << EOF \tools\loadlin.exe vmlinuz initrd=initrd.gz -- cgit v1.2.3