Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 283932 - app-admin/eselect-1.2: "eselect env update" corrupts /etc/profile.env
Summary: app-admin/eselect-1.2: "eselect env update" corrupts /etc/profile.env
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2009-09-07 06:47 UTC by Mark Nowiasz
Modified: 2009-09-09 21:03 UTC (History)
0 users

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


Attachments
/etc/profile.env (profile.env,2.70 KB, text/plain)
2009-09-07 06:49 UTC, Mark Nowiasz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Nowiasz 2009-09-07 06:47:45 UTC
After trying to update xorg-server I've noticed that eselect opengl corrupts /etc/profile.env (at least at this machine, at home it didn't show these symptoms).

After using "eselect opengl set 1" (or 2, nvidia, opengl, whatever), the following line in /etc/profile.env is inserted:

export export=''

The context of the line:

export DISTCC_VERBOSE=''
export export=''
export EDITOR='vim'




Reproducible: Always

Steps to Reproduce:
1. eselect opengl set 1
2.
3.

Actual Results:  
See attached profile.env

Expected Results:  
A meaningful entry in profile.env

crusoe ~ # emerge --info
Portage 2.2_rc40 (default/linux/amd64/2008.0, gcc-4.4.1, glibc-2.10.1-r0, 2.6.30-gentoo-r6 x86_64)                                                                          
=================================================================                     
System uname: Linux-2.6.30-gentoo-r6-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E4500_@_2.20GHz-with-gentoo-2.0.1                                                                    
Timestamp of tree: Mon, 07 Sep 2009 05:45:02 +0000                                    
distcc 3.1 x86_64-pc-linux-gnu [enabled]                                              
ccache version 2.4 [enabled]                                                          
app-shells/bash:     4.0_p28                                                          
dev-java/java-config: 2.1.9                                                           
dev-lang/python:     2.6.2-r1, 3.1.1                                                  
dev-util/ccache:     2.4-r8                                                           
dev-util/cmake:      2.6.4-r2                                                         
sys-apps/baselayout: 2.0.1                                                            
sys-apps/openrc:     0.4.3-r3                                                         
sys-apps/sandbox:    2.1                                                              
sys-devel/autoconf:  2.13, 2.63-r1                                                    
sys-devel/automake:  1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11                                 
sys-devel/binutils:  2.19.1-r1                                                        
sys-devel/gcc-config: 1.4.1                                                           
sys-devel/libtool:   2.2.6a                                                           
virtual/os-headers:  2.6.30-r1                                                        
ACCEPT_KEYWORDS="amd64 ~amd64"                                                        
CBUILD="x86_64-pc-linux-gnu"                                                          
CFLAGS="-march=nocona -O2 -pipe"                                                      
CHOST="x86_64-pc-linux-gnu"                                                           
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind /var/lib/hsqldb"                                          
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"                            
CXXFLAGS="-O2 -pipe"                                                                  
DISTDIR="/usr/portage/distfiles"                                                      
FEATURES="assume-digests ccache distcc distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"      
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.mneisen.org/ http://de-mirror.org/distro/gentoo/ ftp://de-mirror.org/distro/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://mirror.jamit.de/gentoo/ http://mirror.netcologne.de/gentoo/ ftp://mirror.netcologne.de/gentoo/ "                                                                                    
LANG="de_DE.utf8"                                                                     
LDFLAGS="-Wl,-O1"                                                                     
LINGUAS="de"                                                                          
MAKEOPTS="-j9"                                                                        
PKGDIR="/usr/portage/packages"                                                        
PORTAGE_CONFIGROOT="/"                                                                
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                                    
PORTAGE_TMPDIR="/var/tmp"                                                             
PORTDIR="/usr/portage"                                                                
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"                                 
USE="3dnow X XFACE a52 aac aalib acl acpi aim alsa amd64 ao apache2 audiofile bash-completion bcmath blas bluetooth branding bsf bzip2 cairo calendar cddb cdparanoia cdr cli consolekit cracklib crypt cscope css ctype cups curl cxx dbus derby djvu dri dts dv dvb dvd dvdr dvdread encode enscript exif expat fam ffmpeg fftw firefox flac fontconfig foomaticdb fortran ftp gd gdbm geoip gif gimp git glut gmp gnuplot gnutls gpg gphoto2 gpm gps graphviz gsl gtk gzip hal htmlhandbook iconv icq icu idn imagemagick imap imlib innodb ipv6 isdnlog jabber java java6 javascript jbig jingle jpeg jpeg2k kde kontact kpathsea lame lapack lash latex lcms ldap libcaca libedit libnotify libsamplerate libwww lua lzo mad maildir mailwrapper matroska mhash mikmod mime mmap mmx mng modplug mp3 mpeg mpi mplayer msn mudflap multilib musepack musicbrainz mysql mysqli ncurses netcdf nls nntp nptl nptlonly nsplugin offensive ofx ogg openal openexr opengl openmp openssl osc oscar pam pcntl pcre pda pdf perl php plasma plotutils png policykit portaudio posix postgres ppd pppd python qt3 qt3support qt4 quicktime raw rdesktop readline reflection rss samba sasl scanner sdl session sharedext sharedmem shorten simplexml slang slp smp sndfile snmp soap sockets sox speex spell spl sql sse sse2 sse3 ssl startup-notification subversion suid svg sysfs syslog sysvipc szip taglib tcpd theora threads tidy tiff timidity tokenizer truetype unicode usb vcd videos vim-syntax vnc vorbis wavpack webkit wlm wmf x264 xattr xft xine xml xmlreader xmlrpc xmlwriter xorg xosd xpm xscreensaver xsl xulrunner xv xvid yahoo yaz zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Mark Nowiasz 2009-09-07 06:49:04 UTC
Created attachment 203339 [details]
/etc/profile.env

