Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 50535 - config-kernel error when /var/tmp/kernel-output doesn't exists.
Summary: config-kernel error when /var/tmp/kernel-output doesn't exists.
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: John Mylchreest (RETIRED)
Depends on:
Reported: 2004-05-09 04:45 UTC by Simone Gotti (RETIRED)
Modified: 2004-10-13 14:05 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Simone Gotti (RETIRED) gentoo-dev 2004-05-09 04:45:15 UTC
This is a problem with config-kernel.
I've noticed that the selected output dir (for example the default "/var/tmp/kernel-output") must be manually created by the user.

If it's not created then config-kernel will not create it but it'll give some errors.
For example when I was converting a pre installed kernel to the new output dir I'll get this error:

# config-kernel --make-koutput=/usr/src/linux-2.6.5
 * Changing kernel found in /usr/src/linux-2.6.5
 * to output to /var/tmp/kernel-output/2.6.5
 * You will lose all of your compiled files in /usr/src/linux-2.6.5
 * Hit Control C to cancel this now.
5 4 3 2 1
 * Backing up your .config file
 * Running 'make mrproper to clean your kernel tree (This make take a while)
Traceback (most recent call last):
  File "/usr/bin/config-kernel", line 166, in ?
  File "/usr/bin/config-kernel", line 81, in main
  File "/usr/lib/python2.3/site-packages/config_kernel/", line 238, in makekoutput
OSError: [Errno 2] No such file or directory: '/var/tmp/kernel-output/2.6.5'

So I think that it'll be a good idea if kernel-config will create the output dir if it doesn't exists or at least ask for it but it must not exits in this way.


Reproducible: Always
Steps to Reproduce:
1. Be sure that /var/tmp/kernel-output doesn't exists.
2. config-kernel --output-dir=/var/tmp/kernel-output
3. config-kernel --make-koutput=/usr/src/linux-2.6.5

Actual Results:  
The program release an exception and exit. 

Expected Results:  
Create the output dir if it don't exists. 

Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040420-r0, 
System uname: 2.6.6-rc3-mm2 i686 AMD Athlon(tm) XP 2000+ 
Gentoo Base System version 1.4.10 
Autoconf: sys-devel/autoconf-2.59-r3 
Automake: sys-devel/automake-1.8.3 
CFLAGS="-mcpu=athlon-xp -O3 -pipe" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/kde/cvs/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe" 
FEATURES="autoaddcvs buildpkg ccache sandbox" 
USE="3dnow X aalib acl acpi acpi4linux alsa apm arts atm avi berkdb bluetooth 
breakme cdr cups dga directfb doc dvd dvdr encode esd fbcon foomaticdb gdbm 
gif gmp-java gpm gstreamer guile imlib ipv6 java jpeg kakasi kde kerberos ldap 
libg++ mad mikmod mmx motif mpeg mysql ncurses nls nptl oggvorbis opengl oss 
pam pdflib perl png postgres ppds python qt readline sdl slang spell sse ssl 
svga tcltk tcpd truetype usb x86 xml xml2 xmms xv zlib"
Comment 1 John Mylchreest (RETIRED) gentoo-dev 2004-05-10 10:08:02 UTC
appologies for introducing this bug.
there was a commit of the kernel-2 eclass which had a spurious DEPEND (config-kernel) which is right now, effectively useless for koutput.
the changes should hopefully being made properly in the near future so keep your eyes peeled :)

there will be an announcement in the GWN anyways to remind you.
for now please ignore all koutput features for config-kernel.
Comment 2 Simone Gotti (RETIRED) gentoo-dev 2004-05-10 10:44:50 UTC
Don't worry. :-)

By the way, after creating by hand the kernel-output dir all the features of config-kernel worked out of the box! I've emerged with no more sandbox violations the ipw2100 and the submount kernel modules.

So keep up the good work!

Comment 3 Mathias Hasselmann 2004-06-06 14:47:11 UTC
Also was hit by this bug. To avoid further user frustration, I'd suggest to modify line 238 of "". Currently it says "os.mkdir(outputpath)", which should be replaced by "os.makedirs(outputpath)": mkdir requires all parent directories to exists, whilest makedirs creates them, when needed.
Comment 4 John Mylchreest (RETIRED) gentoo-dev 2004-10-08 11:18:44 UTC
suspending until config-kernel kouput is ready for the wild.
Comment 5 Tor Klingberg 2004-10-13 14:05:35 UTC
Please fix this real soon. It is kind of disturbing since it whacks your /usr/src/linux structure without recreating it somewhere else. 

If, for some reason, you don't want to do this, then but a big warning on
saying koutput is not ready to be used yet.