Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238655 - source /etc/profile breaks $PATH
Summary: source /etc/profile breaks $PATH
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks: kdeprefix
  Show dependency tree
 
Reported: 2008-09-25 14:00 UTC by Christos Stamatopoulos
Modified: 2009-05-25 23:26 UTC (History)
0 users

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 Christos Stamatopoulos 2008-09-25 14:00:41 UTC
So here it is.Starting as root we see the $PATH and then what happens with source /etc/profile 
 
 
Code:
  root # $PATH 
 bash: /sbin:/bin:/usr/sbin:/usr/bin: No such file or directory 
 root # source /etc/profile 
 root # $PATH 
 bash: /usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.1:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin: No such file or directory 
 
   The /usr/sbin is gone and the /usr/kde/3.5/bin is added
 
 I exit and check the $PATH in my user then go back to root 
 
Code:
  root # exit 
 exit 
 xerion ~ $ $PATH 
 bash: /usr/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.1:/usr/bin:/usr/qt/3/bin: No such file or directory 
 xerion ~ $ su 
 Password:
   
 
 Now everything is back to normal having the /usr/sbin/
 
Code:
  root # $PATH 
 bash: /sbin:/bin:/usr/sbin:/usr/bin: No such file or directory
   
So the changed that source /etc/profile does are only for this session only which is weird and the thing that i lose and get other $PATH does not look good

I have read about problems with $PATH when you had another KDE slotted. This is a new gentoo installation with everything on ~amd64 and kde4 from kde-testing

Reproducible: Always
Comment 1 Christos Stamatopoulos 2008-09-25 23:44:46 UTC
I had a tar backup of my system without any DE so i used that to recover and try again. Tart backup is ~amd64

emerge -av @kdebase (its kde4 from kde-testing)
Login in to KDE there we go again the $PATH is messed up after a source /etc/profile

By the way this only happens when i am into KDE if i do it from a virtual terminal everything is ok.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-26 14:22:36 UTC
Please post your `emerge --info' and the output of `emerge -vp @kdebase'.
Comment 3 Christos Stamatopoulos 2008-09-30 23:49:52 UTC
Here is the info that you asked for. I was thinking that it had to do something with the unstable branch so i moved to stable branch but still use gcc 4.3.1 and of course kde from kde-testing.I still have the same problems..

$emerge --info                                                    

WARNING: repository at /usr/portage/local is missing a repo_name entry          
 * Overlay eclasses override eclasses from PORTDIR:                             
 *                                                                              
 *   '/usr/portage/local/layman/kde-testing/eclass/kde4-base.eclass'            
 *   '/usr/portage/local/layman/kde-testing/eclass/kde4-functions.eclass'       
 *   '/usr/portage/local/layman/kde-testing/eclass/kde4-meta.eclass'            
 *                                                                              
 * It is best to avoid overriding eclasses from PORTDIR because it will         
 * trigger invalidation of cached ebuild metadata that is distributed with      
 * the portage tree. If you must override eclasses from PORTDIR then you        
 * are advised to add FEATURES="metadata-transfer" to /etc/make.conf and to     
 * run `emerge --regen` after each time that you run `emerge --sync`. Set       
 * PORTAGE_ECLASS_WARNING_ENABLE="0" in /etc/make.conf if you would like to     
 * disable this warning.                                                        
