Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 250302

Summary: media-sound/xfi-drivers: kernel sources accessed through /lib/modules/`uname -r`
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: QA CC: infernoid
Priority: High Keywords: QAcanfix
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 241950    
Attachments: Build log
updated ebuild to work with $KV_FULL instead of 'uname -r'
diff from previous ebuild
diff cleanup

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-12-08 16:33:57 UTC
This bug is being reported because this ebuild is currently trying to build against the kernel tree by accessing it through /lib/modules/`uname -r` instead than through /usr/src/linux like it should.

This is bad in many situations, like:

- livecd installs: the running kernel is the one from the livecd and is most
likely not the same the user is installing to;
- livecd chroot fixes: as above;
- generic chroot: running kernel comes from outside, as above;
- kernel updates: users most likely would want their system to have all the
modules ready _before_ restarting.

Please fix your ebuild to use /usr/src/linux.

Thanks,
Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-12-08 16:34:14 UTC
Created attachment 174649 [details]
Build log
Comment 2 Jochums Johannes 2009-03-07 15:29:27 UTC
suggestion on how to use '/usr/src/linux'
2 problems im having are:

 - http://linuxmafia.com/faq/Kernel/usr-src-linux-symlink.html
 (linus commenting on the use of /usr/src/linux)
 - stripping the 'linux-' prefix from /usr/src/linux symlink

MY_KV=`readlink /usr/src/linux` # read '/usr/src/linux' symbolic link
MY_KV=${MY_KV:6}                # strip 'linux-' prefix

sed -r -i       -e 's/KERNELDIR/KERNEL_DIR/g' \
                -e 's/CFLAGS/EXTRA_CFLAGS/g' \
                -e 's/\$\(shell uname -r\)/'$MY_KV'/g' \
                -e 's/`uname -r`/'$MY_KV'/' \
                Makefile
Comment 3 Peter Alfredsen (RETIRED) gentoo-dev 2009-03-07 15:35:43 UTC
I'm pretty sure we have to use one of the kernel eclasses to get this fixed 'properly'. I'll add the QACanFix to Keywords because I'm busy doing .NET stuff presently.
Comment 4 Jochums Johannes 2009-03-07 19:27:13 UTC
Created attachment 184262 [details]
updated ebuild to work with $KV_FULL instead of 'uname -r'

this is my first ebuild ... if i made a mistake pls contact me
Comment 5 Jochums Johannes 2009-03-07 19:33:52 UTC
Created attachment 184265 [details]
diff from previous ebuild
Comment 6 Jochums Johannes 2009-03-09 12:01:03 UTC
Created attachment 184443 [details]
diff cleanup
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2012-06-20 13:57:32 UTC
+  20 Jun 2012; Justin Lecher <jlec@gentoo.org> xfi-drivers-1.00.ebuild:
+  Don't use unmae -r to detmine KERNEL_DIR, #250302
+