af-main: Improve environment setting 37/9137/4
authorJosé Bollo <jose.bollo@iot.bzh>
Wed, 19 Apr 2017 13:29:59 +0000 (15:29 +0200)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Thu, 20 Apr 2017 09:23:46 +0000 (09:23 +0000)
Some environment variable were set in the configuration files.
This wasn't a valuable solution. Allowing now system tuning to
put environment variables in files of /etc/afm/unit.env.d
is much more flexible.

This patch is introduced also to solve the folowing issue

Bug-AGL: SPEC-547

Change-Id: I41183735b707a9d5d30805504c2676afe12c3b8d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
meta-app-framework/recipes-core/af-main/af-main/add-qt-wayland-shell-integration.patch [deleted file]
meta-app-framework/recipes-core/af-main/af-main_1.0.bb
meta-app-framework/recipes-core/af-main/af-main_1.0.inc

diff --git a/meta-app-framework/recipes-core/af-main/af-main/add-qt-wayland-shell-integration.patch b/meta-app-framework/recipes-core/af-main/af-main/add-qt-wayland-shell-integration.patch
deleted file mode 100644 (file)
index c92415b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/conf/afm-unit.conf b/conf/afm-unit.conf
-index 82113ef..2fbc9e2 100644
---- a/conf/afm-unit.conf
-+++ b/conf/afm-unit.conf
-@@ -127,6 +127,7 @@ SuccessExitStatus=0 SIGKILL
- WorkingDirectory=-{{&#metadata.app-data-dir}}/{{id}}
- ExecStartPre=/bin/mkdir -p {{&#metadata.app-data-dir}}/{{id}}
- Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
-+Environment=QT_WAYLAND_SHELL_INTEGRATION=ivi-shell
- %systemd-unit user
- {{#required-permission.urn:AGL:permission::public:hidden}}\
index 0b70c35..153be3a 100644 (file)
@@ -56,7 +56,6 @@ SRC_URI += "\
 # tools used to install wgt at first boot
 SRC_URI += "\
        file://afm-install \
-       file://add-qt-wayland-shell-integration.patch \
 "
 
 do_install_append_class-target() {
@@ -73,10 +72,11 @@ do_install_append_class-target() {
         ln -sf ${systemd_user_unitdir}/afm-user-daemon.service ${D}${sysconfdir}/systemd/user/default.target.wants
     fi
     install -m 0755 ${WORKDIR}/afm-install ${D}${bindir}
+    echo "QT_WAYLAND_SHELL_INTEGRATION=ivi-shell" > ${D}${afm_confdir}/unit.env.d/qt-for-ivi-shell
 }
 
-do_install_append_qemux86-64() {
-    sed -i -e '/LD_PRELOAD=\/usr\/lib\/libEGL.so/d' ${D}${systemd_user_unitdir}/afm-user-daemon.service
+do_install_append_porter() {
+       echo "LD_PRELOAD=/usr/lib/libEGL.so" > ${D}${afm_confdir}/unit.env.d/preload-libEGL
 }
 
 pkg_postinst_${PN}() {
index 7da9132..3dadcc2 100644 (file)
@@ -14,7 +14,7 @@ SRC_URI = "${SRC_URI_git} \
            ${SRC_URI_files} \
           "
 
-SRCREV = "51a86fcd6e4f199009888b5a106bf472f1b7c742"
+SRCREV = "3f6dcaacd7abc85ebed40053a3ce73bc7753ddf9"
 
 S = "${WORKDIR}/git"