From 16dbe39af34a74576929bcf5ebebe66a10bfbc7a Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Fri, 4 May 2018 23:03:21 -0300 Subject: ostree: improve systemd dependency checks No need to define SYSTEMD_REQUIRED and no need to manually install the service files, as that is already handled by ostree and the systemd bbclass. Signed-off-by: Ricardo Salveti --- recipes-sota/ostree/ostree_git.bb | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'recipes-sota') diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index 58f30a7..dc31efe 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb @@ -17,26 +17,24 @@ S = "${WORKDIR}/git" BBCLASSEXTEND = "native" DEPENDS += "attr libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz" -DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" +DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" RDEPENDS_${PN} = "bash" CFLAGS_append = " -Wno-error=missing-prototypes" EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup" EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut" + # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the # do_configure stage so we do depend on it SYSROOT_DIR = "${STAGING_DIR_TARGET}" SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" do_configure[vardeps] += "SYSROOT_DIR" -SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" - SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" -PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut" - FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" export BUILD_SYS @@ -49,23 +47,13 @@ do_configure_prepend() { NOCONFIGURE=1 "${S}/autogen.sh" } -export SYSTEMD_REQUIRED - -do_install_append() { - if [ -n ${SYSTEMD_REQUIRED} ]; then - install -m 0644 -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service - install -m 0644 -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service - fi -} - do_install_append_class-native() { create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" } FILES_${PN} += " \ - ${@'${systemd_unitdir}/system/' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \ - ${@'${libdir}/dracut/modules.d/98ostree/module-setup.sh' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \ + ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/dracut', '', d)} \ ${datadir}/gir-1.0 \ ${datadir}/gir-1.0/OSTree-1.0.gir \ ${libdir}/girepository-1.0 \ -- cgit v1.2.3-54-g00ecf