From 7e809b52f5c24db7114d1f77fd34f1a9b88dda6d Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Jun 25 2012 15:51:56 +0000 Subject: 1.7.90 --- diff --git a/.gitignore b/.gitignore index 596254d..843d8e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/akonadi-1.5.3.tar.bz2 /akonadi-1.7.2.tar.bz2 +/akonadi-1.7.90.tar.bz2 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 -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 - #include -@@ -29,6 +30,8 @@ - #include - #include - -+#include -+ - #include - #include - #include -@@ -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 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 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(); diff --git a/akonadi.spec b/akonadi.spec index a559a03..7c988d4 100644 --- a/akonadi.spec +++ b/akonadi.spec @@ -8,12 +8,12 @@ Summary: PIM Storage Service Name: akonadi -Version: 1.7.2 +Version: 1.7.90 Release: 1%{?dist} Group: System Environment/Libraries License: LGPLv2+ -URL: http://download.akonadi-project.org/ +URL: http://community.kde.org/KDE_PIM/Akonadi %if 0%{?snap} # git clone git://git.kde.org/akonadi # git archive --prefix=akonadi-%{version}/ master | bzip2 > akonadi-%{version}-%{snap}.tar.bz2 @@ -25,9 +25,6 @@ Source0: http://download.kde.org/stable/akonadi/src/akonadi-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ## upstream patches -# https://projects.kde.org/projects/kdesupport/akonadi/repository/revisions/992096665110674e8e9bc5be6e91c5b78249266e -# New cleanup in "akonadictl fsck" -Patch100: akonadi-cleanup_orphan_resources.patch %define mysql_conf_timestamp 20110629 @@ -76,8 +73,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %prep %setup -q -n akonadi-%{version} -%patch100 -p1 -b .cleanup_orphan_resources - %build mkdir -p %{_target_platform} @@ -178,6 +173,9 @@ fi %changelog +* Mon Jun 25 2012 Rex Dieter 1.7.90-1 +- 1.7.90 + * Sat Mar 31 2012 Rex Dieter 1.7.2-1 - 1.7.2 diff --git a/sources b/sources index f41fff9..fbee658 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c73bb835057a3ee07d37a4f7daaf7ecf akonadi-1.7.2.tar.bz2 +573c1750c9ebb1f70ad39109f518c915 akonadi-1.7.90.tar.bz2