Portage 2.2_rc11 (default/linux/amd64/2008.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r7 x86_64)                                               
=================================================================               
System uname: Linux-2.6.25-gentoo-r7-x86_64-Intel-R-_Core-TM-2_CPU_T7200_@_2.00GHz-with-glibc2.2.5                                                              
Timestamp of tree: Mon, 29 Sep 2008 10:45:01 +0000                              
app-shells/bash:     3.2_p33                                                    
dev-java/java-config: 1.3.7, 2.1.6                                              
dev-lang/python:     2.4.4-r13, 2.5.2-r7                                        
dev-python/pycrypto: 2.0.1-r6                                                   
sys-apps/baselayout: 2.0.0                                                      
sys-apps/openrc:     0.2.5                                                      
sys-apps/sandbox:    1.2.18.1-r2                                                
sys-devel/autoconf:  2.13, 2.61-r2                                              
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1               
sys-devel/binutils:  2.18-r3                                                    
sys-devel/gcc-config: 1.4.0-r4                                                  
sys-devel/libtool:   1.5.26                                                     
virtual/os-headers:  2.6.23-r3                                                  
ACCEPT_KEYWORDS="amd64"                                                         
CBUILD="x86_64-pc-linux-gnu"                                                    
CFLAGS="-march=core2 -O2 -pipe"                                                 
CHOST="x86_64-pc-linux-gnu"                                                     
CONFIG_PROTECT="/etc /usr/env /usr/share/config /usr/shutdown"                  
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"                                           
CXXFLAGS="-march=core2 -O2 -pipe"                                               
DISTDIR="/usr/portage/distfiles"                                                
FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"                                                
GENTOO_MIRRORS="ftp://mirror.pacific.net.au/linux/Gentoo                 ftp://ftp.swin.edu.au/gentoo"                                                          
LDFLAGS="-Wl,-O1"                                                               
LINGUAS="en el"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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"
PORTDIR_OVERLAY="/usr/portage/local/layman/kde-testing /usr/portage/local"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="X a52 aac aalib accesibility acl acpi alsa amd64 apache apm arts bash-completion berkdb bluetooth branding bzip2 cairo cddb cdr cli cracklib crypt cups dbus doc dri dts dv dvb dvd dvdr dvdread eds emboss encode esd evo fam fastcgi fbcon ffmpeg firefox flac ftp gdbm gif gpm gstreamer gtk hal iconv ieee1394 ipod ipv6 isdnlog java javascript joystick jpeg kde kerberos lame ldap libnotify lirc mad matroska matrox midi mikmod mime mmx motif mozilla mp3 mpeg mplayer msn mudflap multilib musepack ncurses nls nptl nptlonly nvidia ogg opengl openmp oss pam pcmcia pcre pda pdf perl png ppds pppd python qdbm qt3 qt3support qt4 quicktime readline reflection samba sdl session smartcard speex spell spl sse sse2 sse3 ssl startup-notification svg sysfs tcpd theora threads tiff truetype unicode usb v4l v4l2 vcd verbose vorbis wifi xcomposite xine xinerama xml xorg xscreensaver xv xvid zlib" ALSA_CARDS="snd-hda-intel" 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="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en el" LIRC_DEVICES="mceusb2" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


$ emerge -vp @kdebase


