diff options
author | 2019-07-22 23:26:40 +0300 | |
---|---|---|
committer | 2019-07-25 20:58:34 +0000 | |
commit | 63ced87df20d656b8cdb485aa69e23943f82c574 (patch) | |
tree | ea604e2e36b9017fcf878ec74027b4caad20bf4d /meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_%.bbappend | |
parent | 27f73fc39198f807d019fe1a47571ec8da727b42 (diff) |
recipes-multimedia: lightmediascanner: switch from user dbus session to system
To avoid multiple instances of lightmediascanner from being created
it should run only once in the system dbus session.
Bug-AGL: SPEC-2655
Change-Id: I6c9510926f82ec9eb5625d63d08998a145504227
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
(cherry picked from commit af1c6967f09a51c600742de6e299255ff07b4a47)
Diffstat (limited to 'meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_%.bbappend')
-rw-r--r-- | meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_%.bbappend | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_%.bbappend b/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_%.bbappend index 7a1dd1a4e..b47b2796c 100644 --- a/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_%.bbappend +++ b/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_%.bbappend @@ -5,6 +5,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI += "file://lightmediascanner.service \ file://plugin-ogg-fix-chucksize-issue.patch \ + file://0002-switch-from-G_BUS_TYPE_SESSION-to-G_BUS_TYPE_SYSTEM.patch \ file://dbus-lightmediascanner.conf \ " @@ -12,28 +13,26 @@ CFLAGS_append = " -D_FILE_OFFSET_BITS=64" inherit systemd +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "lightmediascanner.service" +SYSTEMD_AUTO_ENABLE_${PN} = "enable" + do_install_append() { # Install LMS systemd service if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -m 644 -p -D ${WORKDIR}/lightmediascanner.service ${D}${systemd_user_unitdir}/lightmediascanner.service - - # 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}/lightmediascanner.service ${D}/etc/systemd/user/dbus-org.lightmediascanner.service - ln -sf ${systemd_user_unitdir}/lightmediascanner.service ${D}/etc/systemd/user/default.target.wants/lightmediascanner.service + install -d ${D}${systemd_system_unitdir} + install -m 644 -p -D ${WORKDIR}/lightmediascanner.service ${D}${systemd_system_unitdir}/lightmediascanner.service fi - install -d ${D}/etc/dbus-1/session.d - install -m 0644 ${WORKDIR}/dbus-lightmediascanner.conf ${D}/etc/dbus-1/session.d/lightmediascanner.conf + install -d ${D}/etc/dbus-1/system.d + install -m 0644 ${WORKDIR}/dbus-lightmediascanner.conf ${D}/etc/dbus-1/system.d/org.lightmediascanner.conf } FILES_${PN} += " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/lightmediascanner.service', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_system_unitdir}/lightmediascanner.service', '', d)} \ " -# for DEMO -EXTRA_OECONF = "--enable-static" +EXTRA_OECONF = "--enable-static --with-dbus-services=${datadir}/dbus-1/system-services" PACKAGECONFIG[mp4] = "--enable-mp4,--disable-mp4,libmp4v2" # add support MP3 because of the format of music files for AGL CES/ALS2017 Demo |