aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmeta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts12
-rw-r--r--meta-app-framework/classes/aglwgt.bbclass6
2 files changed, 15 insertions, 3 deletions
diff --git a/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts b/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts
index 7c2effa70..87ec0e13b 100755
--- a/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts
+++ b/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts
@@ -23,10 +23,16 @@ exec_postinst_scriptlets() {
[ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log
if [ -x $i ]; then
eval sh -c $i $append_log
- rm $i
+ if [ $? -eq 0 ]; then
+ rm $i
+ else
+ echo "ERROR: postinst $i failed."
+ [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i failed." $append_log
+ remove_agl_pi_dir=0
+ fi
else
- echo "ERROR: postinst $i failed."
- [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i failed." $append_log
+ echo "ERROR: postinst $i do not exists or do not have execute permission."
+ [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i do not exists or do not have execute permission." $append_log
remove_agl_pi_dir=0
fi
done
diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass
index afe9a5516..37638e666 100644
--- a/meta-app-framework/classes/aglwgt.bbclass
+++ b/meta-app-framework/classes/aglwgt.bbclass
@@ -46,11 +46,17 @@ do_aglwgt_deploy() {
install -d ${D}/${sysconfdir}/agl-postinsts
cat > ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} <<EOF
#!/bin/sh -e
+INSTALL_RESULT=0
for file in ${APP_FILES}; do
/usr/bin/afm-install install /usr/AGL/apps/\$file
+ if [ $? -ne 0 ]; then
+ echo "Application \$file failed to install"
+ INSTALL_RESULT=1
+ fi
done
sync
${EXTRA_WGT_POSTINSTALL}
+exit $INSTALL_RESULT
EOF
chmod a+x ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT}
}