Patchwork [4/8] image.bbclass: add a proper error message if hook script fails

login
register
mail settings
Submitter Laurentiu Palcu
Date Feb. 5, 2013, 9:34 a.m.
Message ID <4aafa2f81939b6b38184a5413ff6323b1a777f52.1360055640.git.laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/44065/
State Accepted
Commit 5479aa4869a4888ff8409d6d73b1eff2074f5127
Headers show

Comments

Laurentiu Palcu - Feb. 5, 2013, 9:34 a.m.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 meta/classes/image.bbclass |    4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 9b4dec8..5cbf73a 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -10,6 +10,7 @@  inherit gzipnative
 
 LICENSE = "MIT"
 PACKAGES = ""
+DEPENDS += "qemuwrapper-cross"
 RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${NORMAL_FEATURE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL}"
 RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}"
 
@@ -197,6 +198,9 @@  run_intercept_scriptlets () {
 			echo "> Executing $script"
 			chmod +x $script
 			./$script
+			if [ $? -ne 0 ]; then
+				echo "ERROR: intercept script \"$script\" failed!"
+			fi
 		done
 	fi
 }