From: Luca Boccassi <[email protected]>

Nothing picks them up, so the build fails. Required to be able to build
native tools like systemd-analyze.

Signed-off-by: Luca Boccassi <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
(cherry picked from commit defbcad66fc1e91117ba08bf1051035188e40b37)
Signed-off-by: Armin Kuster <[email protected]>
---
 meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb 
b/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb
index 3988d54910..a729324c9b 100644
--- a/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb
+++ b/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb
@@ -17,13 +17,16 @@ do_install:append() {
     install -d ${D}${sysconfdir}/lvm
     install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf
     sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
-        oe_runmake 'DESTDIR=${D}' install install_systemd_units
-        sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' 
${D}${systemd_system_unitdir}/blk-availability.service
-    else
-        oe_runmake 'DESTDIR=${D}' install install_initscripts
-        mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d
-        rm -rf ${D}${sysconfdir}/rc.d
+    # We don't want init scripts/systemd units for native SDK utilities
+    if [ "${PN}" != "nativesdk-lvm2" ]; then
+        if 
${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+            oe_runmake 'DESTDIR=${D}' install install_systemd_units
+            sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' 
${D}${systemd_system_unitdir}/blk-availability.service
+        else
+            oe_runmake 'DESTDIR=${D}' install install_initscripts
+            mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d
+            rm -rf ${D}${sysconfdir}/rc.d
+        fi
     fi
 }
 
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#94386): 
https://lists.openembedded.org/g/openembedded-devel/message/94386
Mute This Topic: https://lists.openembedded.org/mt/87768980/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to