Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 1477
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Portage team <dev-portage@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Avi Schwartz <avi@CFFtechnologies.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 1477 depends on: 3120 5477 Show dependency tree
Bug 1477 blocks: 2765 28846
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2002-04-02 14:11 0000
When you build modules which are not part of the kernel, for example the alsa
or
the pcmcia_cs modules, emerge should remove the previous version of a module
ONLY for the currently running kernel hierarchy and not from a different kernel
version.  In the current system, the modules are removed even from a different
kernel version causing problems when trying to boot using the other kernel.

------- Comment #1 From Daniel Robbins (RETIRED) 2002-04-03 23:39:30 0000 -------
yep, we need to fix this.

------- Comment #2 From Troy Dack 2002-10-23 21:11:53 0000 -------
This has been annoying me too and I have been manually copying

/lib/modules/<last-kernel-drivers were emerged against>

to a backup diirectory, performing the emerge and then restoring the directory.

I just had a thought, could CONFIG_PROTECT be used to protect /lib/modules/* ?

Thus prevent a re-emerge from deleting the previous emerge that was done against
a different kernel.

------- Comment #3 From SpanKY 2002-12-15 08:32:24 0000 -------
*** Bug 9561 has been marked as a duplicate of this bug. ***

------- Comment #4 From SpanKY 2002-12-15 08:32:37 0000 -------
*** Bug 12170 has been marked as a duplicate of this bug. ***

------- Comment #5 From SpanKY 2002-12-26 08:13:57 0000 -------
*** Bug 12690 has been marked as a duplicate of this bug. ***

------- Comment #6 From Martin Holzer (RETIRED) 2003-06-05 11:59:36 0000 -------
*** Bug 22177 has been marked as a duplicate of this bug. ***

------- Comment #7 From TGL 2003-09-16 14:59:35 0000 -------
I've proposed a portage patch that could fix this issue on bug #24990.

------- Comment #8 From Martin Holzer (RETIRED) 2003-09-21 03:45:27 0000 -------
*** Bug 29240 has been marked as a duplicate of this bug. ***

------- Comment #9 From A. Craig West 2003-09-27 17:25:49 0000 -------
I'm not really clear what SLOT's have to do with this problem It seems to
be something that is unique to kernel modules. I sort of like the CONFIG_PROTECT
idea, though.

------- Comment #10 From Peter Ruskin 2003-10-15 08:09:14 0000 -------
CONFIG_PROTECT seems to work for me.  I made a new kernel 2.4.23_pre6-gss-r1
and still had 2.4.22_pre2-gss.  The video directory was wiped from 2.4.22_pre2-gss

when I emerged nvidia-kernel.  I use:

env AUTOCLEAN="no" ACCEPT_KEYWORDS="~x86" emerge nvidia-kernel, so the 
env AUTOCLEAN="no" setting gets ignored.

...so I added CONFIG_PROTECT="/lib/modules" to /etc/make.conf and that seems
to do the trick.

BTW here's a useful script from Georgi that tells you which ebuilds are affected:

###############################################
#!/bin/sh
# /usr/local/bin/kernel-deps
# list the ebuilds that depend on kernel version.
# suggested by Georgi Georgiev <chutz@gg3.net>

for i in `grep -l ' /lib/modules/' /var/db/pkg/*/*/CONTENTS`; do
	ii=`dirname $i`;
	cat $ii/COUNTER; echo " $ii";
done | sort -n | cut -f5,6 -d/ | sed -e 's/^/>=/'
###############################################

------- Comment #11 From SpanKY 2003-10-27 15:20:28 0000 -------
*** Bug 32019 has been marked as a duplicate of this bug. ***

------- Comment #12 From Daniel Robbins (RETIRED) 2003-10-27 19:24:11 0000 -------
This needs to get fixed soon. This bug has been open for well over a year.

------- Comment #13 From Daniel Robbins (RETIRED) 2003-10-31 22:32:40 0000 -------
OK, I fixed this. /lib/modules is now "unmerge protected", which means that
nothing in /lib/modules will get unmerged (sorta like how config protection
works), but if you upgrade a module it won't get named ._cfg0000_nvidia.o
for example. This is actually a good approach since ebuilds like emu10k1
install a module *and* supporting tools. You wouldn't want to put each emu10k1
ebuild in a different SLOT since those supporting tools do overwrite each
other. This is a nice compromise that didn't require massive hacks, and should
fix all user problems.

This fix should show up in Portage 2.0.49-r17.

------- Comment #14 From Paul Varner 2003-12-03 08:50:21 0000 -------
I was doing some testing for Bug 34921 (A proposed script to rebuild third
party packages that supply kernel modules)  For the testing I installed portage
2.0.49-r18.  During my testing, modules were still removed from /lib/modules. 
Full test results are located at the above mentioned bug.  Is there something
that needs to go into make.globals or make.conf that I somehow missed when
upgrading? Here is the output from emerge info.  I will supply make.* files if
needed to determine what is wrong.

Portage 2.0.49-r18 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3,
2.4.22-gentoo-test-r1)
=================================================================
System uname: 2.4.22-gentoo-test-r1 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz
Gentoo Base System version 1.4.3.10
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc /etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu"
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="X acpi alsa arts avi berkdb cdr crypt cups dvd encode esd fbcon foomaticdb
gdbm gif gpm gtk gtk2 imlib java jpeg kde libg++ libwww mad mbox mikmod mmx
motif mozilla moznocompose moznoirc moznomail mpeg ncurses nls oggvorbis opengl
oss pam pda pdflib perl png ppds python qt quicktime readline sasl sdl slang
spell sse ssl svga tcltk tcpd truetype usb x86 xml2 xmms xv zlib"

------- Comment #15 From Paul Varner 2003-12-03 12:51:54 0000 -------
After searching and diff'ing through CVS, I have noticed that the fix isn't in
the source tarball that is downloaded and built.  The CVS header for the
current portage.py shows version 1.341 while, the CVS header for the fixed
version is 1.345  Do we have an idea which release the fixed portage.py will
actually make it into the source tarball? The information given in the previous
comments is misleading as it indicates that the fix is in 2.0.49-r18 when it
actually is not.

------- Comment #16 From SpanKY 2003-12-11 08:01:59 0000 -------
*** Bug 35587 has been marked as a duplicate of this bug. ***

------- Comment #17 From SpanKY 2004-01-10 13:54:09 0000 -------
*** Bug 37800 has been marked as a duplicate of this bug. ***

------- Comment #18 From Jakub Moc (RETIRED) 2005-06-04 00:37:24 0000 -------
*** Bug 94953 has been marked as a duplicate of this bug. ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug