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

Bug 118630

Summary: linux-info.eclass' get_version wrong test order
Product: Gentoo Linux Reporter: Carlo Marcelo Arenas Belon <carenas>
Component: EclassesAssignee: John Mylchreest (RETIRED) <johnm>
Status: RESOLVED FIXED    
Severity: minor    
Priority: High    
Version: 2005.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch which reorganizes the tests to ensure that all dependencies are covered previously

Description Carlo Marcelo Arenas Belon 2006-01-11 01:21:45 UTC
get_version, should check that the linux source directory is configured, before if starts trying to find out which version of the kernel it is using, as the tests it uses to find alternatives for KV_LOCAL include calling linux_chkconfig_string which calls getfilevar over the .config file which will fail with an assert if it is given a second parameter which references a file which doesn't exist, and which confuses the error message as shown below :

 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.15

 * getfilevar requires 2 variables, with the second a valid file.
 *    getfilevar <VARIABLE> <CONFIGFILE>
 * Could not find a usable .config in the kernel source directory.
 * Please ensure that /usr/src/linux points to a configured set of Linux sources

expected output :

 * Found kernel source directory:
 *     /usr/src/linux
 * Could not find a usable .config in the kernel source directory.
 * Please ensure that /usr/src/linux points to a configured set of Linux sources
Comment 1 Carlo Marcelo Arenas Belon 2006-01-11 01:23:50 UTC
Created attachment 76819 [details, diff]
patch which reorganizes the tests to ensure that all dependencies are covered previously
Comment 2 John Mylchreest (RETIRED) gentoo-dev 2006-03-03 14:03:46 UTC
thanks for spotting this, fixed in CVS.