Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kbuild: Abort make on install failures

Setting '-e' flag tells shells to exit with error exit code immediately
after any of commands fails, and causes make(1) to regard recipes as
failed.

Before this, make will still continue to succeed even after the
installation failed, for example, for insufficient permission or
directory does not exist.

Signed-off-by: Zhang Bingwu <xtexchooser@duck.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Zhang Bingwu and committed by
Masahiro Yamada
af7925d8 3c2f84ce

+18
+2
arch/arm/boot/install.sh
··· 17 17 # $3 - kernel map file 18 18 # $4 - default install path (blank if root directory) 19 19 20 + set -e 21 + 20 22 if [ "$(basename $2)" = "zImage" ]; then 21 23 # Compressed install 22 24 echo "Installing compressed kernel"
+2
arch/arm64/boot/install.sh
··· 17 17 # $3 - kernel map file 18 18 # $4 - default install path (blank if root directory) 19 19 20 + set -e 21 + 20 22 if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ] 21 23 then 22 24 # Compressed install
+2
arch/m68k/install.sh
··· 16 16 # $3 - kernel map file 17 17 # $4 - default install path (blank if root directory) 18 18 19 + set -e 20 + 19 21 if [ -f $4/vmlinuz ]; then 20 22 mv $4/vmlinuz $4/vmlinuz.old 21 23 fi
+2
arch/nios2/boot/install.sh
··· 16 16 # $3 - kernel map file 17 17 # $4 - default install path (blank if root directory) 18 18 19 + set -e 20 + 19 21 if [ -f $4/vmlinuz ]; then 20 22 mv $4/vmlinuz $4/vmlinuz.old 21 23 fi
+2
arch/parisc/install.sh
··· 16 16 # $3 - kernel map file 17 17 # $4 - default install path (blank if root directory) 18 18 19 + set -e 20 + 19 21 if [ "$(basename $2)" = "vmlinuz" ]; then 20 22 # Compressed install 21 23 echo "Installing compressed kernel"
+2
arch/riscv/boot/install.sh
··· 17 17 # $3 - kernel map file 18 18 # $4 - default install path (blank if root directory) 19 19 20 + set -e 21 + 20 22 case "${2##*/}" in 21 23 # Compressed install 22 24 Image.*|vmlinuz.efi)
+2
arch/s390/boot/install.sh
··· 15 15 # $3 - kernel map file 16 16 # $4 - default install path (blank if root directory) 17 17 18 + set -e 19 + 18 20 echo "Warning: '${INSTALLKERNEL}' command not available - additional " \ 19 21 "bootloader config required" >&2 20 22 if [ -f "$4/vmlinuz-$1" ]; then mv -- "$4/vmlinuz-$1" "$4/vmlinuz-$1.old"; fi
+2
arch/sparc/boot/install.sh
··· 16 16 # $3 - kernel map file 17 17 # $4 - default install path (blank if root directory) 18 18 19 + set -e 20 + 19 21 if [ -f $4/vmlinuz ]; then 20 22 mv $4/vmlinuz $4/vmlinuz.old 21 23 fi
+2
arch/x86/boot/install.sh
··· 16 16 # $3 - kernel map file 17 17 # $4 - default install path (blank if root directory) 18 18 19 + set -e 20 + 19 21 if [ -f $4/vmlinuz ]; then 20 22 mv $4/vmlinuz $4/vmlinuz.old 21 23 fi