/etc/profile.env after using eselect opengl
Comment 2 Ulrich Müller gentoo-dev 2009-09-08 00:25:58 UTC
Does the bad entry also appear after an "eselect env update"?

If yes, is there any file in /etc/env.d/ containing a line like the following:
export=""
Comment 3 Mark Nowiasz 2009-09-08 06:50:18 UTC
(In reply to comment #2)
> Does the bad entry also appear after an "eselect env update"?

Yes, it does. Unfortunately..
 
> If yes, is there any file in /etc/env.d/ containing a line like the following:
> export=""

...there's no file with a broken export line in /etc/env.d/ :

---------------------------8<---------------------------------
crusoe ~ # find /etc/env.d/ | xargs grep -i export
/etc/env.d/02editor:export EDITOR="vim"
/etc/env.d/02local:export LANG="de_DE.utf8"
----------------------------->8----------------------
These are the only files containing any export lines.

In fact doing a broader search
------------------------8<----------------------------
find /etc -type f | xargs grep -i "export=" 2>/dev/null
------------------->8---------------------------------
Will only result in
/etc/profile.env:export export=''

Right now it looks to me like a bug in eselect..





Comment 4 Ulrich Müller gentoo-dev 2009-09-08 07:07:23 UTC
> ---------------------------8<---------------------------------
> crusoe ~ # find /etc/env.d/ | xargs grep -i export
> /etc/env.d/02editor:export EDITOR="vim"
> /etc/env.d/02local:export LANG="de_DE.utf8"
> ----------------------------->8----------------------
> These are the only files containing any export lines.

Delete the "export" from them and do "eselect env update" again, that should fix it. (And you should consider removing 02editor and calling "eselect editor set vim" instead.)

> Right now it looks to me like a bug in eselect..

Yes, probably it should be more robust.
Comment 5 Mark Nowiasz 2009-09-08 07:59:19 UTC
(In reply to comment #4)
> Delete the "export" from them and do "eselect env update" again, that should
> fix it. (And you should consider removing 02editor and calling "eselect editor
> set vim" instead.)

That did the trick :-) The culprit was 02local, now there's 
export LANG='de_DE.utf8'

where export export='' used to be.

> Yes, probably it should be more robust.

Strangely, this setup used to work for a couple of month here (and still works at home) - I guess an update to eselect changed something in the code.

Anyway, thank you for your help - I'm closing the bug now.

Comment 6 Ulrich Müller gentoo-dev 2009-09-08 08:33:24 UTC
> I'm closing the bug now.

env.eselect should not silently corrupt its output.
Therefore not fixed -> reopening.
Comment 7 Ulrich Müller gentoo-dev 2009-09-08 13:22:38 UTC
Fixed in SVN r641: <http://sources.gentoo.org/viewcvs.py/eselect?rev=641&view=rev>
Comment 8 Ulrich Müller gentoo-dev 2009-09-09 21:03:32 UTC
eselect-1.2.1 released.

Thank you for reporting the issue.