diff mbox series

[oe,meta-networking,1/2] dlm: Build fence only when pacemaker recipe is available

Message ID 20180819230444.42440-1-raj.khem@gmail.com
State Accepted
Commit 8cec59341a845eb9776a54a5c34e6777f8a332aa
Headers show
Series [oe,meta-networking,1/2] dlm: Build fence only when pacemaker recipe is available | expand

Commit Message

Khem Raj Aug. 19, 2018, 11:04 p.m. UTC
pacemaker is not in meta-networking, and therefore dlm fails
to build when meta-cgl is not included, this changeset makes
the pacemaker dependency to be optional, and disabled by default
so users who have pacemaker in the bbfiles should enable pacemaker
support via a bbappend or setting it in config metadata

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta-networking/recipes-extended/dlm/dlm_4.0.7.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

-- 
2.18.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-networking/recipes-extended/dlm/dlm_4.0.7.bb b/meta-networking/recipes-extended/dlm/dlm_4.0.7.bb
index f7f7e188c5..18843a61f8 100644
--- a/meta-networking/recipes-extended/dlm/dlm_4.0.7.bb
+++ b/meta-networking/recipes-extended/dlm/dlm_4.0.7.bb
@@ -20,17 +20,24 @@  UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)"
 LICENSE = "LGPLv2+ & GPLv2 & GPLv2+"
 LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d"
 
-DEPENDS = "corosync systemd pacemaker"
+DEPENDS = "corosync systemd"
 
 inherit pkgconfig systemd distro_features_check
 
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[pacemaker] = ",,pacemaker"
+
 SYSTEMD_SERVICE_${PN} = "dlm.service"
 SYSTEMD_AUTO_ENABLE = "enable"
 
 export EXTRA_OEMAKE = ""
 
+DONTBUILD = "${@bb.utils.contains('PACKAGECONFIG', 'pacemaker', '', 'fence', d)}"
+
 do_compile_prepend() {
     sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile
+    sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile
 }
 
 do_compile () {