On Monday 04 May 2009 11:45:00 Matt Causey wrote: > Hello all! > > I am a Gentoo n00b. I have question about what the 'expected > behaviour' is/should be when removing packages under Gentoo package > management. So I read this document: > > http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?style=printable&full >=1#book_part2 > > And it says, to remove software, use 'emerge --unmerge'. Cool, yeah > that seems to do what I expect... So, I have a package madwifi-ng, > which contains some kernel modules. I want to emerge --unmerge that > package, because I want to make those drivers go away. That seems to > go well, as when I search for it in portage it show all non-installed > and stuff: > > prometheus ~ # emerge --search madwifi-ng > Searching... > [ Results for search key : madwifi-ng ] > [ Applications found : 2 ] > > * net-wireless/madwifi-ng > Latest version available: 0.9.4 > Latest version installed: [ Not Installed ] > Size of files: 3,403 kB > Homepage: http://www.madwifi-project.org/ > Description: Next Generation driver for Atheros based IEEE > 802.11a/b/g wireless LAN cards > License: atheros-hal || ( BSD GPL-2 ) > > Buuut, there are still kernel modules there, which are owned by that > package: > > prometheus ~ # ls -lah /lib/modules/2.6.28-gentoo-r5/net/ath_pci.ko > -rw-r--r-- 1 root root 77K May 3 20:43 > /lib/modules/2.6.28-gentoo-r5/net/ath_pci.ko > prometheus ~ # > > and of course they still load. > > Sooo, my question. What is the expected behaviour here? Are the > ebuilds intended to maintain knowledge of the files they put on a > system, so they can remove the binaries when --unmerge'd?
That's the general idea. Except for *this* case :-) > Are kernel > modules handled differently because of the possibility of damaging a > working system? Out of tree kernel modules are a maintenance pain in the ass, and cause severely non-obvious problems like this. Every time you upgrade your kernel, you must rebuild the out-of-tree modules, and you do that by re-running "emerge madwifi-ng". This builds a new modules that matches the currently configured kernel (/usr/src/linux/) and puts the module in /lib/modules/<version> Upgrade your kernel a few times and you have various versions of modules floating around. Portage remembers the modules installed by the most recent emerge, but AFAIK forgets all the previous ones. This is expected of course - when you upgrade firefox-2 to firefox-3 you would not expect the system to remember the firefox-2 files (as they are supposed to not be there anymore) -- alan dot mckinnon at gmail dot com