Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 33079 - 49kdedir-3.2.0 broken
Summary: 49kdedir-3.2.0 broken
Status: RESOLVED FIXED
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-11-09 08:08 UTC by Heinrich Wendel (RETIRED)
Modified: 2005-05-10 13:43 UTC (History)
2 users (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 Heinrich Wendel (RETIRED) gentoo-dev 2003-11-09 08:08:29 UTC
It defines KDEDIR=/usr/kde/3.2, but since kde-env defines KDEDIRS=/usr, this overrides KDEDIR. Most apps work, but e.g. kopete fails to find it's plugins. So 49kdedir-3.2.0 should also define KDEDIRS not KDEDIR.

Also see: http://www.kde.org/areas/sysadmin/fsh.php
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2003-11-09 08:20:16 UTC
also: http://bugs.kde.org/show_bug.cgi?id=67668
Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2003-11-10 11:34:03 UTC
you tried running kbuildsycoca afterwards, right?
Comment 3 Caleb Tennis (RETIRED) gentoo-dev 2003-11-10 11:43:07 UTC
Seems like what we should do then is:

remove all instances of KDEDIR

Then do something like this in env.d: 

31kde -> KDEDIRS="$KDEDIRS:/usr/kde/3.1" 
32kde -> KDEDIRS="$KDEDIRS:/usr/kde/3.2"
99kde -> KDEDIRS="$KDEDIRS:/usr"

and get rid of other instances of setting KDEDIRS in the code.

What do you think?
Comment 4 Heinrich Wendel (RETIRED) gentoo-dev 2003-11-10 12:30:44 UTC
Yeah, that's what I would do. The only problem with this setup is that kde
3.1 will be before 3.2 and so 3.1 apps will be used although you are in 3.2.
But the same problem is if we reverse the order, then kde 3.2 apps will be
used in kde 3.1, any idea?
Comment 5 Caleb Tennis (RETIRED) gentoo-dev 2003-11-10 12:35:53 UTC
The apps themselves go into /usr, so that's okay.

But, kde's programs themselves are in /usr/kde/3.x

Perhaps it should be set at startkde time?
Comment 6 James Harlow (RETIRED) gentoo-dev 2003-11-10 12:41:03 UTC
The order of the libraries in ld.so.conf are significant, too.
Comment 7 Heinrich Wendel (RETIRED) gentoo-dev 2003-11-20 12:43:51 UTC
startkde time sounds good to me
Comment 8 Heinrich Wendel (RETIRED) gentoo-dev 2004-01-27 05:58:23 UTC
caleb: any news on this?
Comment 9 Caleb Tennis (RETIRED) gentoo-dev 2004-01-27 06:22:13 UTC
haven't even thought about it, :(
Comment 10 Paul de Vrieze (RETIRED) gentoo-dev 2004-01-27 06:57:34 UTC
I found that the existence of KDEDIRS=/usr/kde/3.1 somewhere will break kde-3.2 as it will try to find incompatible components from 3.1. /usr/kde/3.2 was not in KDEDIRS at all though, only /usr and /usr/kde/3.1
Comment 11 Derick Swanepoel 2004-02-07 03:52:31 UTC
The same kind of problem exists with 48kdepaths-3.2.0 vs. 49kdepaths-3.1.x, since the first bin dir in PATH determines which version of KDE's apps get run. This means you have to swap things around in /etc/env.d to change which kdm starts up...
Comment 12 Gregorio Guidi (RETIRED) gentoo-dev 2004-07-10 02:51:58 UTC
A brief summing up:
as I said in http://bugs.kde.org/show_bug.cgi?id=67668, since kde 3.0 the use
of KDEDIR and KDEDIRS has been regulated by this code:

From kdelibs/kdecore/kstandarddirs.cpp: 
 
     QString kdedirs = readEnvPath("KDEDIRS"); 
     if (!kdedirs.isEmpty()) 
     { 
         tokenize(kdedirList, kdedirs, ":"); 
     } 
     else 
     { 
         QString kdedir = readEnvPath("KDEDIR"); 
         if (!kdedir.isEmpty()) 
         { 
            kdedir = KShell::tildeExpand(kdedir); 
            kdedirList.append(kdedir); 
         } 
     } 
     kdedirList.append(KDEDIR); 
 
KDEDIR is a #define in kdelibs/config.h and contains the value of --prefix
(e. g. "/usr/kde/3.2")

This mean that on a Gentoo system, a kde app linked against kdelibs-3.2 
searches for its resources first in /usr (the value of KDEDIRS), then in
/usr/kde/3.2 (brought by "kdedirList.append(KDEDIR)"), while the KDEDIR
environment value is ignored.

So, the current situations is optimal for KDEDIRS: apps linked to 3.2 search
in /usr and /usr/kde/3.2, apps linked to 3.1 search in /usr and /usr/kde/3.1...

With respect to PATH: the values in /etc/env.d would make 3.2 always before 3.1 even in a 3.1 session, but this is corrected by the line
export PATH="/usr/kde/3.1/bin:${PATH}" in startkde.
So the only issue is for apps started on a command line in an old kde session
(the PATH coms only from /etc/env.d there), but this is not something 
unbearable.

The problems with loading plugins are probably due to old plugins being 
present in /usr, otherwise I can't explain why this is not a widespread issue.

In conclusion, I suggest that KDEDIRS be left as it is now, while I propose
to remove KDEDIR from both /etc/env.d (remove xxkdedir-3.x.x entirely) and startkde (remove the line "export KDEDIR="/usr/kde/x.x""), to avoid
confusion.

btw: QTDIR is not needed, too.
The only use of QTDIR and KDEDIR that I can see is when manually 
running ./configure for a qt/kde app. Normally kde-functions.eclass takes care
of setting them when compilation is done by portage.
Comment 13 Heinrich Wendel (RETIRED) gentoo-dev 2004-08-01 07:53:21 UTC
caleb, can you do as suggested?
Comment 14 Dan Armak (RETIRED) gentoo-dev 2004-11-20 09:20:20 UTC
It's true that QTDIR, KDEDIR only affect custom compilation. But for that they're quite useful. So perhaps we should keep them. There are scripts and apps that expect to see them set. And I think some people might be confused by them not being defined at all, rather than by them pointing to a KDE other than the one running at the moment.

What's the situation in other distros? Would people new to Gentoo expect to see QTDIR, KDEDIR set in modern environments?
Comment 15 Gregorio Guidi (RETIRED) gentoo-dev 2004-11-27 14:56:45 UTC
On this old SuSE I've got here, only QTDIR is set. IIRC debian and fedora
install kde in /usr, so it does not matter there.

Thinking a bit more about it, it seems reasonable to keep QTDIR. On the other
hand, kde devs more or less tried to deprecate KDEDIR in favor of KDEDIRS, and 
right now newer kde apps use `kde-config --prefix` during compilation. So it 
could make sense to remove KDEDIR.
Comment 16 Dan Armak (RETIRED) gentoo-dev 2004-11-29 11:47:52 UTC
OK, then I agree to remove $KDEDIR.
We just need to change kde.eclass & kde-functions.eclass not to use/set KDEDIR
- trivial. We could clean the little bits of kde2 code in there, too, since we 
no longer have a kdelibs2 ebuild :-)
Comment 17 Gregorio Guidi (RETIRED) gentoo-dev 2004-11-29 12:06:28 UTC
Wait, I meant that KDEDIR could be removed from /etc/env.d and from startkde,
I don't know if it's safe to remove it during compilation of kde apps...
Comment 18 Carsten Lohrke (RETIRED) gentoo-dev 2004-11-29 12:25:31 UTC
It's not only the eclasses. arts + kdelibs ebuilds have related code, too.
Comment 19 Dan Armak (RETIRED) gentoo-dev 2004-11-29 12:56:28 UTC
OK OK, sorry. Things do still use set-kdedir and friends. Slipped my mind for
a moment - I was thinking about making kde configure scripts rely on
kde-config exclusively, but we'd need set-kdedir for a ebuilds that aren't
fullblown kde apps anyway.
So we can remove it just from the environment.
(BTW arts & kdelibs don't really need it: arts only writes it to the env.d
file, and kdelibs merely uses the value set by set-kdedir, which is the same
as $PREFIX in its case.)
Comment 20 Heinrich Wendel (RETIRED) gentoo-dev 2004-12-29 10:24:36 UTC
so could you please fix it ;)
Comment 21 Dan Armak (RETIRED) gentoo-dev 2005-02-05 03:09:37 UTC
KDEDIRS is now limited to /usr (ie never include /usr/kde/x.y).
I'm removing KDEDIR from startkde for 3.4.0_beta2.
KDEDIR isn't set in env.d by KDE 3.4 and we've all agreed to remove it from 3.3
as well (env.d + startkde). 
Do we need new revisions of arts/kdelibs/kdebase 3.3 for this (which would
depend on one another)? Kind of a pity to force a big recompile for env.d
changes...
Comment 22 Gregorio Guidi (RETIRED) gentoo-dev 2005-02-05 05:51:52 UTC
> Do we need new revisions of arts/kdelibs/kdebase 3.3 for this (which would
> depend on one another)? Kind of a pity to force a big recompile for env.d
> changes...

