Skip to content

Commit defbcad

Browse files
blucakraj
authored andcommitted
lvm2: do not install systemd units/initscripts when building native SDK tools
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]>
1 parent ccb01b9 commit defbcad

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ do_install:append() {
1717
install -d ${D}${sysconfdir}/lvm
1818
install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf
1919
sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf
20-
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
21-
oe_runmake 'DESTDIR=${D}' install install_systemd_units
22-
sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_system_unitdir}/blk-availability.service
23-
else
24-
oe_runmake 'DESTDIR=${D}' install install_initscripts
25-
mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d
26-
rm -rf ${D}${sysconfdir}/rc.d
20+
# We don't want init scripts/systemd units for native SDK utilities
21+
if [ "${PN}" != "nativesdk-lvm2" ]; then
22+
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
23+
oe_runmake 'DESTDIR=${D}' install install_systemd_units
24+
sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_system_unitdir}/blk-availability.service
25+
else
26+
oe_runmake 'DESTDIR=${D}' install install_initscripts
27+
mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d
28+
rm -rf ${D}${sysconfdir}/rc.d
29+
fi
2730
fi
2831
}
2932

0 commit comments

Comments
 (0)