Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 13524 - Broken KDE environment when both 3.0.5a and 3.1.0_rc6 installed
Summary: Broken KDE environment when both 3.0.5a and 3.1.0_rc6 installed
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-08 17:13 UTC by Peter Ruskin
Modified: 2003-05-28 10:25 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 Peter Ruskin 2003-01-08 17:13:07 UTC
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
Comment 1 Peter Ruskin 2003-01-31 08:05:12 UTC
I only have 3.1 installed now so I'm not bothered about this bug any more
Comment 2 Dan Armak (RETIRED) gentoo-dev 2003-02-01 12:57:04 UTC
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). 
Comment 3 Peter Ruskin 2003-02-01 13:14:02 UTC
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
Comment 4 Frédéric Magnard 2003-04-02 19:56:03 UTC
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.
Comment 5 Dan Armak (RETIRED) gentoo-dev 2003-04-16 12:10:24 UTC
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. 
 
Comment 6 Caleb Tennis (RETIRED) gentoo-dev 2003-05-28 10:25:13 UTC
It seems as though this bug wasn't really a bug, and seems to be fixed for the reporter.