From 5995d9a10dc3b66b4ea458da056dbda0cec9b506 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Mon, 20 Nov 2017 13:53:35 +0000 Subject: [PATCH] kernel: Fix Dockerfile.kbuild Patches were not applied and this fixes it as well as tidying up the error handling. Signed-off-by: Rolf Neugebauer --- kernel/Dockerfile.kconfig | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel/Dockerfile.kconfig b/kernel/Dockerfile.kconfig index fbd9e282c..182bbe092 100644 --- a/kernel/Dockerfile.kconfig +++ b/kernel/Dockerfile.kconfig @@ -13,7 +13,8 @@ ARG KERNEL_VERSIONS COPY / / # Unpack kernels (download if not present) -RUN set -e && for VERSION in ${KERNEL_VERSIONS}; do \ +RUN set -e && \ + for VERSION in ${KERNEL_VERSIONS}; do \ echo "Downloading/Unpacking $VERSION" && \ KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${VERSION}.tar.xz && \ [ -f sources/linux-${VERSION}.tar.xz ] || curl -fSLo sources/linux-${VERSION}.tar.xz ${KERNEL_SOURCE} && \ @@ -21,12 +22,12 @@ RUN set -e && for VERSION in ${KERNEL_VERSIONS}; do \ done # Apply patches to all kernels and move config files into place -RUN for VERSION in ${KERNEL_VERSIONS}; do \ +RUN set -e && \ + for VERSION in ${KERNEL_VERSIONS}; do \ SERIES=${VERSION%.*}.x && \ - echo "Patching $VERSION" && \ + echo "Patching $VERSION $SERIES" && \ cd /linux-${VERSION} && \ - set -e && \ - if [ -d /patches-${KERNEL_SERIES} ]; then \ + if [ -d /patches-${SERIES} ]; then \ for patch in /patches-${SERIES}/*.patch; do \ echo "Applying $patch" && \ patch -p1 < "$patch"; \