summaryrefslogtreecommitdiff
path: root/eclass/kernel-install.eclass
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2023-12-23 19:13:16 +0100
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2023-12-24 13:35:19 +0100
commit34681b83914b7710bdd29070a31d6c88b9334354 (patch)
tree9247c806425ede5c6a386cd602fd2178dcebc58d /eclass/kernel-install.eclass
parentf0b516be364b23498822b7a768ebe4f53005816a (diff)
downloadgentoo-34681b83914b7710bdd29070a31d6c88b9334354.tar.gz
gentoo-34681b83914b7710bdd29070a31d6c88b9334354.tar.bz2
gentoo-34681b83914b7710bdd29070a31d6c88b9334354.zip
eclass/kernel-install.eclass: warn if USE=-initramfs
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/34450 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'eclass/kernel-install.eclass')
-rw-r--r--eclass/kernel-install.eclass14
1 files changed, 14 insertions, 0 deletions
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