diff options
author | Scott Murray <scott.murray@konsulko.com> | 2020-10-01 15:54:53 -0400 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2020-10-02 16:30:55 +0000 |
commit | e1da0efcd2eece82b0326798cfeaeb8dd48797fc (patch) | |
tree | a5f04b720605ee7beae13743a284b97e3e6a410e /meta-app-framework/classes/aglwgt.bbclass | |
parent | 686fccb4cef17067f300e9de9cda81988a392bfa (diff) |
meta-app-framework: Handle html5 apps not having debug widgets
The previous aglwgt.bbclass change to make build/package errors fatal
now trips up on the HTML5 applications, as they do not produce a debug
widget, and the logic changes assumed that all widget builds would
have one. To handle this, if there is no debug widget present when
doing do_install, check the config.xml file in the release widget and
do not throw an error if the widget type is "text/html".
Bug-AGL: SPEC-3593
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: If58c3065464d2d2ea3d78b8ce31304d00fae6504
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/25368
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-app-framework/classes/aglwgt.bbclass')
-rw-r--r-- | meta-app-framework/classes/aglwgt.bbclass | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass index bdd38f6f1..00d3f9744 100644 --- a/meta-app-framework/classes/aglwgt.bbclass +++ b/meta-app-framework/classes/aglwgt.bbclass @@ -114,19 +114,30 @@ aglwgt_do_install() { DEST=manualinstall fi - if [ "$(find ${B}/build-release -name '*.wgt' -maxdepth 1)" ]; then + wgt="$(find ${B}/build-release -maxdepth 1 -name '*.wgt'| head -n 1)" + if [ -n "$wgt" ]; then install -d ${D}/usr/AGL/apps/$DEST - install -m 0644 ${B}/build-release/*.wgt ${D}/usr/AGL/apps/$DEST/ + install -m 0644 $wgt ${D}/usr/AGL/apps/$DEST/ else bbfatal "no package found in widget directory" fi for t in debug coverage test; do - if [ "$(find ${B}/build-${t} -name *-${t}.wgt -maxdepth 1)" ]; then + if [ "$(find ${B}/build-${t} -maxdepth 1 -name *-${t}.wgt)" ]; then install -d ${D}/usr/AGL/apps/${t} install -m 0644 ${B}/build-${t}/*-${t}.wgt ${D}/usr/AGL/apps/${t}/ elif [ "$t" = "debug" ]; then - bbfatal "no package found in ${t} widget directory" + # HTML5 widgets complicate things here, need to detect them and + # not error out in that case. ATM this requires looking in the + # config.xml of the release widget. + rm -rf ${B}/tmp + unzip $wgt config.xml -d ${B}/tmp + if [ -f ${B}/tmp/config.xml -a \ + ! cat ${B}/tmp/config.xml | \ + grep -q '^[[:space:]]*<content[[:space:]]\+src="[^\"]*"[[:space:]]\+type="text/html"' ]; then + bbfatal "no package found in ${t} widget directory" + fi + rm -rf ${B}/tmp elif echo ${BPN} | grep -q '^agl-service-' || [ "${AGLWGT_HAVE_TESTS}" = "1" ]; then if [ "$t" = "coverage" -o -f ${S}/test/CMakeLists.txt ]; then bbfatal "no package found in ${t} widget directory" |