WARNING: repository at /usr/portage/local is missing a repo_name entry
 * Overlay eclasses override eclasses from PORTDIR:                   
 *                                                                    
 *   '/usr/portage/local/layman/kde-testing/eclass/kde4-base.eclass'  
 *   '/usr/portage/local/layman/kde-testing/eclass/kde4-functions.eclass'
 *   '/usr/portage/local/layman/kde-testing/eclass/kde4-meta.eclass'     
 *                                                                       
 * It is best to avoid overriding eclasses from PORTDIR because it will  
 * trigger invalidation of cached ebuild metadata that is distributed with
 * the portage tree. If you must override eclasses from PORTDIR then you  
 * are advised to add FEATURES="metadata-transfer" to /etc/make.conf and to
 * run `emerge --regen` after each time that you run `emerge --sync`. Set  
 * PORTAGE_ECLASS_WARNING_ENABLE="0" in /etc/make.conf if you would like to
 * disable this warning.                                                   

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] kde-base/libkworkspace-4.1.1  USE="-debug -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/libkonq-4.1.1  USE="-debug -kdeprefix -test" 0 kB [1]
[ebuild   R   ] kde-base/libtaskmanager-4.1.1  USE="xcomposite -debug -kdeprefix" 0 kB [1]                                                                      
[ebuild   R   ] kde-base/kdebase-data-4.1.1-r1  USE="-kdeprefix" 0 kB [1]       
[ebuild   R   ] kde-base/kdesu-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0 kB [1]                                                                            
[ebuild   R   ] kde-base/ksplash-4.1.1  USE="mmx sse sse2 xinerama -3dnow (-altivec) -debug -kdeprefix" 0 kB [1]                                                
[ebuild   R   ] kde-base/solid-4.1.1  USE="bluetooth -kdeprefix -networkmanager -test" 0 kB [1]                                                                 
[ebuild   R   ] kde-base/kstyles-4.1.1  USE="-kdeprefix" 0 kB [1]               
[ebuild   R   ] kde-base/kde-wallpapers-4.1.1  USE="-kdeprefix" 0 kB [1]        
[ebuild   R   ] kde-base/knotify-4.1.1  USE="-debug -kdeprefix" 0 kB [1]        
[ebuild   R   ] kde-base/kstartupconfig-4.1.1  USE="-debug -kdeprefix" 0 kB [1] 
[ebuild   R   ] kde-base/kwin-4.1.1  USE="opengl xcomposite xinerama -captury -debug -kdeprefix" 0 kB [1]                                                       
[ebuild   R   ] kde-base/kcheckpass-4.1.1  USE="pam -kdeprefix" 0 kB [1]        
[ebuild   R   ] kde-base/kde-menu-icons-4.1.1  USE="-kdeprefix" 0 kB [1]        
[ebuild   R   ] kde-base/kcontrol-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0 kB [1]                                                                         
[ebuild   R   ] kde-base/kreadconfig-4.1.1  USE="-debug -kdeprefix" 0 kB [1]    
[ebuild   R   ] kde-base/kurifilter-plugins-4.1.1  USE="-debug -kdeprefix" 0 kB [1]                                                                             
[ebuild   R   ] kde-base/nepomuk-4.1.1  USE="-debug -kdeprefix" 0 kB [1]        
[ebuild   R   ] kde-base/kdialog-4.1.1  USE="-debug -kdeprefix" 0 kB [1]        
[ebuild   R   ] kde-base/kuiserver-4.1.1  USE="-debug -kdeprefix" 0 kB [1]      
[ebuild   R   ] kde-base/khelpcenter-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0 kB [1]                                                                      
[ebuild   R   ] kde-base/kinfocenter-4.1.1  USE="ieee1394 opengl -debug -htmlhandbook -kdeprefix" 0 kB [1]                                                      
[ebuild   R   ] kde-base/kappfinder-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0 kB [1]                                                                       
[ebuild   R   ] kde-base/kcmshell-4.1.1  USE="-debug -kdeprefix" 0 kB [1]       
[ebuild   R   ] kde-base/ksystraycmd-4.1.1  USE="-debug -kdeprefix" 0 kB [1]    
[ebuild   R   ] kde-base/kstart-4.1.1  USE="-debug -kdeprefix" 0 kB [1]         
[ebuild   R   ] kde-base/kdebugdialog-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0 kB [1]                                                                     
[ebuild   R   ] kde-base/kioclient-4.1.1  USE="-debug -kdeprefix" 0 kB [1]      
[ebuild   R   ] kde-base/kfile-4.1.1  USE="-debug -kdeprefix" 0 kB [1]          
[ebuild   R   ] kde-base/kiconfinder-4.1.1  USE="-debug -kdeprefix" 0 kB [1]    
[ebuild   R   ] kde-base/solid-hardware-4.1.1  USE="-debug -kdeprefix" 0 kB [1] 
[ebuild   R   ] kde-base/kwrite-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0 kB [1]                                                                           
[ebuild   R   ] kde-base/phonon-xine-4.1.1  USE="xcb -debug -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/drkonqi-4.1.1  USE="-debug -kdeprefix" 0 kB [1]        
[ebuild   R   ] kde-base/kmenuedit-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0 kB [1]                                                                        
[ebuild   R   ] kde-base/knetattach-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0 kB [1]                                                                       
[ebuild   R   ] kde-base/kdebase-cursors-4.1.1  USE="-kdeprefix" 0 kB [1]       
[ebuild   R   ] kde-base/kpasswdserver-4.1.1  USE="-debug -kdeprefix" 0 kB [1]  
[ebuild   R   ] kde-base/kde-menu-4.1.1  USE="-debug -kdeprefix" 0 kB [1]       
[ebuild   R   ] kde-base/konsole-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0 kB [1]                                                                          
[ebuild   R   ] kde-base/renamedlg-plugins-4.1.1  USE="-debug -kdeprefix" 0 kB [1]                                                                              
[ebuild   R   ] kde-base/ktimezoned-4.1.1  USE="-debug -kdeprefix" 0 kB [1]     
[ebuild   R   ] kde-base/kscreensaver-4.1.1  USE="opengl pam -debug -kdeprefix" 0 kB [1]                                                                        
[ebuild   R   ] kde-base/knewstuff-4.1.1  USE="-debug -kdeprefix" 0 kB [1]      
[ebuild   R   ] kde-base/kquitapp-4.1.1  USE="-debug -kdeprefix" 0 kB [1]       
[ebuild   R   ] kde-base/kmimetypefinder-4.1.1  USE="-debug -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/ktraderclient-4.1.1  USE="-debug -kdeprefix" 0 kB [1]  
[ebuild   R   ] kde-base/libplasma-4.1.1  USE="opengl xinerama -debug -kdeprefix -test" 0 kB [1]
[ebuild   R   ] kde-base/kcminit-4.1.1  USE="-debug -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/kdebase-kioslaves-4.1.1  USE="bzip2 samba -debug -htmlhandbook -kdeprefix -openexr" 0 kB [1]
[ebuild   R   ] kde-base/kfind-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/kdepasswd-4.1.1  USE="-debug -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/dolphin-4.1.1  USE="semantic-desktop -debug -htmlhandbook -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/soliduiserver-4.1.1  USE="-debug -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/systemsettings-4.1.1  USE="opengl usb xinerama -debug -htmlhandbook -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/khotkeys-4.1.1  USE="-debug -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/klipper-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0kB [1]
[ebuild   R   ] kde-base/keditbookmarks-4.1.1  USE="-debug -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/plasma-workspace-4.1.1  USE="xcomposite xinerama -debug -htmlhandbook -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/ksmserver-4.1.1  USE="-debug -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/plasma-apps-4.1.1  USE="-debug -htmlhandbook -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/konqueror-4.1.1  USE="-debug -htmlhandbook -kdeprefix"0 kB [1]
[ebuild   R   ] kde-base/kdm-4.1.1  USE="kerberos pam -debug -htmlhandbook -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/ksysguard-4.1.1  USE="-debug -htmlhandbook -kdeprefix -lm_sensors -test" 0 kB [1]
[ebuild   R   ] kde-base/nsplugins-4.1.1  USE="-debug -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/krunner-4.1.1  USE="opengl xcomposite xscreensaver -debug -kdeprefix" 0 kB [1]
[ebuild   R   ] kde-base/kdebase-startkde-4.1.1  USE="-kdeprefix" 0 kB [1]

