[oe] [meta-oe][PATCH] plymouth: allow disabling the dracut dep

Christopher Larson kergoth at gmail.com
Tue May 31 19:15:20 UTC 2016


From: Christopher Larson <chris_larson at mentor.com>

Add a 'initrd' PACKAGECONFIG to disable emission of the plymouth-initrd
package which includes initramfs files for use by dracut. Disabling this will
avoid the runtime dependency on dracut, which is useful if one doesn't need or
want dracut and doesn't want to pull in meta-initramfs.

Signed-off-by: Christopher Larson <chris_larson at mentor.com>
---
 meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb b/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
index 9ca8502..922e96b 100644
--- a/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
+++ b/meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb
@@ -37,6 +37,8 @@ PACKAGECONFIG_append_x86-64 = " drm"
 
 inherit autotools pkgconfig systemd
 
+PACKAGECONFIG = "initrd"
+PACKAGECONFIG[initrd] = ",,,"
 
 do_install_append() {
 	install -d ${D}${systemd_unitdir}/system
@@ -44,9 +46,14 @@ do_install_append() {
 	install -m 644 ${B}/systemd-units/systemd-ask-password-plymouth.path ${D}${systemd_unitdir}/system
 	# Remove /var/run from package as plymouth will populate it on startup
 	rm -fr "${D}${localstatedir}/run"
+
+	if ! ${@bb.utils.contains('PACKAGECONFIG', 'initrd', 'true', 'false', d)}; then
+		rm -rf "${D}${libexecdir}"
+	fi
 }
 
-PACKAGES =+ "${PN}-initrd ${PN}-set-default-theme"
+PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'initrd', '${PN}-initrd ', '', d)}"
+PACKAGES =+ "${PN}-set-default-theme"
 
 FILES_${PN}-initrd = "${libexecdir}/plymouth/*"
 FILES_${PN}-set-default-theme = "${sbindir}/plymouth-set-default-theme"
-- 
2.8.0




More information about the Openembedded-devel mailing list