* Fri Jun 27 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.0.83-3

- fix kstandarddirs patch so /usr/libexec/kde4 is found (#453063)
This commit is contained in:
Kevin Kofler 2008-06-27 01:56:06 +00:00
parent 02df092e48
commit bc6266a63e
2 changed files with 57 additions and 24 deletions

View File

@ -1,7 +1,7 @@
diff -up kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp
--- kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs 2008-06-19 14:23:20.000000000 +0200
+++ kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp 2008-06-19 15:44:23.000000000 +0200
@@ -75,9 +75,12 @@ public:
diff -ur kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp kdelibs-4.0.83-kstandarddirs/kdecore/kernel/kstandarddirs.cpp
--- kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp 2008-06-18 14:42:26.000000000 +0200
+++ kdelibs-4.0.83-kstandarddirs/kdecore/kernel/kstandarddirs.cpp 2008-06-27 03:54:18.000000000 +0200
@@ -75,9 +75,12 @@
bool checkRestrictions : 1;
QMap<QByteArray, bool> restrictions;
QStringList xdgdata_prefixes;
@ -14,7 +14,7 @@ diff -up kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs kdelibs-4
// Directory dictionaries
QMap<QByteArray, QStringList> absolutes;
@@ -952,12 +955,63 @@ QStringList KStandardDirs::resourceDirs(
@@ -952,12 +955,63 @@
restrictionActive = true;
d->dataRestrictionActive = false; // Reset
}
@ -59,8 +59,8 @@ diff -up kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs kdelibs-4
+ }
+
+ // make sure we find the path where it's installed
+ // for non-config files, we want the installed path _first_, so /usr/share/kde4 takes precedence over /usr/share
+ if (strcmp("config", type)) {
+ // for non-config, non-exe files, we want the installed path _first_, so /usr/share/kde4 takes precedence over /usr/share
+ if (strcmp("config", type) && strcmp("exe", type)) {
+ if (!installdir.isEmpty()) {
+ bool ok = true;
+ foreach (const QString &s, candidates) {
@ -78,7 +78,7 @@ diff -up kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs kdelibs-4
if (!dirs.isEmpty())
{
bool local = true;
@@ -983,13 +1037,6 @@ QStringList KStandardDirs::resourceDirs(
@@ -983,55 +1037,47 @@
}
}
@ -92,18 +92,47 @@ diff -up kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs kdelibs-4
for (QStringList::ConstIterator pit = prefixList->begin();
pit != prefixList->end();
@@ -1009,6 +1056,10 @@ QStringList KStandardDirs::resourceDirs(
if ((local || testdir.exists()) && !candidates.contains(path))
candidates.append(path);
}
+ // UGLY HACK - forward porting Chris CHeney's HACK - Rex Dieter
+ if ( local && (!strcmp("config", type)))
+ candidates.append("/etc/kde/");
+ //
local = false;
++pit)
{
- if((*pit)!=installprefix||installdir.isEmpty())
- {
- for (QStringList::ConstIterator it = dirs.begin();
- it != dirs.end(); ++it)
- {
- if ( (*it).startsWith('%'))
- continue;
- QString path = realPath( *pit + *it );
- testdir.setPath(path);
- if (local && restrictionActive)
- continue;
- if ((local || testdir.exists()) && !candidates.contains(path))
- candidates.append(path);
- }
- local = false;
+ for (QStringList::ConstIterator it = dirs.begin();
+ it != dirs.end(); ++it)
+ {
+ if ( (*it).startsWith('%'))
+ continue;
+ QString path = realPath( *pit + *it );
+ testdir.setPath(path);
+ if (local && restrictionActive)
+ continue;
+ if ((local || testdir.exists()) && !candidates.contains(path))
+ candidates.append(path);
}
else
@@ -1021,17 +1072,21 @@ QStringList KStandardDirs::resourceDirs(
- else
- {
- // we have a custom install path, so use this instead of <installprefix>/<relative dir>
- testdir.setPath(installdir);
- if(testdir.exists() && ! candidates.contains(installdir))
- candidates.append(installdir);
- }
+ // UGLY HACK - forward porting Chris Cheney's HACK - Rex Dieter
+ if ( local && (!strcmp("config", type)))
+ candidates.append("/etc/kde/");
+ //
+ local = false;
}
}
@ -115,7 +144,8 @@ diff -up kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs kdelibs-4
- ok = false;
- break;
+ // for config files, we want the installed path _last_, so profiles take precedence
+ if (!strcmp("config", type)) {
+ // for exe files too, so /usr/libexec/kde4 takes precedence over /usr/bin
+ if (!strcmp("config", type) || !strcmp("exe", type)) {
+ QString installdir = installPath( type );
+ if (!installdir.isEmpty()) {
+ bool ok = true;
@ -134,7 +164,7 @@ diff -up kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs kdelibs-4
}
dirs = d->absolutes.value(type);
@@ -1500,6 +1555,7 @@ void KStandardDirs::addKDEDefaults()
@@ -1500,6 +1546,7 @@
{
localKdeDir = KShell::tildeExpand(localKdeDir);
addPrefix(localKdeDir);
@ -142,7 +172,7 @@ diff -up kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs kdelibs-4
}
#ifdef Q_WS_MACX
@@ -1558,6 +1614,7 @@ void KStandardDirs::addKDEDefaults()
@@ -1558,6 +1605,7 @@
localXdgDir = KShell::tildeExpand(localXdgDir);
addXdgConfigPrefix(localXdgDir);
@ -150,7 +180,7 @@ diff -up kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs kdelibs-4
for (QStringList::ConstIterator it = xdgdirList.begin();
it != xdgdirList.end(); ++it)
@@ -1606,6 +1663,7 @@ void KStandardDirs::addKDEDefaults()
@@ -1606,6 +1654,7 @@
localXdgDir = KShell::tildeExpand(localXdgDir);
addXdgDataPrefix(localXdgDir);

View File

@ -1,7 +1,7 @@
Summary: K Desktop Environment 4 - Libraries
Version: 4.0.83
Release: 2%{?dist}
Release: 3%{?dist}
%if 0%{?fedora} > 8
Name: kdelibs
@ -356,6 +356,9 @@ rm -rf %{buildroot}
%changelog
* Fri Jun 27 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.0.83-3
- fix kstandarddirs patch so /usr/libexec/kde4 is found (#453063)
* Wed Jun 25 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.83-2
- -common: move %{_kde4_docdir}/HTML/en/sonnet/ here (#341751)