rev 10867 - in branches/kde4: cdbs packages/kdelibs/debian packages/kdelibs/debian/patches

Sune Vuorela pusling-guest at alioth.debian.org
Wed Jun 4 09:16:58 UTC 2008


Author: pusling-guest
Date: 2008-06-04 09:16:57 +0000 (Wed, 04 Jun 2008)
New Revision: 10867

Modified:
   branches/kde4/cdbs/kde.mk
   branches/kde4/packages/kdelibs/debian/changelog
   branches/kde4/packages/kdelibs/debian/patches/21_kstandarddirs_prefer_kde4apps.diff
Log:
configuration file handling as in kde3
Requires build system fixes and kstandarddirs rework.
The kstandarddirs rework also fixes kstandarddirs preferring kde3 data over kde4 data.


Modified: branches/kde4/cdbs/kde.mk
===================================================================
--- branches/kde4/cdbs/kde.mk	2008-06-04 09:12:40 UTC (rev 10866)
+++ branches/kde4/cdbs/kde.mk	2008-06-04 09:16:57 UTC (rev 10867)
@@ -3,7 +3,7 @@
 include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 include /usr/share/cdbs/1/rules/utils.mk
 
-DEB_CONFIG_INSTALL_DIR ?= /etc/kde4
+DEB_CONFIG_INSTALL_DIR ?= /usr/share/kde4/config
 
 DEB_COMPRESS_EXCLUDE = .dcl .docbook -license .tag .sty .el
 DEB_CMAKE_EXTRA_FLAGS += \

Modified: branches/kde4/packages/kdelibs/debian/changelog
===================================================================
--- branches/kde4/packages/kdelibs/debian/changelog	2008-06-04 09:12:40 UTC (rev 10866)
+++ branches/kde4/packages/kdelibs/debian/changelog	2008-06-04 09:16:57 UTC (rev 10867)
@@ -19,6 +19,13 @@
   * Drop 18_always_set_cmake_policy.diff patch - applied upstream.
   * Make kdelibs5-dev depend on libphonon-dev, KDE4Internal.cmake REQUIRES it.
 
+  +++ Changes by Sune Vuorela:
+
+  * Install config files in /usr/share/kde4/config
+  * Patch kstandarddirs to look in home, installpath, prefix/path  except when
+    config files, where home, /etc/kde4, prefix/path, installpath is
+    preferred. Patch developed in cooperation with fedora
+
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Thu, 29 May 2008 17:51:57 +0300
 
 kde4libs (4:4.0.80-1) experimental; urgency=low

Modified: branches/kde4/packages/kdelibs/debian/patches/21_kstandarddirs_prefer_kde4apps.diff
===================================================================
--- branches/kde4/packages/kdelibs/debian/patches/21_kstandarddirs_prefer_kde4apps.diff	2008-06-04 09:12:40 UTC (rev 10866)
+++ branches/kde4/packages/kdelibs/debian/patches/21_kstandarddirs_prefer_kde4apps.diff	2008-06-04 09:16:57 UTC (rev 10867)
@@ -1,18 +1,160 @@
---- a/kdecore/kernel/kstandarddirs.cpp
-+++ b/kdecore/kernel/kstandarddirs.cpp
-@@ -1018,8 +1018,13 @@
-                     break;
+Fix kstarndarddirs order more or less. Path by Sune Vuorela, later refined by fedora people (https://bugzilla.redhat.com/show_bug.cgi?id=447965)
+Hopefully soon pushed upstream.
+
+diff -ur kdelibs-4.0.80/kdecore/kernel/kstandarddirs.cpp kdelibs-4.0.80-kstandarddirs/kdecore/kernel/kstandarddirs.cpp
+--- kdelibs-4.0.80/kdecore/kernel/kstandarddirs.cpp	2008-05-21 13:08:57.000000000 +0200
++++ kdelibs-4.0.80-kstandarddirs/kdecore/kernel/kstandarddirs.cpp	2008-05-30 18:07:29.000000000 +0200
+@@ -77,9 +77,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;
+@@ -954,10 +957,62 @@
+                 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);
+ 
++	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
++        // for non-config files, we want the installed path _first_, so /usr/share/kde4 takes precedence over /usr/share
++        if (strcmp("config", type)) {
++            QString installdir = installPath( 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;
+@@ -983,13 +1038,6 @@
                  }
              }
+ 
+-            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();
+@@ -1007,22 +1055,30 @@
+                     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;
+             }
+         }
+ 
+         // make sure we find the path where it's installed
+-        QString installdir = installPath( type );
+-        if (!installdir.isEmpty()) {
+-            bool ok = true;
+-            foreach (const QString &s, candidates) {
+-                if (installdir.startsWith(s)) {
+-                    ok = false;
+-                    break;
++        // for config files, we want the installed path _last_, so profiles take precedence
++        if (!strcmp("config", type)) {
++            QString installdir = installPath( 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 (ok)
 -                candidates.append(installdir);
-+            if (ok) {
-+                if (candidates.isEmpty()) {
-+                    candidates.append(installdir);
-+                } else {
-+                    candidates.insert(1, installdir);
-+                }
-+            }
          }
  
          dirs = d->absolutes.value(type);
+@@ -1487,6 +1543,7 @@
+     {
+         localKdeDir = KShell::tildeExpand(localKdeDir);
+         addPrefix(localKdeDir);
++        d->localKdehome=localKdeDir;
+     }
+ 
+ #ifdef Q_WS_MACX
+@@ -1545,6 +1602,7 @@
+ 
+     localXdgDir = KShell::tildeExpand(localXdgDir);
+     addXdgConfigPrefix(localXdgDir);
++    d->localXdgconfhome=localXdgDir;
+ 
+     for (QStringList::ConstIterator it = xdgdirList.begin();
+          it != xdgdirList.end(); ++it)
+@@ -1593,6 +1651,7 @@
+ 
+     localXdgDir = KShell::tildeExpand(localXdgDir);
+     addXdgDataPrefix(localXdgDir);
++    d->localXdgdatahome=localXdgDir;
+ 
+     for (QStringList::ConstIterator it = xdgdirList.begin();
+          it != xdgdirList.end(); ++it)




More information about the pkg-kde-commits mailing list