If there is an error in one of the files in /etc/modules.d, a run of modules-update will clear /etc/modprobe.conf Reproducible: Always Steps to Reproduce: 1. echo "q" > /etc/modules.d/test 2. modules-update 3. cat /etc/modprobe.conf 4. generate-modprobe.conf Actual Results: ----- /etc/modprobe.conf ----- ### This file is automatically generated by modules-update # # Please do not edit this file directly. If you want to change or add # anything please take a look at /etc/modules.conf and read # the manpage for modules-update. # ---------------- ------ Output of generate-modprobe.conf ------- modprobe: Invalid line 132 in /etc/modules.conf q ----------------------------------------------- Expected Results: The modules-update command should tell the user that is was impossible to update modprobe.conf due to errors in the file, and it should leave the old version. Portage 2.0.51-r2 (default-x86-2004.0, gcc-3.4.2, glibc-2.3.4.20041006-r0, 2.6.7 i686) ================================================================= System uname: 2.6.7 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.5.3 distcc 2.18 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-mtune=athlon-tbird -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mtune=athlon-tbird -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks sandbox" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ ftp://mirror.pudas.net/gentoo http://mirror.pudas.net/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X Xaw3d aalib acl alsa apm arts avi berkdb bitmap-fonts bluetooth bonobo cdparanoiai cdr crypt cups dvd emacs encode esd evo f77 foomaticdb gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml imlib irmc java jpeg kde libg++ libwww lirc mad maildir mikmod mmx motif mozilla mpeg nas ncurses network nls nptl offensive oggvorbis opengl oss pam pda pdflib perl png python qt quicktime readline ruby samba sdl slang spell ssl svga tcltk tcpd tetex truetype unicode x86 xine xml xml2 xmms xprint xv zlib"
HELP! I'm getting killed by this now. I Cannot figure out which file has the error so I don't know what to fix!! Was this report ever addressed? Possibly is's a duplicate of something else? gandalf etc # modules-update gandalf etc # cat modprobe.conf ### This file is automatically generated by modules-update # # Please do not edit this file directly. If you want to change or add # anything please take a look at /etc/modules.conf and read # the manpage for modules-update. # gandalf etc # gandalf etc # emerge info Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r9 i686) ================================================================= System uname: 2.6.11-gentoo-r9 i686 AMD Athlon(tm) XP 2500+ Gentoo Base System version 1.6.12 Python: dev-lang/python-2.3.5,dev-lang/python-2.2.3-r5 [2.3.5 (#1, May 19 2005, 09:16:33)] dev-lang/python: 2.3.5, 2.2.3-r5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.8.5-r3, 1.7.9-r1, 1.5, 1.9.5, 1.6.3, 1.4_p6 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X Xi aalib alsa apache2 audiofile avi berkdb bitmap-fonts caps cdr crypt cups curl dvd dvdr dvdread eds emboss encode esd fam flac fluidsynth foomaticdb fortran gd gdbm gif gimp gimpprint gnome gpm gstreamer gtk gtk2 guile i8x0 imagemagick imlib ipv6 jack jack-caps jack-tmpfs java jpeg kde ladcca ladspa libg++ libwww lirc mad mikmod mjpeg mmx motif mozcalendar mozilla mp3 mpeg mysql mythtv ncurses nls nptl nptlonly nvidia ogg oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline real scanner sdl slang sndfile spell sse ssl svga tcltk tcpd threads tiff transcode truetype truetype-fonts type1-fonts usb v4l v4l2 vorbis xine xml2 xmms xscreensaver xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY gandalf etc #
Hi, So in my case it appears that modules-update was failing since there were no install or remove commands in a file I was trying to add to the system over the last could of days. If I missed some documentation I apologize. man modules-update is pretty sparce about what files the command operates on or even looks at. Anyway I'm glad this bug report was here to help focus wher I should look. Thanks
I had totally forgot about this bug, but now that you wrote about it I decided to dig a little deeper. It seems that there actually isn't any bug in baselayout. modules-update actually checks the return value of generate-modprobe.conf, and correctly warns the user if an error is returned. However, generate-modprobe.conf calls kernel-2.4 modprobe to generate the file, used for the conversion. The old version of modprobe returns an error, if it cannot parse the modutils.conf file. However, generate-modprobe.conf does not check the exit code for modprobe, and therefore the warning is never presented to the user. I have created a patch for this, and checked that it actually works. I will attatch it to this bug.
Created attachment 60413 [details, diff] Patch to return error, if modprobe fails to generate a file
Klaus, please don
Klaus, please don´t reassign bugs back to bug wranglers, they won´t fix the problem.
Sorry about that. I did it because the error wasn't in baselayout anymore, but in Core system. So I figured it was the easiest way to get it correctly assigned.
patch looks good to me ... az ?
Quick peek looks fine.
Added a variation of the patch. thanks.