I'm doing those in a couple of days. Together with the move to /usr/share/xsessions, and with a couple other fixes (see mail to kde@g.o I sent some time ago) the bump become worthy.
Comment 23 Dan Armak (RETIRED) gentoo-dev 2005-02-05 06:03:56 UTC
OK, then you'll include these changes in your new revs?
Comment 24 Gregorio Guidi (RETIRED) gentoo-dev 2005-02-05 06:16:54 UTC
> OK, then you'll include these changes in your new revs?

Yes. In the meantime I reviewed and fixed a lot of ebuilds to make sure they 
don't rely on KDEDIR being set... let's hope there are not many still 
around :)
Comment 25 Gregorio Guidi (RETIRED) gentoo-dev 2005-02-09 06:27:59 UTC
Eventually, this has been fixed in
arts-1.3.2-r1
kdelibs-3.3.2-r3
kdebase-3.3.2-r2

closing!
Comment 26 MickKi 2005-05-10 12:34:49 UTC
It seems that the ebuild for app-pda/plptools-0.12 is not fixed because it comes up with same error (also see bug 62245, http://bugs.gentoo.org/show_bug.cgi?id=62245)

================================
checking for Qt... libraries /usr/qt/3/lib, headers /usr/qt/3/include
checking if Qt compiles without flags... no
checking for moc... /usr/qt/3/bin/moc
checking for KDE version... 3.x
checking for rpath... yes
checking for KDE... configure: error: 
in the prefix, you've chosen, are no KDE headers installed. This will fail.
So, check this please and use another prefix!

!!! ERROR: app-pda/plptools-0.12 failed.
!!! Function src_compile, Line 35, Exitcode 1
!!! (no error message)
==================================

I am currently running:

kde-base/arts-1.3.2-r1
kde-base/kdelibs-3.3.2-r9
kde-base/kdebase-3.3.2-r2
and 
x11-libs/qt-3.3.4-r3

all tame, stable stuff.

Gregorio, would you mind please fixing this ebuild, too?
-- 
Regards,
Mick
Comment 27 Gregorio Guidi (RETIRED) gentoo-dev 2005-05-10 13:43:27 UTC
Thanks for noticing, I suggested a fix in bug 62245. I'm not touching the ebuilds currently in portage as they don't compile anyway at the moment, I'll leave them to their maintainers.