linux: stop if one linux patches doesn't apply
authorSébastien Szymanski <sebastien.szymanski@armadeus.com>
Mon, 16 Mar 2015 09:57:17 +0000 (10:57 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 16 Mar 2015 18:46:10 +0000 (19:46 +0100)
If you have several linux patches directories, Buildroot does not stop
if one patches of the first directories don't apply. This patch fixes
this.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
linux/linux.mk

index b1aca419da85eed3f138c7050b9ab97445659826..5a0ba01d42c6baf71ff13f151ba743746abcdd56 100644 (file)
@@ -162,11 +162,11 @@ LINUX_POST_DOWNLOAD_HOOKS += LINUX_DOWNLOAD_PATCHES
 define LINUX_APPLY_PATCHES
        for p in $(LINUX_PATCHES) ; do \
                if echo $$p | grep -q -E "^ftp://|^http://|^https://" ; then \
-                       $(APPLY_PATCHES) $(@D) $(DL_DIR) `basename $$p` ; \
+                       $(APPLY_PATCHES) $(@D) $(DL_DIR) `basename $$p` || exit 1; \
                elif test -d $$p ; then \
-                       $(APPLY_PATCHES) $(@D) $$p linux-\*.patch ; \
+                       $(APPLY_PATCHES) $(@D) $$p linux-\*.patch || exit 1; \
                else \
-                       $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` ; \
+                       $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \
                fi \
        done
 endef