run-agl-postinsts: run before systemd-user-sessions 39/9439/2
authorScott Murray <scott.murray@konsulko.com>
Sat, 20 May 2017 15:12:55 +0000 (11:12 -0400)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Mon, 22 May 2017 11:29:23 +0000 (11:29 +0000)
Add setting of Before to the template scheme in the run-agl-postinsts
recipe, and use it to make sure run-agl-postinsts runs before
systemd-user-sessions.  This ensures that on first boot all of the
applications will be installed before HomeScreen is started in the
user session.

Bug-AGL: SPEC-580

Change-Id: I08026f225971e1fe38e984dfed5fc2656955942c
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9439
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts.service
meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb

index a80b160..61d6d46 100644 (file)
@@ -2,6 +2,7 @@
 Description=Run pending agl postinsts
 DefaultDependencies=no
 After=#SYSTEMD_SERVICE_AFTER#
+Before=#SYSTEMD_SERVICE_BEFORE#
 ConditionPathExists=#SYSCONFDIR#/agl-postinsts
 
 [Service]
index 5b5e18a..96c171f 100644 (file)
@@ -16,6 +16,8 @@ SYSTEMD_SERVICE_${PN} = "run-agl-postinsts.service"
 
 SYSTEMD_SERVICE_AFTER ?= "dbus.service cynara.service"
 
+SYSTEMD_SERVICE_BEFORE ?= "systemd-user-sessions.service"
+
 do_configure() {
     :
 }
@@ -39,6 +41,7 @@ do_install() {
                ${D}${systemd_unitdir}/system/run-agl-postinsts.service
  
     sed -i -e 's:#SYSTEMD_SERVICE_AFTER#:${SYSTEMD_SERVICE_AFTER}:g' \
+               -e 's:#SYSTEMD_SERVICE_BEFORE#:${SYSTEMD_SERVICE_BEFORE}:g' \
                ${D}${systemd_unitdir}/system/run-agl-postinsts.service
 }