rpms/kdelibs/devel kdelibs-4.0.99-kstandarddirs.patch, NONE, 1.1 kdelibs.spec, 1.349, 1.350 kdelibs-4.0.83-kstandarddirs.patch, 1.2, NONE
Kevin Kofler (kkofler)
fedora-extras-commits at redhat.com
Sun Jul 20 16:38:28 UTC 2008
- Previous message (by thread): rpms/klamav/devel .cvsignore, 1.5, 1.6 klamav.spec, 1.22, 1.23 sources, 1.5, 1.6 klamav-0.41.1-gcc43.patch, 1.1, NONE klamav-0.42-clamav093.patch, 1.2, NONE
- Next message (by thread): comps/po fr.po,1.12,1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: kkofler
Update of /cvs/pkgs/rpms/kdelibs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19008/devel
Modified Files:
kdelibs.spec
Added Files:
kdelibs-4.0.99-kstandarddirs.patch
Removed Files:
kdelibs-4.0.83-kstandarddirs.patch
Log Message:
* Sun Jul 20 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.0.99-3
- fix kstandarddirs patch to always append the installed location last, even if
it is already present earlier in the search path (#456004)
kdelibs-4.0.99-kstandarddirs.patch:
--- NEW FILE kdelibs-4.0.99-kstandarddirs.patch ---
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)
Index: kdelibs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdelibs/devel/kdelibs.spec,v
retrieving revision 1.349
retrieving revision 1.350
diff -u -r1.349 -r1.350
--- kdelibs.spec 19 Jul 2008 06:17:10 -0000 1.349
+++ kdelibs.spec 20 Jul 2008 16:37:44 -0000 1.350
@@ -2,7 +2,7 @@
Summary: K Desktop Environment 4 - Libraries
Version: 4.0.99
-Release: 2%{?dist}
+Release: 3%{?dist}
%if 0%{?fedora} > 8
Name: kdelibs
@@ -74,8 +74,8 @@
Patch13: kdelibs-4.0.5-fedora-buildtype.patch
# patch KStandardDirs to use %{_libexecdir}/kde4 instead of %{_libdir}/kde4/libexec
Patch14: kdelibs-4.0.85-libexecdir.patch
-# forward port kstandarddirs hack to search /etc/kde
-Patch18: kdelibs-4.0.83-kstandarddirs.patch
+# kstandarddirs changes: search /etc/kde, change handling of install locations
+Patch18: kdelibs-4.0.99-kstandarddirs.patch
# revert a kinit patch which triggers an assertion failure in KComponentData
# (and its followup) (#455130)
Patch19: kdelibs-4.0.98-revert-kinit-regression.patch
@@ -359,6 +359,10 @@
%changelog
+* Sun Jul 20 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.0.99-3
+- fix kstandarddirs patch to always append the installed location last, even if
+ it is already present earlier in the search path (#456004)
+
* Sat Jul 19 2008 Rex Dieter <rdieter at fedoraproject.org> 4.0.99-2
- use better fedora-buildtype patch from F-9 branch
--- kdelibs-4.0.83-kstandarddirs.patch DELETED ---
- Previous message (by thread): rpms/klamav/devel .cvsignore, 1.5, 1.6 klamav.spec, 1.22, 1.23 sources, 1.5, 1.6 klamav-0.41.1-gcc43.patch, 1.1, NONE klamav-0.42-clamav093.patch, 1.2, NONE
- Next message (by thread): comps/po fr.po,1.12,1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list