Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 117972 - kernel module not removed when package explicitly unmerged
Summary: kernel module not removed when package explicitly unmerged
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 421659
Blocks:
  Show dependency tree
 
Reported: 2006-01-05 19:09 UTC by Dulmandakh
Modified: 2013-02-15 23:45 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dulmandakh 2006-01-05 19:09:27 UTC
When removing nforce audio ebuild, it not removes kernel modules from kernel module tree. alsa loads snd_intel8x0 module with nvsound, so it block any media apps.
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-01-06 03:28:32 UTC
Kenrel team, that's your eclass and decision, no?
Comment 2 Henrik Brix Andersen 2006-01-06 06:17:54 UTC
(In reply to comment #0)
> When removing nforce audio ebuild, it not removes kernel modules from kernel
> module tree. alsa loads snd_intel8x0 module with nvsound, so it block any media
> apps.

This is the correct behaviour since /lib/modules/ is config protected for unmerging in /usr/lib/portage/pym/portage.py

There's currently no way for an end-user to turn off this config protection of /lib/modules/ as far as I know.

Adding portage dev to CC:

Comment 3 Daniel Drake (RETIRED) gentoo-dev 2006-01-10 10:11:48 UTC
This behaviour is by-design, so that when you upgrade/reinstall modules, the module for the old kernel is left in place.

I guess if the user explicitly wants to *remove* the package (e.g. emerge -C some-module) then it would make sense to remove the appropriate module(s) in /lib/modules.

Reassigning to portage, not sure if there is any interest in improving things here, its not overly critical anyhow.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-05-25 13:06:07 UTC
Also, subsequent emerge of the same ebuild fails w/ collision-protect on the kernel module, if you unmerge and then emerge it w/ the same kernel (the module gets orphaned after unmerge).
Comment 5 John Mylchreest (RETIRED) gentoo-dev 2006-05-31 01:20:55 UTC
I've never actually tried, but perhaps CONFIG_PROTECT_MASK="/lib/modules" will work here. Try defining it in make.conf and give it a quick shot, I think the protect mask is parsed quite late on by portage.
Comment 6 Zac Medico gentoo-dev 2006-05-31 01:32:30 UTC
Well, the /lib/modules protection is hard coded in portage.py, and there's no way provided for users to override it at this time.  The reason for hard coding (as commented in the code) is that only half of the CONFIG_PROTECT functionality is desired.  Kernel modules will never be unmerged but they *are* allowed to be overwritten without the need to be explicitely merged by the user via etc-update, dispatch-conf, etc...
Comment 7 Marius Mauch (RETIRED) gentoo-dev 2007-01-10 03:01:44 UTC
Just came across a different report (about running ldconfig after each unmerge) where it would make sense to separate explicit (emerge -C) from implicit (autoclean) unmerges, so maybe a new parameter to unmerge() isn't such a bad idea
Comment 8 Simon Stelling (RETIRED) gentoo-dev 2007-01-10 14:46:00 UTC
(In reply to comment #7)
> Just came across a different report (about running ldconfig after each unmerge)
> where it would make sense to separate explicit (emerge -C) from implicit
> (autoclean) unmerges, so maybe a new parameter to unmerge() isn't such a bad
> idea

I'm all for it. This would also kind of solve the problem of orphaned files in CONFIG_PROTECT.
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-01-10 14:50:59 UTC
(In reply to comment #8)
> I'm all for it. This would also kind of solve the problem of orphaned files in
> CONFIG_PROTECT.

Well, I've added COLLISION_IGNORE="/lib/modules" to /etc/make.conf and am pretty much done with this... (Yeah, there are other issues besides the collisions here but this one is the most visible.)
Comment 10 Zac Medico gentoo-dev 2013-02-15 23:45:55 UTC
Since bug 421659, we have an UNINSTALL_IGNORE variable that may be used to control this behavior.