[packages/akonadi] - up to 1.12.0

arekm arekm at pld-linux.org
Thu Mar 27 08:19:22 CET 2014


commit c804c5a974215bb90154f018b4211361ac64b861
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Mar 27 08:19:18 2014 +0100

    - up to 1.12.0

 akonadi-cleanup_orphan_resources.patch | 114 ---------------------------------
 akonadi.spec                           |   8 +--
 2 files changed, 4 insertions(+), 118 deletions(-)
---
diff --git a/akonadi.spec b/akonadi.spec
index 09480ae..0010a62 100644
--- a/akonadi.spec
+++ b/akonadi.spec
@@ -3,15 +3,14 @@
 Summary:	Akonadi - The PIM Storage Service
 Summary(pl.UTF-8):	Akonadi - usługa przechowywania danych dla aplikacji PIM
 Name:		akonadi
-Version:	1.11.0
-Release:	3
+Version:	1.12.0
+Release:	1
 License:	GPL v2+
 Group:		X11/Applications
 Source0:	ftp://ftp.kde.org/pub/kde/stable/akonadi/src/%{name}-%{version}.tar.bz2
-# Source0-md5:	580361613d04b260f807b2a4df099eca
+# Source0-md5:	3fb6703072410534bce51bbc3e6aa6e4
 # svn co svn://anonsvn.kde.org/home/kde/trunk/kdesupport/akonadi/
 #Source0:	%{name}-%{version}-%{snap}.tar.bz2
-Patch0:		akonadi-cleanup_orphan_resources.patch
 URL:		http://pim.kde.org/akonadi/
 BuildRequires:	QtCore-devel >= %{qtver}
 BuildRequires:	QtDBus-devel >= %{qtver}
@@ -126,6 +125,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libakonadiprotocolinternals.so.*.*.*
 %attr(755,root,root) %{_libdir}/qt4/plugins/sqldrivers/libqsqlite3.so
 %{_datadir}/dbus-1/interfaces/org.freedesktop.Akonadi.AgentManager.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.Akonadi.Agent.Search.xml
 %{_datadir}/dbus-1/interfaces/org.freedesktop.Akonadi.Agent.Status.xml
 %{_datadir}/dbus-1/interfaces/org.freedesktop.Akonadi.NotificationManager.xml
 %{_datadir}/dbus-1/interfaces/org.freedesktop.Akonadi.NotificationSource.xml
diff --git a/akonadi-cleanup_orphan_resources.patch b/akonadi-cleanup_orphan_resources.patch
deleted file mode 100644
index 1398e79..0000000
--- a/akonadi-cleanup_orphan_resources.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-commit 992096665110674e8e9bc5be6e91c5b78249266e
-Author: David Faure <faure at kde.org>
-Date:   Fri Jan 20 00:23:55 2012 +0100
-
-    New cleanup in "akonadictl fsck": clean up orphan resources from the DB
-    
-    The only way this can ever happen is when hacking agentsrc and removing
-    resources from it (or removing the whole ~/.config). But then you get
-    dead collection trees in kmail, always red, always unusable, and this is
-    the only way to clean this up.
-
-diff --git a/server/src/storagejanitor.cpp b/server/src/storagejanitor.cpp
-index ea520a8..0e26596 100644
---- a/server/src/storagejanitor.cpp
-+++ b/server/src/storagejanitor.cpp
-@@ -21,6 +21,7 @@
- 
- #include "storage/datastore.h"
- #include "storage/selectquerybuilder.h"
-+#include "resourcemanager.h"
- 
- #include <akdbus.h>
- #include <akdebug.h>
-@@ -29,6 +30,8 @@
- #include <libs/protocol_p.h>
- #include <libs/xdgbasedirs_p.h>
- 
-+#include <agentmanagerinterface.h>
-+
- #include <QStringBuilder>
- #include <QtDBus/QDBusConnection>
- #include <QtSql/QSqlQuery>
-@@ -70,8 +73,11 @@ StorageJanitor::~StorageJanitor()
-   DataStore::self()->close();
- }
- 
--void StorageJanitor::check()
-+void StorageJanitor::check() // implementation of `akonadictl fsck`
- {
-+  inform( "Looking for resources in the DB not matching a configured resource..." );
-+  findOrphanedResources();
-+
-   inform( "Looking for collections not belonging to a valid resource..." );
-   findOrphanedCollections();
- 
-@@ -106,6 +112,43 @@ void StorageJanitor::check()
-   inform( "Consistency check done." );
- }
- 
-+void StorageJanitor::findOrphanedResources()
-+{
-+  SelectQueryBuilder<Resource> qbres;
-+  OrgFreedesktopAkonadiAgentManagerInterface iface(
-+      AkDBus::serviceName(AkDBus::Control),
-+      QLatin1String( "/AgentManager" ),
-+      QDBusConnection::sessionBus(),
-+      this
-+    );
-+  if (!iface.isValid()) {
-+      inform( QString::fromLatin1("ERROR: Couldn't talk to %1").arg(AkDBus::Control) );
-+      return;
-+  }
-+  const QStringList knownResources = iface.agentInstances();
-+  if (knownResources.isEmpty()) {
-+      inform( QString::fromLatin1("ERROR: no known resources. This must be a mistake?") );
-+      return;
-+  }
-+  akDebug() << "Known resources:" << knownResources;
-+  qbres.addValueCondition( Resource::nameFullColumnName(), Query::NotIn, QVariant(knownResources) );
-+  qbres.addValueCondition( Resource::idFullColumnName(), Query::NotEquals, 1 ); // skip akonadi_search_resource
-+  qbres.exec();
-+  //akDebug() << "SQL:" << qbres.query().lastQuery();
-+  const Resource::List orphanResources = qbres.result();
-+  if ( orphanResources.size() > 0 ) {
-+    QStringList resourceNames;
-+    foreach ( const Resource& resource, orphanResources ) {
-+        resourceNames.append(resource.name());
-+    }
-+    inform( QString::fromLatin1( "Found %1 orphan resources: %2" ).arg( orphanResources.size() ). arg( resourceNames.join(QLatin1String(",")) ) );
-+    foreach ( const QString& resourceName, resourceNames ) {
-+        inform( QString::fromLatin1( "Removing resource %1" ).arg( resourceName ) );
-+        ResourceManager::self()->removeResourceInstance( resourceName );
-+    }
-+  }
-+}
-+
- void StorageJanitor::findOrphanedCollections()
- {
-   SelectQueryBuilder<Collection> qb;
-@@ -137,7 +180,7 @@ void StorageJanitor::checkPathToRoot(const Akonadi::Collection& col)
-           + QLatin1Literal( ") belongs to a different resource than its parent." ) );
-     // can/should we actually fix that?
-   }
--  
-+
-   checkPathToRoot( parent );
- }
- 
-diff --git a/server/src/storagejanitor.h b/server/src/storagejanitor.h
-index afc79c6..be3442e 100644
---- a/server/src/storagejanitor.h
-+++ b/server/src/storagejanitor.h
-@@ -63,6 +63,11 @@ class StorageJanitor : public QObject
-     void inform( const QString &msg );
- 
-     /**
-+     * Look for resources in the DB not existing in reality.
-+     */
-+    void findOrphanedResources();
-+
-+    /**
-      * Look for collections belonging to non-existent resources.
-      */
-     void findOrphanedCollections();
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/akonadi.git/commitdiff/c804c5a974215bb90154f018b4211361ac64b861



More information about the pld-cvs-commit mailing list