Bug 235285 - dev-util/oprofile-0.9.4 does not check kernel options, building something that can't work on my kernel
Bug#: 235285 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: minor Priority: P2
Resolution: FIXED Assigned To: spock@gentoo.org Reported By: zeev.tarantov@gmail.com
Component: Ebuilds
URL: 
Summary: dev-util/oprofile-0.9.4 does not check kernel options, building something that can't work on my kernel
Keywords:  
Status Whiteboard: 
Opened: 2008-08-20 12:06 0000
Description:   Opened: 2008-08-20 12:06 0000
The ebuild should verify that the kernel option CONFIG_OPROFILE is enabled ("m"
or "y"). Note it is available only when CONFIG_PROFILING=y.
The ebuild checks the version of my kernel, but not this.
Granted, there is a runtime check that tipped me off, but a warning at build
time could have saved me the hassle.

Reproducible: Always

Steps to Reproduce:
1. build oprofile on system where `grep 'CONFIG_OPROFILE=n'
/usr/src/linux/.config`
2. build succeeds.
3. opcontrol --init says it can't load module oprofile. get confused.

Actual Results:  
build succeeds.

opcontrol --init says it can't load module oprofile. get confused.


Expected Results:  
ebuild checks my kernel, warns me that I need to build this module for the
package to work. Does not prevent me from building package.

I'm using sys-kernel/gentoo-sources-2.6.26-r1 on latest ~x86, not that it
matters.

------- Comment #1 From Michal Januszewski 2008-08-20 19:09:11 0000 -------
Fixed in CVS :) Thanks for the useful suggestion.