[kdepim-runtime] upstream Ignore-items-with-empty-remote-ids-here patch

Rex Dieter rdieter at fedoraproject.org
Wed Sep 21 13:23:25 UTC 2011


commit b98cf70ea1c9a63034f74ac1f7ca7af42801bf5e
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Wed Sep 21 08:23:09 2011 -0500

    upstream Ignore-items-with-empty-remote-ids-here patch

 0001-Ignore-items-with-empty-remote-ids-here.patch |   36 ++++++++++++++++++++
 kdepim-runtime.spec                                |   10 +++++-
 2 files changed, 45 insertions(+), 1 deletions(-)
---
diff --git a/0001-Ignore-items-with-empty-remote-ids-here.patch b/0001-Ignore-items-with-empty-remote-ids-here.patch
new file mode 100644
index 0000000..2a8397d
--- /dev/null
+++ b/0001-Ignore-items-with-empty-remote-ids-here.patch
@@ -0,0 +1,36 @@
+From ccd67f3e65c9ffe32858ca521aa1e56a42b026af Mon Sep 17 00:00:00 2001
+From: Volker Krause <vkrause at kde.org>
+Date: Tue, 20 Sep 2011 10:12:40 +0200
+Subject: [PATCH] Ignore items with empty remote ids here.
+
+Items with empty remote id are those not yet stored by the resource,
+ie. we still have pending change replays for those. So, if we do a sync
+during that period (which could happen since the introduction of the
+file system watcher), we would remove a random one of those (only one
+since the map would only contain one without a remote id). This mostly
+affects the POP3 usage pattern.
+(cherry picked from commit f814b46a799ea8418ae17cf77d44da473124d12d)
+---
+ resources/maildir/retrieveitemsjob.cpp |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/resources/maildir/retrieveitemsjob.cpp b/resources/maildir/retrieveitemsjob.cpp
+index 7253f7e..f0273ef 100644
+--- a/resources/maildir/retrieveitemsjob.cpp
++++ b/resources/maildir/retrieveitemsjob.cpp
+@@ -57,8 +57,10 @@ void RetrieveItemsJob::localListDone ( KJob* job )
+ 
+   const Akonadi::Item::List items = qobject_cast<Akonadi::ItemFetchJob*>( job )->items();
+   m_localItems.reserve( items.size() );
+-  foreach ( const Akonadi::Item &item, items )
+-    m_localItems.insert( item.remoteId(), item );
++  foreach ( const Akonadi::Item &item, items ) {
++    if ( !item.remoteId().isEmpty() )
++      m_localItems.insert( item.remoteId(), item );
++  }
+ 
+   const QStringList entryList = m_maildir.entryList();
+   qint64 previousMtime = m_collection.remoteRevision().toLongLong();
+-- 
+1.7.1
+
diff --git a/kdepim-runtime.spec b/kdepim-runtime.spec
index 5beffa7..6ff76d1 100644
--- a/kdepim-runtime.spec
+++ b/kdepim-runtime.spec
@@ -5,7 +5,7 @@ Name:    kdepim-runtime
 Summary: KDE PIM Runtime Environment
 Epoch:   1
 Version: 4.7.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 License: GPLv2
 Group: Applications/Productivity
@@ -16,9 +16,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 # show the Akonadi KCM in System Settings (#565420)
 Patch0: kdepim-runtime-4.4.93-show_akonadi_kcm.patch
 
+## upstreamable patches
 # Enable SQLite support in akonadi
 Patch1: kdepim-runtime-4.7.1-sqlite-support.patch
 
+## upstream patches
+Patch100: 0001-Ignore-items-with-empty-remote-ids-here.patch
+
 Provides: kdepim4-runtime = %{version}-%{release}
 
 Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
@@ -66,6 +70,7 @@ Install %{name}-devel if you want to write or compile %{name} plugins.
 
 %patch0 -p1 -b .show_akonadi_kcm
 %patch1 -p1 -b .sqlite-support
+%patch100 -p1 -b .akonadi_ignore_items_with_empty_remote_ids
 
 
 %build
@@ -146,6 +151,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Wed Sep 21 2011 Rex Dieter <rdieter at fedoraproject.org> 1:4.7.1-3
+- upstream Ignore-items-with-empty-remote-ids-here patch 
+
 * Tue Sep 20 2011 Radek Novacek <rnovacek at redhat.com> 1:4.7.1-2
 - Enable SQLite support in akonadi
 


More information about the scm-commits mailing list