kf5-config, startkde and bug 333793
Luca Beltrame
lbeltrame at kde.org
Sun Jul 6 09:49:22 UTC 2014
Hello,
I set out an attempt to fix bug 333793 [1] and to port kf5-config in
kdelibs4support to QCommandLineParser and QStandardPaths where possible.
The issue in the bug is that kf5-config --path lib misses ~/.local (XDG)
because basePrefixForResource (kstandarddirs.cpp) says (lines 244-250):
if (typeBa.startsWith("xdgconf") || typeBa == "config") {
return XdgConf;
} else if (typeBa == "exe" || typeBa == "lib") {
return KdePrefixes;
} else { // was: if (typeBa.startsWith("xdgdata") || typeBa == "data")
return XdgData;
}
The problem is, we're not using KdePrefixes anymore and thus --path lib is
broken in interesting ways. the most important being the impossibility of
sourcing env scripts in the user's $HOME (~/.local/env), which may break
some user customization (see the bug report).
The problem is also lies in startkde which uses that option to parse for env
scripts.
So, there are 2 possible solutions:
1. Fix KStandardDirs: I tried to dive into the coe but I really can't figure
out to fix this (I'm very naive where it comes to C++). Can someone familiar
with the code give me some pointers?
2. Fix startkde: in that other case, how can we reliably get the XDG local
dir (which is ~/.local in Linux by default but I would not assume that)?
[1] https://bugs.kde.org/show_bug.cgi?id=333793
P.S.: I have also a branch with the port of kf5-config to QCommandLineParser
and QStandardDirs where possible, I'll try to submit it for review ASAP.
--
Luca Beltrame - KDE Forums team
KDE Science supporter
GPG key ID: 6E1A4E79
More information about the Kde-frameworks-devel
mailing list