Skip to contentSkip to conversation

plymouth: allow disabling the dracut dep

PATCH Superseded Christopher Larson 2 participants 3 messages May 31, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 plymouth: allow disabling the dracut dep

From: Christopher Larson <[email protected]>

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.

---
 meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb +8 -1
index 9ca8502..922e96b 100644
@@ -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"
Signature · 1 line
2.8.0
#1 lore raw
Quoted 11 lines · Christopher Larson

From: Christopher Larson <[email protected]>

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.

Ignore this, needs a rebase. v2 forthcoming.

Signature · 5 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#2 lore raw

PATCH v2 1/1 plymouth: allow disabling the dracut dep

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

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.

---
 meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
meta-oe/recipes-core/plymouth/plymouth_0.9.2.bb +11 -7
index 9ca8502..de23dcd 100644
@@ -24,29 +24,33 @@ EXTRA_OECONF += " --enable-shared --disable-static --disable-gtk --disable-docum
                   ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd-integration --with-system-root-install', '', d)} \
                 "
 
+PACKAGECONFIG ??= "pango initrd"
+PACKAGECONFIG_append_x86 = " drm"
+PACKAGECONFIG_append_x86-64 = " drm"
+
 PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
 PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
 PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+"
-
-PACKAGECONFIG ??= "pango"
+PACKAGECONFIG[initrd] = ",,,"
 
 LOGO ??= "${datadir}/plymouth/bizcom.png"
 
-PACKAGECONFIG_append_x86 = " drm"
-PACKAGECONFIG_append_x86-64 = " drm"
-
 inherit autotools pkgconfig systemd
 
-
 do_install_append() {
 	install -d ${D}${systemd_unitdir}/system
 	install -m 644 ${B}/systemd-units/*.service ${D}${systemd_unitdir}/system
 	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"
Signature · 1 line
2.8.0