Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250302 - media-sound/xfi-drivers: kernel sources accessed through /lib/modules/`uname -r`
Summary: media-sound/xfi-drivers: kernel sources accessed through /lib/modules/`uname -r`
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High QA (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: QAcanfix
Depends on:
Blocks: modules-uname
  Show dependency tree
 
Reported: 2008-12-08 16:33 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2012-06-20 13:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (xfi-drivers-1.00:20081208-000506.log,2.19 KB, text/plain)
2008-12-08 16:34 UTC, Diego Elio Pettenò (RETIRED)
Details
updated ebuild to work with $KV_FULL instead of 'uname -r' (xfi-drivers-1.00.ebuild,942 bytes, text/plain)
2009-03-07 19:27 UTC, Jochums Johannes
Details
diff from previous ebuild (diff,823 bytes, text/plain)
2009-03-07 19:33 UTC, Jochums Johannes
Details
diff cleanup (diff,477 bytes, text/plain)
2009-03-09 12:01 UTC, Jochums Johannes
Details

Note You need to log in before you can comment on or make changes to this bug.
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
+