-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Wed, 17 Jun 2020 13:08:56 +0200
Michał Górny <mgo...@gentoo.org> wrote:

> On Wed, 2020-06-17 at 12:57 +0200, Ulrich Mueller wrote:
> > > > > > > On Wed, 17 Jun 2020, Michał Górny wrote:
> >  
> > > +# @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
> > > +}
> > 
> > Should we really warn about a package that (in its default
> > configuration) can only be installed if the user accepts non-free
> > licenses?
> 
> That's one of the reasons it's only a warning and not a USE flag.
> 
> > I would think that even without such a warning, users will be well
> > aware if some devices of their system will need additional
> > firmware. Also, some people prefer the separate packages from
> > sys-firmware which tend to be more lightweight (though I am aware
> > that some of them may be considered legacy packages).
> > 
> 
> This has been requested by users, some of whom apparently forget that
> they need to manually install one more package for their system to
> even boot.  If it saves a few people from having to go through
> recovery, it's worth it.
> 

You're probably better with a proper check like what debian's scripts
do:
https://salsa.debian.org/kernel-team/initramfs-tools/-/blob/master/hook-functions#L101

so that there is only a warning when the real file is missing; this
would also handle cases with non-linux-firmware firmwares or
USE=savedconfig there
-----BEGIN PGP SIGNATURE-----

iHUEAREIAB0WIQSpOxaxaZikKNVNlsYOJUi7xgflrgUCXun+HwAKCRAOJUi7xgfl
rlAIAP97XGdJwGvbWcDwMfZ5lptj/TRdhS77mzCAl2OY2CZ12gD+P8Csx0bnQnk0
4NvZwkoBl+fFiaGWvUFkva08A8MKOoo=
=ayj9
-----END PGP SIGNATURE-----

Reply via email to