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:23 +0000 |
commit | 3298d5831881d0a3461728a2ce0301830c5a8908 (patch) | |
tree | e1c75f42d527d5e460361f6c45b6e24329c1ef5f /meta-app-framework | |
parent | aff25a81d692e995fd57d75c73c2aadf5cea75dd (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/+/25377
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')
-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" |