On 27/09/21 18:10, Mike Gilbert wrote: > I'm looking to solicit opinions on when it is appropriate for an > ebuild to check for kernel config options using linux-info.eclass. I > don't think we have any guidelines documented, instead leaving it up > to the "common sense" of package maintainers. > > Adding linux-info calls to pkg_pretend or pkg_setup causes slowdowns > when running emerge, so we should do so only when there is a > compensating benefit. It doesn't make sense to check for kernel > options that are very commonly enabled. But what is "very common"? > > An obvious example would be CONFIG_INET, which controls IPv4 support > in the kernel. It does not make sense to check for that in every > package that uses AF_INET sockets. > > A less obvious example: a user filed a bug against net-misc/dhcpcd > today asking that we check for CONFIG_PACKET [1]. My first thought was > "why would you ever disable that?". The option description even says > "if unsure, say Y". However, I suppose it is technically possible to > run a Linux system with it disabled. > > I think a reasonable rule of thumb would be to assume we can rely on > options that are enabled by "make defconfig". If the user chooses to > disable them, they are responsible for anything that breaks. > > Thoughts?
We can document in the wiki that going against defconfig means you keep the pieces when something explodes colorfully and/or come up with a even smaller list of config items expected. lu