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