1 |
-----BEGIN PGP SIGNED MESSAGE-----
|
2 |
Hash: SHA256
|
3 |
|
4 |
On Wed, 17 Jun 2020 13:08:56 +0200
|
5 |
Michał Górny <mgorny@g.o> wrote:
|
6 |
|
7 |
> On Wed, 2020-06-17 at 12:57 +0200, Ulrich Mueller wrote: |
8 |
> > > > > > > On Wed, 17 Jun 2020, Michał Górny wrote: |
9 |
> > |
10 |
> > > +# @FUNCTION: kernel-install_pkg_pretend |
11 |
> > > +# @DESCRIPTION: |
12 |
> > > +# Check for missing optional dependencies and output warnings. |
13 |
> > > +kernel-install_pkg_pretend() { |
14 |
> > > + debug-print-function ${FUNCNAME} "${@}" |
15 |
> > > + |
16 |
> > > + if ! has_version -d sys-kernel/linux-firmware; then |
17 |
> > > + ewarn "sys-kernel/linux-firmware not found |
18 |
> > > installed on your system." |
19 |
> > > + ewarn "This package provides various firmware |
20 |
> > > files that may be needed" |
21 |
> > > + ewarn "for your hardware to work. If in doubt, |
22 |
> > > it is recommended" |
23 |
> > > + ewarn "to pause or abort the build process and |
24 |
> > > install it before" |
25 |
> > > + ewarn "resuming." |
26 |
> > > + |
27 |
> > > + if use initramfs; then |
28 |
> > > + elog |
29 |
> > > + elog "If you decide to install |
30 |
> > > linux-firmware later, you can rebuild" |
31 |
> > > + elog "the initramfs via issuing a |
32 |
> > > command equivalent to:" |
33 |
> > > + elog |
34 |
> > > + elog " emerge --config |
35 |
> > > ${CATEGORY}/${PN}" |
36 |
> > > + fi |
37 |
> > > + fi |
38 |
> > > +} |
39 |
> > |
40 |
> > Should we really warn about a package that (in its default |
41 |
> > configuration) can only be installed if the user accepts non-free |
42 |
> > licenses? |
43 |
> |
44 |
> That's one of the reasons it's only a warning and not a USE flag. |
45 |
> |
46 |
> > I would think that even without such a warning, users will be well |
47 |
> > aware if some devices of their system will need additional |
48 |
> > firmware. Also, some people prefer the separate packages from |
49 |
> > sys-firmware which tend to be more lightweight (though I am aware |
50 |
> > that some of them may be considered legacy packages). |
51 |
> > |
52 |
> |
53 |
> This has been requested by users, some of whom apparently forget that |
54 |
> they need to manually install one more package for their system to |
55 |
> even boot. If it saves a few people from having to go through |
56 |
> recovery, it's worth it. |
57 |
> |
58 |
|
59 |
You're probably better with a proper check like what debian's scripts
|
60 |
do:
|
61 |
https://salsa.debian.org/kernel-team/initramfs-tools/-/blob/master/hook-functions#L101
|
62 |
|
63 |
so that there is only a warning when the real file is missing; this
|
64 |
would also handle cases with non-linux-firmware firmwares or
|
65 |
USE=savedconfig there
|
66 |
-----BEGIN PGP SIGNATURE-----
|
67 |
|
68 |
iHUEAREIAB0WIQSpOxaxaZikKNVNlsYOJUi7xgflrgUCXun+HwAKCRAOJUi7xgfl
|
69 |
rlAIAP97XGdJwGvbWcDwMfZ5lptj/TRdhS77mzCAl2OY2CZ12gD+P8Csx0bnQnk0
|
70 |
4NvZwkoBl+fFiaGWvUFkva08A8MKOoo=
|
71 |
=ayj9
|
72 |
-----END PGP SIGNATURE----- |