Total: 67 packages (67 reinstalls), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/portage/local/layman/kde-testing
Comment 4 Christos Stamatopoulos 2008-10-01 02:52:07 UTC
Seems that more people have this problem and it is pinpointed to be related to kde4 
http://forums.gentoo.org/viewtopic-t-707043.html
Comment 5 Christos Stamatopoulos 2008-10-01 15:59:22 UTC
i uninstalled kde4 and went to a minimal kde3 installation to check things and everything is working as it should so i guess the problem is totally related to kde4
Comment 6 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2008-10-11 19:22:54 UTC
Please update to the latest versions of kdelibs and kdebase-startkde for both
3.5 and 4.1 versions and check if this still applies.
Comment 7 Christos Stamatopoulos 2008-10-12 00:54:32 UTC
I was talking with cryos the other day in the forums and everything seems to be ok both in both stable and ~amd64 that i tested.

However the /usr/kde/3.5/bin is not in the user $PATH until i source /etc/profile on my user which means that i cant run kde 3.5 programs. Should not this PATH be always there or not?
Everything is up to date on my side.
Comment 8 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2008-10-15 17:06:36 UTC
This is about 3.5 apps not working properly under kde4 with -kdeprefix (note to self).
This likely happens because 3.5 apps are hidden in a dir outside of path and 4.1.2 is available at /usr - culprit is the following line in the 4.1.2 startkde script:
export PATH=${_KDEDIR}/bin:$(echo ${PATH} | sed 's/$/:/g;s#/usr/kde/[^/]*/s\?bin/\?:##g;s/:$//g')
Comment 9 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2009-05-25 23:26:19 UTC
This is fixed with the new eclasses