commit: 34681b83914b7710bdd29070a31d6c88b9334354 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> AuthorDate: Sat Dec 23 18:13:16 2023 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> CommitDate: Sun Dec 24 12:35:19 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34681b83
eclass/kernel-install.eclass: warn if USE=-initramfs Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/34450 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> eclass/kernel-install.eclass | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index d2b3b94123d4..9612700a1431 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -554,6 +554,20 @@ kernel-install_pkg_pretend() { elog " emerge --config ${CATEGORY}/${PN}:${SLOT}" fi fi + + if ! use initramfs && ! has_version "${CATEGORY}/${PN}[-initramfs]"; then + ewarn + ewarn "WARNING: The standard configuration of the Gentoo distribution" + ewarn "kernels requires an initramfs! You have disabled the initramfs" + ewarn "USE flag and as a result dracut was not pulled in as a dependency." + ewarn "Please ensure that you are either overriding the standard" + ewarn "configuration or that an alternative initramfs generation plugin" + ewarn "is installed for your installkernel implementation!" + ewarn + ewarn "This is an advanced use case, you are on your own to ensure" + ewarn "that your system is bootable!" + ewarn + fi } # @FUNCTION: kernel-install_src_test