Gentoo Archives: gentoo-dev

From: Thomas de Grenier de Latour <degrenier@×××××××××××.fr>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] [RFC] A proposal regarding packages that provide kernel modules
Date: Tue, 16 Sep 2003 15:13:02
Message-Id: 1063725180.3f67287cb1c09@webmail.easyconnect.fr
In Reply to: Re: [gentoo-dev] [RFC] A proposal regarding packages that provide kernel modules by Chris Gianelloni
1 En réponse à Chris Gianelloni <wolf31o2@g.o>:
2
3 > I like it.
4 >
5 > As it stands right now, when I use a new kernel, I have to
6 remerge
7 > nvidia-kernel, lm-sensors, cisco-vpnclient-3des,
8 pcmcia-cs, and re-run
9 > /opt/vmware/bin/vmware-config.pl to rebuild all the
10 modules. This can
11 > be a serious pain and something I forget to do quite
12 often, especially
13 > when testing out kernels. My current solution is to move
14 all of the
15 > modules that are built into a new location under
16 /lib/modules/<ver> to
17 > keep them from being automatically removed with the next
18 merge.
19 >
20
21 I also think that something really need to be done about
22 drivers in
23 portage. The solution proposed on bug #3120 (multiple slots
24 for a same
25 pkg-ver, and slotting drivers to $KV as some are already) is
26 elegant,
27 but it seems hard to implement. It may be a too deep change
28 for a
29 very specific issue. (I've not found any other example where
30 multiple
31 slots may be usefull, but if you have some, please share).
32
33 Solution proposed by Georgi may be easier, and the "modules"
34 counterpart to "world" would be nice. I also like it.
35
36 That said, I've started myself to implement yet another,
37 easier, a
38 solution to this problem, and it's almost already finished.
39 It's not
40 very sofisticated though:
41
42 - user can define a list of path to protect in his make.conf.
43 CLEAN_PROTECT="/lib/modules" is a good value in our case.
44
45 - when a package is "safely unmerged" (what happens if you
46 install
47 foo/bar-1.0 twice), then files within CLEAN_PROTECT path
48 and that
49 should have been removed are instead protected and added to
50 the
51 new CONTENTS file of foo/bar-1.0.
52
53 - when you upgrade foo/bar-1.0 to foo/bar-1.1, and have
54 "autoclean"
55 feature, or do a manual "emerge -c", the same happens:
56 protected
57 files from 1.0 are added to the CONTENTS of 1.1, instead of
58 being
59 deleted. (if the package is in several version in several
60 slots,
61 then the protecting pkg will always be the one in the same
62 slot,
63 but in case of "prune". The logic is exactly the one of the
64 clean or
65 prune in emerge.)
66
67 - when you really want to uninstall foo/bar, "emerge -C"
68 won't take
69 the protection into account. Because the CONTENTS file is
70 up to date
71 with all previous versions of the files, it will remove
72 then all.
73 Hence the day you switch from nvidia to ati, "emerge -C
74 nvidia-kernel"
75 will do the cleanup for all kernels modules directories.
76
77 So far it seems to work for me. I have files from several
78 modules dirs
79 in my alsa-driver and nvidia-kernel CONTENTS files. But
80 there are a few
81 limitations: I've not implemented protection for objects
82 other than
83 files (dirs, symlinks, fifo). Mainly because I don't need it
84 though.
85 That's why I've not submitted it so far. (In fact, the first
86 version
87 of this patch is submitted as bug #24990, but it's really
88 not good
89 because it makes portage completly forget the existence of
90 files that
91 have been protected.)
92
93 In short, this approach is okay for keeping modules
94 installed in
95 several kernels without manual backup (well, at least I use
96 it), but is
97 not specific to modules, so for this precise use it is less
98 powerful
99 that what Georgi suggested (no "modules" world-like file and no
100 "install modules only" ebuild functions). But it may also be
101 useful for
102 a few other task (for instance keeping all icons/backgrounds
103 that come
104 with a WM theme package, accross several versions).
105
106 Any comments on the above ideas are welcome. I will also
107 submit an
108 up-to-date patch in bug #24990, but not before the next few
109 hours
110 (I'm not at home right now).
111
112 --
113 TGL.
114
115 --
116 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] [RFC] A proposal regarding packages that provide kernel modules Thomas de Grenier de Latour <degrenier@×××××××××××.fr>