agl-service-windowmanager: add weston-ready systemd dependency 69/19669/2
authorScott Murray <scott.murray@konsulko.com>
Fri, 18 Jan 2019 00:14:37 +0000 (19:14 -0500)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 22 Jan 2019 20:06:20 +0000 (20:06 +0000)
Add installation of systemd over-ride configuration that adds a
dependency on weston-ready to ensure that the windowmanager and
its dependencies start after weston is actually initialized.
In testing, this seems to resolve the issue of homescreen and
launcher failing to start in situations such as when using MOST
audio and/or the gst-record feature in Weston.

Bug-AGL: SPEC-2115

Change-Id: Id15045357f30d3f447037026d0ab960ae2569d69
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
meta-hmi-framework/recipes-graphics/agl-service-windowmanager/agl-service-windowmanager_git.bb
meta-hmi-framework/recipes-graphics/agl-service-windowmanager/files/weston-ready.conf [new file with mode: 0644]

index 2414393..72a843b 100644 (file)
@@ -14,10 +14,24 @@ DEPENDS = "af-binder json-c wayland wayland-ivi-extension wayland-native"
 
 inherit cmake aglwgt
 
-SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-windowmanager;protocol=https;branch=${AGL_BRANCH}"
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-windowmanager;protocol=https;branch=${AGL_BRANCH} \
+           file://weston-ready.conf \
+"
 SRCREV = "24794d197e6d27fbfba9790be1da190fe573a058"
 PV = "1.0+git${SRCPV}"
 S = "${WORKDIR}/git"
 
 #If you would like to output log, uncomment out
 EXTRA_OECMAKE_append_agl-devel = " -DENABLE_DEBUG_OUTPUT=ON "
+
+do_install_append() {
+    # Install systemd over-ride that adds a dependency on weston-ready
+    # to ensure that the windowmanager and its dependencies start after
+    # weston is actually initialized.
+    install -d ${D}${sysconfdir}/systemd/system/afm-api-windowmanager@.service.d
+    install -m 0644 ${WORKDIR}/weston-ready.conf ${D}${sysconfdir}/systemd/system/afm-api-windowmanager@.service.d
+}
+
+FILES_${PN} += "${systemd_system_unitdir}"
+
+REDEPENDS_${PN} += "weston-ready"
diff --git a/meta-hmi-framework/recipes-graphics/agl-service-windowmanager/files/weston-ready.conf b/meta-hmi-framework/recipes-graphics/agl-service-windowmanager/files/weston-ready.conf
new file mode 100644 (file)
index 0000000..e90eed5
--- /dev/null
@@ -0,0 +1,4 @@
+[Unit]
+Requires=weston-ready.service
+After=weston-ready.service
+