bug 1) Kernel_linux "useflag ?" is not shown properly by portage ASUS-G75VW /home/roman # equery depends virtual/linux-sources * These packages depend on virtual/linux-sources: sys-power/acpi_call-1.1.0-r2 (kernel_linux ? virtual/linux-sources) x11-drivers/nvidia-drivers-390.12 (kernel_linux ? virtual/linux-sources) ASUS-G75VW /home/roman # emerge -pv nvidia-drivers These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] x11-drivers/nvidia-drivers-390.12:0/390::gentoo USE="X acpi driver gtk3 kms multilib tools uvm -compat -pax_kernel -static-libs -wayland" ABI_X86="32 (64) (-x32)" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB bug 2) kernel_linux only introduced recently, no real use for a long term gentoo user. long term nvidia-driver user for over 9 years. I used the nvidia drivers for many years. It started with an asus g70sg notebook around ~8-9 years ago i suppose. bug 3) Do we really need more virtual nonsense packages like virtual/linux-sources. For many years it was enough to have a valid /usr/src/linux symlink Many packages access that symlink to check for various settings including google-chrome, nvidia-drivers and others. My gentoo is over 13 years old. It started with a Turion MT-32 Cpu. I moved my installation from several notebooks. As you can see this nonsense package virtual/linux-sources was pulled in just today the first time ever. ASUS-G75VW /home/roman # splat linux-sources * virtual/linux-sources-3-r1 Emerged at: So Jan 7 14:02:19 2018 Build time: 14 seconds Checking the ebuild for nvidia-drivers it is obvious someone was very creative recently and introduced something which is not shown by portage, kernel_linux. bug 4) It was enough to let portage fail at build stage or when you saw that the nvidia drivers did not worked with newest kernels. Recently there was some elog message claiming gentoo only supports kernel x-y which is also fine. Summary: It is enough to filter kernels or just throw an elog warning. bug 5) portage does not handle this "fake useflag?" named kernel_linux and virtual/linux-sources properly ASUS-G75VW /home/roman # splat linux-sources * virtual/linux-sources-3-r1 Emerged at: So Jan 7 14:02:19 2018 Build time: 14 seconds ASUS-G75VW /home/roman # emerge -av --update --keep-going --deep -N world These are the packages that would be merged, in order: Calculating dependencies... done! Total: 0 packages, Size of downloads: 0 KiB Nothing to merge; quitting. ASUS-G75VW /home/roman # tail -2 /etc/portage/package.mask virtual/linux-sources ASUS-G75VW /home/roman # qlist -Iv nvidia-drivers x11-drivers/nvidia-drivers-390.12 ASUS-G75VW /home/roman # qlist -Iv virtual/linux-sources ASUS-G75VW /home/roman # qlist -Iv linux sys-apps/util-linux-2.31-r1 sys-kernel/linux-firmware-20180103-r1 sys-kernel/linux-headers-4.14 ASUS-G75VW /home/roman #
When you introduce new stuff than do not break existing gentoo behaviour in invisible "use flags" ASUS-G75VW /home/roman # equery depends virtual/linux-sources * These packages depend on virtual/linux-sources: sys-power/acpi_call-1.1.0-r2 (kernel_linux ? virtual/linux-sources) x11-drivers/nvidia-drivers-390.12 (kernel_linux ? virtual/linux-sources) ASUS-G75VW /home/roman # equery u nvidia-drivers [ Legend : U - final flag setting for installation] [ : I - package is installed with flag ] [ Colors : set, unset ] * Found these USE flags for x11-drivers/nvidia-drivers-390.12: U I + + X : Install the X.org driver, OpenGL libraries, XvMC libraries, and VDPAU libraries + + abi_x86_32 : 32-bit (x86) libraries + + acpi : Add support for Advanced Configuration and Power Interface - - compat : Install non-GLVND libGL for backwards compatibility + + driver : Install the kernel driver module + + gtk3 : Install nvidia-settings with support for GTK+ 3 + + kms : Enable support for kernel mode setting (KMS) + + multilib : On 64bit systems, if you want to be able to compile 32bit and 64bit binaries - - pax_kernel : PaX patches from the PaX project - - static-libs : Build static versions of dynamic libraries as well + + tools : Install additional tools such as nvidia-settings + + uvm : Install the Unified Memory kernel module (nvidia-uvm) for sharing memory between CPU and GPU in CUDA programs - - wayland : Enable dev-libs/wayland backend When you introduce stuff than test it properly, see above with masking that nonsense and still not throwing an error When you introduce stuff than add it properly to the docs and make it visible, and add a real benefit. It is not likely that newbie users use gentoo. It is quite common knowledge that nvida drivers has a homepage, where it states which kernels are supported. Which hardware is supported. There is no need for making ebuilds more complicated, for introducing more nonsense stuff to the tree, for basically zero benefits. Nvidia drivers needs gentoo wiki for setting it up properly. Job done, requirements are met. For those hybrid setups it needs also gentoo wiki, job nicely done. This hidden useflag has no benefit.
The kernel_linux USE flag and virtual/linux-sources has existed for many years. In the x11-drivers/nvidia-drivers package, they have been there since the package was added in 2006. https://gitweb.gentoo.org/repo/gentoo/historical.git/commit/?id=2f06ed2f56de6e6908b7d44ce6dfe646630d44aa If you want to avoid installing a kernel package, add something like this to /etc/portage/profile/package.provided: sys-kernel/vanilla-sources-4.9