diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-06-17 11:22:51 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-06-24 10:00:11 +0200 |
commit | 25ee2f5e91a19cd16ad2a3c3ac9954841a6b7e41 (patch) | |
tree | b7d012d20bec3e658a0251c1d27c6047b5def7bb /eclass | |
parent | kernel-install.eclass: Add pkg_config() to reinstall (diff) | |
download | gentoo-25ee2f5e91a19cd16ad2a3c3ac9954841a6b7e41.tar.gz gentoo-25ee2f5e91a19cd16ad2a3c3ac9954841a6b7e41.tar.bz2 gentoo-25ee2f5e91a19cd16ad2a3c3ac9954841a6b7e41.zip |
kernel-install.eclass: Warn about linux-firmware in pkg_pretend()
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kernel-install.eclass | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index b3ef186a74eb..8065a8f5638e 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -260,6 +260,29 @@ kernel-install_test() { EOF } +# @FUNCTION: kernel-install_pkg_pretend +# @DESCRIPTION: +# Check for missing optional dependencies and output warnings. +kernel-install_pkg_pretend() { + debug-print-function ${FUNCNAME} "${@}" + + if ! has_version -d sys-kernel/linux-firmware; then + ewarn "sys-kernel/linux-firmware not found installed on your system." + ewarn "This package provides various firmware files that may be needed" + ewarn "for your hardware to work. If in doubt, it is recommended" + ewarn "to pause or abort the build process and install it before" + ewarn "resuming." + + if use initramfs; then + elog + elog "If you decide to install linux-firmware later, you can rebuild" + elog "the initramfs via issuing a command equivalent to:" + elog + elog " emerge --config ${CATEGORY}/${PN}" + fi + fi +} + # @FUNCTION: kernel-install_src_test # @DESCRIPTION: # Boilerplate function to remind people to call the tests. @@ -356,4 +379,4 @@ _KERNEL_INSTALL_ECLASS=1 fi EXPORT_FUNCTIONS src_test pkg_preinst pkg_postinst pkg_prerm pkg_postrm -EXPORT_FUNCTIONS pkg_config +EXPORT_FUNCTIONS pkg_config pkg_pretend |