Gentoo Archives: gentoo-dev

From: Paul Varner <gentoo-dev@××××××××××××.org>
To: gentoo-dev@g.o
Subject: [gentoo-dev] kernelmod-rebuild-0.1
Date: Wed, 03 Dec 2003 06:43:01
Message-Id: 1070433773.21867.107.camel@garath
1 [Also posted to gentoo-user and forum]
3 In order to scratch an itch that I've been having with either a new
4 kernel install or a recompilation of a kernel with a new config and
5 forgetting packages that installed kernel modules, I've created
6 kernelmod-rebuild to assist in the process of rebuilding packages.
8 This script is based on revdep-rebuild (i.e. I started with it and
9 changed it to do what I want) but instead of looking for broken library
10 dependencies, it looks for packages that have installed kernel modules.
12 What this script does is locate the packages that have installed modules
13 into /lib/modules, determines which ebuilds to rebuild based on that
14 list and rebuilds them.
16 What this script doesn't do is locate the packages such as vmware that
17 installed modules outside of the emerge process (since portage is
18 unaware of those modules). Unfortunately, you will still have to
19 remember to rerun the configuration process for those packages.
21 Here is the usage statement from the script
23 garath root # kernelmod-rebuild --help
24 Usage: /usr/bin/kernelmod-rebuild [OPTIONS] [--] [EMERGE_OPTIONS]
26 Rebuild packages that have installed kernel modules
28 -X, --package-names recompile based on package names, not exact versions
29 -q, --quiet be less verbose
31 Calls emerge, all other options are used for it (e. g. -p, --pretend).
32 Here is a sample run of the script on my system:
34 garath root # kernelmod-rebuild --package-names --quiet --pretend --verbose
36 Finding packages which install kernel modules...
37 Packages will be recompiled.
39 Collecting list of packages to rebuild... done.
41 Cleaning list of packages to rebuild... done.
43 Evaluating package order... done.
45 All prepared. Starting rebuild...
47 These are the packages that I would merge, in order:
49 Calculating dependencies ...done!
50 [ebuild R ] media-sound/alsa-driver-0.9.8 -oss
51 [ebuild R ] media-video/nvidia-kernel-1.0.4496-r3
53 Now you can remove -p (or --pretend) from arguments and re-run kernelmod-rebuild.
54 This script is useful for when you decide to try out the latest
55 test-kernel, but can't remember all of the packages that you've
56 installed that build modules. It is also useful when you make changes
57 to your kernel config and recompiled that kernel (as that can
58 occasionally break modules depending upon what you changed).
60 The ebuild for this script is located at
63 To install the ebuild, download the tar file and extract it to your
64 portage overlay directory. For example, I have set the variable
65 PORTDIR_OVERLAY in my make.conf file to /usr/local/portage. Here is how
66 I installed the package on my machine:
68 garath root # cd /usr/local/portage
69 garath portage # wget
70 garath portage # tar xvzf kernelmod-rebuild-0.1.ebuild.tar.gz
71 garath portage # rm kernelmod-rebuild-0.1.ebuild.tar.gz
72 garath portage # emerge -pv kernelmod-rebuild
73 garath portage # emerge -v kernelmod-rebuild
75 If you are on a different architecture than x86, you either need to edit
76 the ebuild or set ACCEPT_KEYWORDS="~arch" as I have marked those
77 architectures unstable/testing since I don't have machines to test on.
78 It should work properly, but I couldn't test it :)
80 If you want to report a bug, either reply to this thread or send me an
81 email to the address listed in the man page.
83 Finally, I have submitted the ebuild to bugzilla (bug# 34921)
84 <> with the request that
85 the script be included in the gentoolkit package. Hopefully, it will be
86 accepted as part of the toolkit, but even if it isn't, I hope that some
87 of you can find it useful.
89 Regards,
90 Paul
92 --
93 gentoo-dev@g.o mailing list


Subject Author
Re: [gentoo-dev] kernelmod-rebuild-0.1 "Philippe Lafoucrière" <lafou@×××××××.fr>
Re: [gentoo-dev] kernelmod-rebuild-0.1 William Kenworthy <billk@×××××××××.au>
Re: [gentoo-dev] kernelmod-rebuild-0.1 Markus Nigbur <pYrania@g.o>
Re: [gentoo-dev] kernelmod-rebuild-0.1 Paul Varner <gentoo-dev@××××××××××××.org>