Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54285 - config-kernel won't work from sudo (env-update must be in path)
Summary: config-kernel won't work from sudo (env-update must be in path)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: John Mylchreest (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-18 01:59 UTC by Marien Zwart (RETIRED)
Modified: 2004-10-09 11:22 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 Marien Zwart (RETIRED) gentoo-dev 2004-06-18 01:59:05 UTC
I tried to run config-kernel through sudo, and it failed with:
 * Error updating the environment!
This is caused by this line in /usr/lib/python2.3/site-packages/config_kernel/ck_env.py:
fromchild, tochild, childerror = os.popen3("env-update")
It seems to be expecting env-update to be in path, which is not the case when using sudo. It is probably ok to put in the full path here (/usr/sbin/env-update).

Reproducible: Always
Steps to Reproduce:
1. sudo config-kernel --output-dir default
Actual Results:  
 * Writing out changes to /etc/env.d/05kernel
 * Running env-update. You should run 'source /etc/profile' to update
 * your environment, or log out and in again.
 * Error updating the environment!


Expected Results:  
omit the last error message, successfully execute env-update.

I'll post emerge info in case it is useful in some weird way:

Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.6.7crystal)
=================================================================
System uname: 2.6.7crystal i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.4.16
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
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/lib/mozilla/defaults/pref
/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="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox userpriv"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo
ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/
ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="3dnow X aalib alsa apache2 avi berkdb cdr crypt dga emacs encode esd faad
fam fbcon fluidsynth gdbm gif gnome gpm gstreamer gtk gtk2 imap jack java
javascript jikes jpeg libcaca lufsusermount maildir mikmod mmx mng mozilla mpeg
msn ncurses nls nptl oggvorbis opengl pam pdflib png postgres python qt
quicktime readline sdl slang slp softmmu spell sse ssl tcpd tetex truetype
unicode usb x86 xml2 xosd xv zlib"
Comment 1 John Mylchreest (RETIRED) gentoo-dev 2004-10-09 11:22:19 UTC
config-kernel is up for re-write.
sorry for any trouble.