Gentoo Archives: gentoo-dev

From: Thomas de Grenier de Latour <degrenier@×××××××××××.fr>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] module-rebuild
Date: Thu, 05 May 2005 15:33:28
Message-Id: 20050505173316.05fe8e10@eusebe
In Reply to: Re: [gentoo-dev] module-rebuild by John Mylchreest
1 On Wed, 04 May 2005 08:34:34 +0100
2 John Mylchreest <johnm@g.o> wrote:
3
4 > I thought about this, but not wanting to depend on gentoolkit
5 > makes using equery for example a little awkward.
6 > This, I'm sure isn't fully feature-rich yet - and something
7 > like this will be the next addition to go in.
8 >
9 > On Wed, 2005-05-04 at 15:24 +0900, Georgi Georgiev wrote:
10 > >
11 > > I am not trying to shoot down your idea, but you could
12 > > probably use something similar to automatically generate the
13 > > list of packages to rebuild if the database is empty?
14 > >
15
16 I've uploaded here the script i use here to rebuild my modules:
17 http://tdegreni.free.fr/gentoo/emodules
18
19 It's in bash too, and i think there are some functions that could
20 help for implementing the feature you are talking about:
21 - get_kernel_KV() gives the $KV value corresponding to a kernel
22 sources tree.
23 - get_cpv_KV() gives the $KV value from the saved environment of
24 an installed package.
25 - list_cpv_to_build() gives the lists of packages providing
26 modules that were not last built using the right $KV.
27
28 It doesn't use equery neither, but rather direct access to the
29 ${ROOT}var/db/pkg.
30
31 Feel free to copy/past whatever you find useful (there's probably
32 no legal header, but it's gpl in my mind).
33
34 --
35 TGL.
36 --
37 gentoo-dev@g.o mailing list