Sync from devel:
* Thu Aug 28 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.1.0-8 - rewrite kstandarddirs patch to fix side effects (#459904 (KDEDIRS), #457633)
This commit is contained in:
parent
0a0f5836d5
commit
d9bc2a38ef
|
@ -1,171 +0,0 @@
|
||||||
diff -ur kdelibs-4.0.99/kdecore/kernel/kstandarddirs.cpp kdelibs-4.0.99-kstandarddirs/kdecore/kernel/kstandarddirs.cpp
|
|
||||||
--- kdelibs-4.0.99/kdecore/kernel/kstandarddirs.cpp 2008-07-09 15:28:22.000000000 +0200
|
|
||||||
+++ kdelibs-4.0.99-kstandarddirs/kdecore/kernel/kstandarddirs.cpp 2008-07-20 18:13:28.000000000 +0200
|
|
||||||
@@ -75,9 +75,12 @@
|
|
||||||
bool checkRestrictions : 1;
|
|
||||||
QMap<QByteArray, bool> restrictions;
|
|
||||||
QStringList xdgdata_prefixes;
|
|
||||||
+ QString localXdgdatahome;
|
|
||||||
QStringList xdgconf_prefixes;
|
|
||||||
+ QString localXdgconfhome;
|
|
||||||
|
|
||||||
QStringList prefixes;
|
|
||||||
+ QString localKdehome;
|
|
||||||
|
|
||||||
// Directory dictionaries
|
|
||||||
QMap<QByteArray, QStringList> absolutes;
|
|
||||||
@@ -953,12 +956,65 @@
|
|
||||||
restrictionActive = true;
|
|
||||||
d->dataRestrictionActive = false; // Reset
|
|
||||||
}
|
|
||||||
+ const QStringList *prefixList = 0;
|
|
||||||
+ QString home;
|
|
||||||
+ if (strncmp(type, "xdgdata-", 8) == 0)
|
|
||||||
+ {
|
|
||||||
+ prefixList = &(d->xdgdata_prefixes);
|
|
||||||
+ home=d->localXdgdatahome;
|
|
||||||
+ }
|
|
||||||
+ else if (strncmp(type, "xdgconf-", 8) == 0)
|
|
||||||
+ {
|
|
||||||
+ prefixList = &(d->xdgconf_prefixes);
|
|
||||||
+ home=d->localXdgconfhome;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ prefixList = &d->prefixes;
|
|
||||||
+ home=d->localKdehome;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
QStringList dirs;
|
|
||||||
dirs = d->relatives.value(type);
|
|
||||||
QString installdir = installPath( type );
|
|
||||||
QString installprefix = installPath("kdedir");
|
|
||||||
|
|
||||||
+ if(!home.isNull())
|
|
||||||
+ {
|
|
||||||
+ for (QStringList::ConstIterator it = dirs.begin();
|
|
||||||
+ it != dirs.end(); ++it)
|
|
||||||
+ {
|
|
||||||
+ if ( (*it).startsWith('%'))
|
|
||||||
+ continue;
|
|
||||||
+ QString path = realPath( home + *it );
|
|
||||||
+ testdir.setPath(path);
|
|
||||||
+ if (restrictionActive)
|
|
||||||
+ continue;
|
|
||||||
+ if (!candidates.contains(path))
|
|
||||||
+ candidates.append(path);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // make sure we find the path where it's installed
|
|
||||||
+ // we want the installed path _first_, so /usr/share/kde4 takes precedence over /usr/share
|
|
||||||
+ // except for config files, so profiles take precedence
|
|
||||||
+ // except for exe files too, so /usr/libexec/kde4 takes precedence over /usr/bin
|
|
||||||
+ if (strcmp("config", type) && strcmp("exe", type)) {
|
|
||||||
+ if (!installdir.isEmpty()) {
|
|
||||||
+ bool ok = true;
|
|
||||||
+ foreach (const QString &s, candidates) {
|
|
||||||
+ if (installdir.startsWith(s)) {
|
|
||||||
+ ok = false;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ if (ok) {
|
|
||||||
+ candidates.append(installdir);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (!dirs.isEmpty())
|
|
||||||
{
|
|
||||||
bool local = true;
|
|
||||||
@@ -984,45 +1040,34 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- const QStringList *prefixList = 0;
|
|
||||||
- if (strncmp(type, "xdgdata-", 8) == 0)
|
|
||||||
- prefixList = &(d->xdgdata_prefixes);
|
|
||||||
- else if (strncmp(type, "xdgconf-", 8) == 0)
|
|
||||||
- prefixList = &(d->xdgconf_prefixes);
|
|
||||||
- else
|
|
||||||
- prefixList = &d->prefixes;
|
|
||||||
|
|
||||||
for (QStringList::ConstIterator pit = prefixList->begin();
|
|
||||||
pit != prefixList->end();
|
|
||||||
++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
|
|
||||||
- {
|
|
||||||
- // 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- // make sure we find the path where it's installed
|
|
||||||
+ // find the installed path for all resource types
|
|
||||||
+ // some code expects it to always come last, so we list it again even if
|
|
||||||
+ // we had it already at the beginning
|
|
||||||
if (!installdir.isEmpty()) {
|
|
||||||
bool ok = true;
|
|
||||||
foreach (const QString &s, candidates) {
|
|
||||||
@@ -1501,6 +1546,7 @@
|
|
||||||
{
|
|
||||||
localKdeDir = KShell::tildeExpand(localKdeDir);
|
|
||||||
addPrefix(localKdeDir);
|
|
||||||
+ d->localKdehome=localKdeDir;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef Q_WS_MACX
|
|
||||||
@@ -1559,6 +1605,7 @@
|
|
||||||
|
|
||||||
localXdgDir = KShell::tildeExpand(localXdgDir);
|
|
||||||
addXdgConfigPrefix(localXdgDir);
|
|
||||||
+ d->localXdgconfhome=localXdgDir;
|
|
||||||
|
|
||||||
for (QStringList::ConstIterator it = xdgdirList.begin();
|
|
||||||
it != xdgdirList.end(); ++it)
|
|
||||||
@@ -1607,6 +1654,7 @@
|
|
||||||
|
|
||||||
localXdgDir = KShell::tildeExpand(localXdgDir);
|
|
||||||
addXdgDataPrefix(localXdgDir);
|
|
||||||
+ d->localXdgdatahome=localXdgDir;
|
|
||||||
|
|
||||||
for (QStringList::ConstIterator it = xdgdirList.begin();
|
|
||||||
it != xdgdirList.end(); ++it)
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
diff -ur kdelibs-4.1.0/kdecore/kernel/kstandarddirs.cpp kdelibs-4.1.0-kstandarddirs/kdecore/kernel/kstandarddirs.cpp
|
||||||
|
--- kdelibs-4.1.0/kdecore/kernel/kstandarddirs.cpp 2008-07-09 15:28:22.000000000 +0200
|
||||||
|
+++ kdelibs-4.1.0-kstandarddirs/kdecore/kernel/kstandarddirs.cpp 2008-08-29 00:07:51.000000000 +0200
|
||||||
|
@@ -996,7 +996,9 @@
|
||||||
|
pit != prefixList->end();
|
||||||
|
++pit)
|
||||||
|
{
|
||||||
|
- if((*pit)!=installprefix||installdir.isEmpty())
|
||||||
|
+ // "exe" never has a custom install path, and the check triggers
|
||||||
|
+ // a false positive due to the libexecdir patch
|
||||||
|
+ if((*pit)!=installprefix||installdir.isEmpty()||!strcmp("exe", type))
|
||||||
|
{
|
||||||
|
for (QStringList::ConstIterator it = dirs.begin();
|
||||||
|
it != dirs.end(); ++it)
|
||||||
|
@@ -1010,6 +1012,11 @@
|
||||||
|
if ((local || testdir.exists()) && !candidates.contains(path))
|
||||||
|
candidates.append(path);
|
||||||
|
}
|
||||||
|
+ // special-case "config" (forward porting Chris Cheney's
|
||||||
|
+ // hack) - we want /etc/kde after the local config paths
|
||||||
|
+ // and before the ones in /usr (including kde-profile)
|
||||||
|
+ if (local && !strcmp("config", type))
|
||||||
|
+ candidates.append("/etc/kde/");
|
||||||
|
local = false;
|
||||||
|
}
|
||||||
|
else
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Summary: K Desktop Environment 4 - Libraries
|
Summary: K Desktop Environment 4 - Libraries
|
||||||
Version: 4.1.0
|
Version: 4.1.0
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
|
|
||||||
%if 0%{?fedora} > 8
|
%if 0%{?fedora} > 8
|
||||||
Name: kdelibs
|
Name: kdelibs
|
||||||
|
@ -75,8 +75,8 @@ Patch12: kdelibs-4.1.0-xdg-menu.patch
|
||||||
Patch13: kdelibs-4.0.5-fedora-buildtype.patch
|
Patch13: kdelibs-4.0.5-fedora-buildtype.patch
|
||||||
# patch KStandardDirs to use %{_libexecdir}/kde4 instead of %{_libdir}/kde4/libexec
|
# patch KStandardDirs to use %{_libexecdir}/kde4 instead of %{_libdir}/kde4/libexec
|
||||||
Patch14: kdelibs-4.0.85-libexecdir.patch
|
Patch14: kdelibs-4.0.85-libexecdir.patch
|
||||||
# kstandarddirs changes: search /etc/kde, change handling of install locations
|
# kstandarddirs changes: search /etc/kde, find /usr/libexec/kde4
|
||||||
Patch18: kdelibs-4.0.99-kstandarddirs.patch
|
Patch18: kdelibs-4.1.0-kstandarddirs.patch
|
||||||
# revert a kinit patch which triggers an assertion failure in KComponentData
|
# revert a kinit patch which triggers an assertion failure in KComponentData
|
||||||
# (and its followup) (#455130)
|
# (and its followup) (#455130)
|
||||||
Patch19: kdelibs-4.0.98-revert-kinit-regression.patch
|
Patch19: kdelibs-4.0.98-revert-kinit-regression.patch
|
||||||
|
@ -377,6 +377,9 @@ rm -rf %{buildroot}
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 28 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.1.0-8
|
||||||
|
- rewrite kstandarddirs patch to fix side effects (#459904 (KDEDIRS), #457633)
|
||||||
|
|
||||||
* Mon Aug 25 2008 Than Ngo <than@redhat.com> 4.1.0-7
|
* Mon Aug 25 2008 Than Ngo <than@redhat.com> 4.1.0-7
|
||||||
- konsole doesn't write to utmp
|
- konsole doesn't write to utmp
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue