Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202031 - linux-info.eclass doesn't bail out on invalid kernel config and "line 200: [: too many arguments" error
Summary: linux-info.eclass doesn't bail out on invalid kernel config and "line 200: [:...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Miscellaneous
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-12 13:07 UTC by Carsten Lohrke (RETIRED)
Modified: 2010-01-10 09:14 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Lohrke (RETIRED) gentoo-dev 2007-12-12 13:07:32 UTC
*
  ERROR: Kernel configuration is invalid.
         include/linux/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

2.
  ERROR: Kernel configuration is invalid.
         include/linux/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

6.
  ERROR: Kernel configuration is invalid.
         include/linux/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

23
  ERROR: Kernel configuration is invalid.
         include/linux/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

-gentoo-r3
/usr/portage/eclass/linux-info.eclass: line 200: [: too many arguments
>>> Unpacking source...
>>> Unpacking iptables-1.3.8.tar.bz2 to /var/tmp/portage/net-firewall/iptables-1.3.8-r2/work
Comment 1 Luca Barbato gentoo-dev 2007-12-12 13:24:05 UTC
please give more details including emerge info and which package you are trying to merge.
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2007-12-12 14:52:56 UTC
/usr/src/linux pointed to a new kernel and I had made make oldconfig only, but didn't build it. If you read the pasted data again, you see which ebuild I did try to build.
Comment 3 Luca Barbato gentoo-dev 2007-12-12 15:14:03 UTC
> Kernel configuration is invalid.
> include/linux/autoconf.h or include/config/auto.conf are missing.
> Run 'make oldconfig && make prepare' on kernel src to fix it.

you forgot make prepare I'm afraid.
Comment 4 Carsten Lohrke (RETIRED) gentoo-dev 2007-12-12 18:48:41 UTC
(In reply to comment #3)
> you forgot make prepare I'm afraid.

Apparently, tell me something new... ;) Too hard to kindly check this and let the ebuild die properly, instead letting some warnings and and an eclass error flow by and then building iptables, without any further notice!?

I just stumbled about it, by looking at the lines, accidentally.
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2009-01-07 00:37:35 UTC
this line in linux-info.eclass:

[ ${test} ${operator} ${value} ] && return 0 || return 1

isn't valid, so the class will return 0 even on error.
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2009-01-07 01:26:05 UTC
which is caused by get_version returning the entire error message along with the version in ${KV_MAJOR} ${KV_MINOR} and ${KV_PATCH}.

pkg_setup() {
    get_version
    echo $KV_MAJOR
    echo $KV_MINOR
    echo $KV_PATCH
}

 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *
 *   ERROR: Kernel configuration is invalid.
 *          include/linux/autoconf.h or include/config/auto.conf are missing.
 *          Run 'make oldconfig && make prepare' on kernel src to fix it.
 *
 * 2.
 *   ERROR: Kernel configuration is invalid.
 *          include/linux/autoconf.h or include/config/auto.conf are missing.
 *          Run 'make oldconfig && make prepare' on kernel src to fix it.
 *
 * 6.
 *   ERROR: Kernel configuration is invalid.
 *          include/linux/autoconf.h or include/config/auto.conf are missing.
 *          Run 'make oldconfig && make prepare' on kernel src to fix it.
 *
 * 28
 *   ERROR: Kernel configuration is invalid.
 *          include/linux/autoconf.h or include/config/auto.conf are missing.
 *          Run 'make oldconfig && make prepare' on kernel src to fix it.
 *
 * -gentoo
ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. 2
ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. 6
ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. 28
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-01-10 09:14:56 UTC
Please retest with 1.79 of linux-info.eclass or newer.
The getfilevar_noexec logic should kick in for your case.