Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 336215 - x11-drivers/nvidia-drivers: building the kernel module should be optional
Summary: x11-drivers/nvidia-drivers: building the kernel module should be optional
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-06 12:42 UTC by Ambroz Bizjak
Modified: 2010-10-11 23:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild patch (nvidia-drivers-256.53-ebuild-optional-kmod.patch,2.20 KB, patch)
2010-09-06 12:45 UTC, Ambroz Bizjak
Details | Diff
ebuild patch (nvidia-drivers-256.53-ebuild-optional-kmod.patch,2.51 KB, patch)
2010-09-13 15:53 UTC, Ambroz Bizjak
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ambroz Bizjak 2010-09-06 12:42:59 UTC
x11-drivers/nvidia-drivers wants to compile and install an external kernel module. This should be optional, in case the user want to manage kernel modules himself.

Why someone would want that:
- The package manager (and the ebuilds) does a bad job at managing external kernel modules. I.e. Portage leaves all kernel modules behind untracked, and Paludis removes old kernel modules automatically (breaking older kernels).
- Ebuilds that build kernel modules depend on virtual/linux-sources. This is:
  1. undesirable if the user wants to use his own kernel source (not from the tree), and
  2. completely useless, since the the kernel still has to be compiled (by the user), even if the source was installed by the package manager.
- The current code in the tree might not be capable of building modules for the user's particular setup. E.g. I use a 64-bit kernel with a 32-bit userspace, so the kernel and modules have to be compiled with a cross-compiler.

Reproducible: Always
Comment 1 Ambroz Bizjak 2010-09-06 12:45:12 UTC
Created attachment 246254 [details, diff]
ebuild patch

This patch to nvidia-drivers-256.53.ebuild adds a USE flag "kmod" that specifies whether a Linux kernel module is to be build, and defaults to on.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-09-06 12:55:42 UTC
(In reply to comment #0)
> - Ebuilds that build kernel modules depend on virtual/linux-sources. This is:
>   1. undesirable if the user wants to use his own kernel source (not from the
> tree), and

This can easily be worked around by adding 

  sys-kernel/gentoo-sources-2.6.99

to the file /etc/portage/profile/package.provided
Comment 3 Ambroz Bizjak 2010-09-06 12:59:38 UTC
(In reply to comment #2)
> This can easily be worked around by adding 
> 
>   sys-kernel/gentoo-sources-2.6.99
> 
> to the file /etc/portage/profile/package.provided

Unfortunately I use Paludis and it's somehow more complicated. Also prevents you from actually installing the package in question.
Comment 4 Ambroz Bizjak 2010-09-13 15:53:29 UTC
Created attachment 247137 [details, diff]
ebuild patch

don't call kernel_is if -kmod, because it attmepts to find the kernel dirs
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2010-10-11 23:26:31 UTC
Find a PMS way to say that the kernel sources are present then since all ebuilds that build kernel pieces depend on virtual/linux-sources because of the use of the linux-info eclass.

This won't be done.