[oe-commits] Robert Yang : dracut: RDEPEND on systemd optionally

git at git.openembedded.org git at git.openembedded.org
Thu Sep 17 15:05:02 UTC 2015


Module: meta-openembedded.git
Branch: master-next
Commit: ce7b2b9f58c3dcf1c8f75432df639630ac91b0b9
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=ce7b2b9f58c3dcf1c8f75432df639630ac91b0b9

Author: Robert Yang <liezhi.yang at windriver.com>
Date:   Thu Sep 17 03:51:25 2015 -0400

dracut: RDEPEND on systemd optionally

Use PACKAGECONFIG to depend on systemd optionally.

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 meta-initramfs/recipes-devtools/dracut/dracut_git.bb | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index b7d88fd..3be78ed 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -13,9 +13,6 @@ SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git"
 
 S = "${WORKDIR}/git"
 
-inherit distro_features_check
-REQUIRED_DISTRO_FEATURES = "systemd"
-
 EXTRA_OECONF = "--prefix=${prefix} \
                 --libdir=${libdir} \
                 --datadir=${datadir} \
@@ -25,7 +22,11 @@ EXTRA_OECONF = "--prefix=${prefix} \
                 --bindir=${bindir} \
                 --includedir=${includedir} \
                 --localstatedir=${localstatedir} \
-                --systemdsystemunitdir=${systemd_unitdir}/system"
+               "
+
+# RDEPEND on systemd optionally
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
 
 do_configure() {
     ./configure ${EXTRA_OECONF}
@@ -44,7 +45,7 @@ FILES_${PN} += " ${libdir}/kernel \
                "
 CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
 
-RDEPENDS_${PN} = "systemd findutils cpio util-linux-blkid util-linux-getopt bash ldd"
+RDEPENDS_${PN} = "findutils cpio util-linux-blkid util-linux-getopt bash ldd"
 RDEPENDS_${PN}-bash-completion = "bash-completion"
 
 # This could be optimized a bit, but let's avoid non-booting systems :)



More information about the Openembedded-commits mailing list