nativesdk-dbus: fix spurious unpackaged files 61/6361/2
authorStephane Desneux <stephane.desneux@iot.bzh>
Sun, 14 Aug 2016 18:12:34 +0000 (18:12 +0000)
committerGerrit Code Review <gerrit@172.30.200.200>
Tue, 16 Aug 2016 06:15:23 +0000 (06:15 +0000)
When building agl-demo-platform-crosssdk, the package nativesdk-dbus
is required. In the post-install step for the normal package dbus, some
systemd files and symbolic links are added, but this shouldn't happen
when building the nativesdk package, as those added files are not packaged,
thus creating a QA Error (some files are installed in sysroot but not packaged)

Bug-AGL: SPEC-235

Change-Id: Ib4894309355b807d52b34934a2f8a0bdebe3a01a
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
meta-agl/recipes-core/dbus/dbus_%.bbappend

index b27e44d..e65fe9e 100644 (file)
@@ -8,15 +8,17 @@ SRC_URI_append = "file://dbus.service \
 inherit systemd
 
 do_install_append() {
-    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-        install -m 644 -p -D ${WORKDIR}/dbus.service ${D}${systemd_user_unitdir}/dbus.service
-        install -m 644 -p -D ${WORKDIR}/dbus.socket ${D}${systemd_user_unitdir}/dbus.socket
-        install -m 644 -p -D ${WORKDIR}/dbus_env.conf ${D}${systemd_system_unitdir}/user@.service.d/dbus_env.conf
+    if [ "${PN}" != "nativesdk-dbus" ]; then
+        if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+            install -m 644 -p -D ${WORKDIR}/dbus.service ${D}${systemd_user_unitdir}/dbus.service
+            install -m 644 -p -D ${WORKDIR}/dbus.socket ${D}${systemd_user_unitdir}/dbus.socket
+            install -m 644 -p -D ${WORKDIR}/dbus_env.conf ${D}${systemd_system_unitdir}/user@.service.d/dbus_env.conf
 
-        # Execute these manually on behalf of systemctl script (from systemd-systemctl-native.bb)
-        # because it does not support systemd's user mode.
-        mkdir -p ${D}/etc/systemd/user/default.target.wants/
-        ln -sf ${systemd_user_unitdir}/dbus.socket ${D}/etc/systemd/user/default.target.wants/dbus.socket
+            # Execute these manually on behalf of systemctl script (from systemd-systemctl-native.bb)
+            # because it does not support systemd's user mode.
+            mkdir -p ${D}/etc/systemd/user/default.target.wants/
+            ln -sf ${systemd_user_unitdir}/dbus.socket ${D}/etc/systemd/user/default.target.wants/dbus.socket
+        fi
     fi
 }