One of the flags that I had with kernelmod-rebuild was a -S, --smart-rebuild flag which would only rebuild modules that were missing from /lib/modules. I just saw this on the gentoo-user list and it jogged my memory that module-rebuild had no such option. > The Gentoo newsletter mentioned the new module-rebuild script, > so I emerged it and ran it with the following results. > > # module-rebuild list > ** Packages which I will emerge are: > =media-libs/svgalib-1..21-r1 > =net-wireless/ieee80211-1.0.3-r2 > =net-wireless/ipw2100-1.1.2-r3 > > So I ran > > # module-rebuild rebuild > > and it seemed to rebuild the three packages in question. > > As a check, I then ran module-rebuild list again, and it > listed the same three modules as before. Reproducible: Always Steps to Reproduce: N/A Actual Results: N/A Expected Results: N/A pvarner@garath ~ $ emerge info Portage 2.0.53_rc6 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r2, 2.6.12-gentoo-r6 i686) ================================================================= System uname: 2.6.12-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz Gentoo Base System version 1.12.0_pre9 ccache version 2.4 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.13 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache cvs distlocks fixpackages sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.osuosl.org http://www.ibiblio.org/pub/linux/distributions/gentoo http://gentoo.mirrors.pair.com/" LINGUAS="en" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X acpi alsa apache2 arts artswrappersuid audiofile avi bash-completion berkdb bitmap-fonts cdr crypt cups curl dvd eds emboss encode fam fbcon flac foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 imagemagick imlib java javascript jpeg kde kdeenablefinal kdexdeltas libg++ libwww mad maildir mikmod mmx motif mp3 mpeg ncurses nls nptl nsplugin ogg oggvorbis opengl pam pdflib perl png ppds python qt quicktime readline samba sasl sdl spell sqlite sse ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts udev usb vorbis win32codecs xine xml2 xmms xscreensaver xv zlib linguas_en userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, MAKEOPTS
my problem here is that module-rebuild is actually doing the right thing, since even though s module might exist for the actual kernel version in question, the kernel image itself may have totally changed vermagic or a various collection of other situations. It is imo always best to rebuild a module, whether the file exists or not. the only more accurate test would be to load the module, but this isn't an option since it introduces stability questions. unfortunately, I cannot foresee this working. Any suggestions/code welcome.
I haven't had a chance to do code yet, but even if I did, it would have to be an off by default, you pick up the pieces if you have significantly changed your kernel type of thing.