From 36086fdd5724f1f73ae6b080f38eeb0d919ae406 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Mon, 19 Apr 2021 15:37:58 +0200 Subject: [PATCH] libpbuild: handle error if appling a patch fails in pbuild::prep() --- Pmodules/libpbuild.bash | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Pmodules/libpbuild.bash b/Pmodules/libpbuild.bash index 0ae9142..07fee3c 100644 --- a/Pmodules/libpbuild.bash +++ b/Pmodules/libpbuild.bash @@ -447,7 +447,11 @@ pbuild::prep() { "${module_name}/${module_version}:" \ "Appling patch '${PATCH_FILES[_i]}' ..." local -i strip_val="${PATCH_STRIPS[_i]:-${PATCH_STRIP_DEFAULT}}" - patch -p${strip_val} < "${BUILDBLOCK_DIR}/${PATCH_FILES[_i]}" + patch -p${strip_val} < "${BUILDBLOCK_DIR}/${PATCH_FILES[_i]}" || \ + std::die 4 \ + "%s " \ + "${module_name}/${module_version}:" \ + "error patching sources!" done } if [[ -z "${SOURCE_URLS}" ]]; then