The /etc/env.d files for KDE are not working correctly. When I'm running 3.1.0_rc6 KDEDIR=/usr/kde/3 for example, instead of /usr/kde/3.1. If I build a KDE app it links to the wrong library. I tried renumbering the /etc/env.d/kdelibs* and /etc/env.d/kdedir* to change the order but it didn't help. So that I can successfully switch in kdm between 3.0.5a and 3.1.0_rc6 sessions, I have the following rather dirty workaround ... but it does work! # mkdir /etc/env.d/.kde # cd /etc/env.d # mv 49kdelibs-3.1_rc6 /etc/env.d/.kde/ # mv 56kdedir-3.1_rc6 /etc/env.d/.kde/ # mv 57kdedir-3.0.5a /etc/env.d/.kde/ # mv 65kdelibs-3.0.5a /etc/env.d/.kde/ edit /usr/kde/3/bin/startkde: between # Gentoo part: and export PATH="/usr/kde/3/bin:${PATH}" add: sudo /bin/rm -f /etc/env.d/49kdelibs-3.1_rc6 sudo /bin/rm -f /etc/env.d/56kdedir-3.1_rc6 sudo /bin/cp /etc/env.d/.kde/57kdedir-3.0.5a /etc/env.d/ sudo /bin/cp /etc/env.d/.kde/65kdelibs-3.0.5a /etc/env.d/ sudo /usr/sbin/env-update . /etc/profile ( have to use sudo or it won't be done :-( ... said it was dirty ) edit /usr/kde/3.1/bin/startkde: between # Gentoo part: and export PATH="/usr/kde/3.1/bin:${PATH}" add: sudo /bin/rm -f /etc/env.d/65kdelibs-3.0.5a sudo /bin/rm -f /etc/env.d/57kdedir-3.0.5a sudo /bin/cp /etc/env.d/.kde/56kdedir-3.1_rc6 /etc/env.d/ sudo /bin/cp /etc/env.d/.kde/49kdelibs-3.1_rc6 /etc/env.d/ sudo /usr/sbin/env-update . /etc/profile
I only have 3.1 installed now so I'm not bothered about this bug any more
Well, if you could post here the contents of the env.d files installed by kde, we could at least check if they are correct. If they are the problem would have to be with the enf.d parsers (in baselayout).
49kdelibs-3.1_rc6: PATH=/usr/kde/3.1/bin ROOTPATH=/usr/kde/3.1/sbin:/usr/kde/3.1/bin LDPATH=/usr/kde/3.1/lib KDEDIRS=/usr/kde/3.1 CONFIG_PROTECT=/usr/kde/3.1/share/config 50kdedir-3.0.5a: KDEDIR=/usr/kde/3 56kdedir-3.1_rc6: KDEDIR=/usr/kde/3.1 65kdelibs-3.0.5a: PATH=/usr/kde/3/bin ROOTPATH=/usr/kde/3/bin LDPATH=/usr/kde/3/lib KDEDIRS=/usr/kde/3 CONFIG_PROTECT=/usr/kde/3/share/config
Hello, The env_update functions sort the files in /etc/env.d before processing them. And : [magnard@manix:/etc/env.d] grep KDEDIR * 40kdedir-2.2.2a:KDEDIR=/usr/kde/2 50kdedir-3.0.5a:KDEDIR=/usr/kde/3 56kdedir-3.1.1:KDEDIR=/usr/kde/3.1 65kdelibs-3.0.5a:KDEDIRS=/usr/kde/3 99kde-env:KDEDIRS=/usr Moreover, from kdelibs-3.1.1/kdecore/kstandarddirs.h : * @li KDEDIRS: This may set an additional number of directory prefixes to * search for resources. The directories should be seperated * by ':'. The directories are searched in the order they are * specified. * @li KDEDIR: Used for backwards compatibility. As KDEDIRS but only a single * directory may be specified. If KDEDIRS is set KDEDIR is * ignored. I removed the variable KDEDIRS from 65kdelibs-3.0.5a , reran env-update, and the problem was solved. Strangly, there is no kdelibs-3.1.1 . A ##kdelibs-3.1.1 file with ## greater than the older kdelibs *and* the right KDEDIRS variable should solve the problem, no ? Hope this helps... Fred.
I'm dreadfully sorry I didn't reply... Really... um.... Wrt comment 3: that's the scheme that should've been correct back when you posted it... Wrt comment 4: the 65kdelibs-4.0.5a file should not contain a KDEDIRS line. Upgrade to the latest kdelibs-3.0.x revision or just remove that line from the file. Then things will be OK. For reference here are my configs: lynx danarmak # grep KDE /etc/env.d/* /etc/env.d/50kdedir-3.0.5a:KDEDIR=/usr/kde/3 /etc/env.d/56kdedir-3.1.1:KDEDIR=/usr/kde/3.1 /etc/env.d/99kde-env:KDEDIRS=/usr Of course there might also be a file for kde2 which I don't have atm. It should have KDEDIR but not KDEDIRS.
It seems as though this bug wasn't really a bug, and seems to be fixed for the reporter.