Hello community,
here is the log from the commit of package kdepim3
checked in at Mon May 7 18:13:55 CEST 2007.
--------
--- KDE/kdepim3/kdepim3.changes 2007-04-14 17:17:16.000000000 +0200
+++ /mounts/work_src_done/STABLE/kdepim3/kdepim3.changes 2007-05-07 14:16:06.000000000 +0200
@@ -1,0 +2,6 @@
+Mon May 7 13:50:44 CEST 2007 - wstephenson@suse.de
+
+- Add stability patch for disconnected imap in KMail/Kontact, using
+ explicit deletion list, fix #263312
+
+-------------------------------------------------------------------
New:
----
kmail_remember_dimap_deletions.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdepim3.spec ++++++
--- /var/tmp/diff_new_pack.I24805/_old 2007-05-07 18:12:54.000000000 +0200
+++ /var/tmp/diff_new_pack.I24805/_new 2007-05-07 18:12:54.000000000 +0200
@@ -29,7 +29,7 @@
Group: System/GUI/KDE
Summary: Personal Information Manager Software for KDE
Version: 3.5.6
-Release: 21
+Release: 29
URL: http://www.kde.org/
Requires: kdelibs3 >= %( echo `rpm -q --queryformat '%{VERSION}' kdelibs3` )
Requires: kdebase3 >= %( echo `rpm -q --queryformat '%{VERSION}' kdelibs3` )
@@ -55,6 +55,8 @@
Patch25: kmail-crash.diff
Patch27: disable-kitchensync.diff
Patch28: kmail_allow_tls_login_auth.diff
+#probably going into 3_5_branch soon
+Patch29: kmail_remember_dimap_deletions.diff
Provides: cryptplug
Obsoletes: cryptplug
%if %suse_version > 1000
@@ -211,6 +213,7 @@
%patch25
%patch27
%patch28
+%patch29
. /etc/opt/kde3/common_options
update_admin
@@ -685,6 +688,9 @@
/opt/kde3/%_lib/kde3/plugins/designer/kpartsdesignerplugin.*
%changelog
+* Mon May 07 2007 - wstephenson@suse.de
+- Add stability patch for disconnected imap in KMail/Kontact, using
+ explicit deletion list, fix #263312
* Sat Apr 14 2007 - wstephenson@suse.de
- update 3_5_BRANCH.diff, fix #247903 kmail never gives up,
and #247386, can't load messages consisting of a single non-text
++++++ kmail_remember_dimap_deletions.diff ++++++
Index: kmail/kmfoldersearch.h
================================================================================
--- kmail/folderstorage.cpp
+++ kmail/folderstorage.cpp
@@ -96,6 +96,14 @@
}
+void FolderStorage::close( const char * owner, bool aForced )
+{
+ if (mOpenCount <= 0) return;
+ if (mOpenCount > 0) mOpenCount--;
+ if (mOpenCount > 0 && !aForced) return;
+ reallyDoClose( owner );
+}
+
//-----------------------------------------------------------------------------
QString FolderStorage::dotEscape(const QString& aStr)
{
--- kmail/folderstorage.h
+++ kmail/folderstorage.h
@@ -259,7 +259,8 @@
/** Close folder. If force is TRUE the files are closed even if
others still use it (e.g. other mail reader windows). */
- virtual void close(const char * owner,bool force=FALSE) = 0;
+ void close(const char * owner, bool force=FALSE);
+ virtual void reallyDoClose(const char * owner) = 0;
/** Try releasing @p folder if possible, something is attempting an exclusive access to it.
Currently used for KMFolderSearch and the background tasks like expiry. */
--- kmail/kmfoldercachedimap.cpp
+++ kmail/kmfoldercachedimap.cpp
@@ -179,12 +179,15 @@
KMFolderCachedImap::~KMFolderCachedImap()
{
+ if (kmkernel->undoStack()) kmkernel->undoStack()->folderDestroyed( folder() );
+}
+
+void KMFolderCachedImap::reallyDoClose( const char * owner )
+{
if( !mFolderRemoved ) {
- writeConfig();
writeUidCache();
}
-
- if (kmkernel->undoStack()) kmkernel->undoStack()->folderDestroyed( folder() );
+ KMFolderMaildir::reallyDoClose( owner );
}
void KMFolderCachedImap::initializeFrom( KMFolderCachedImap* parent )
@@ -247,6 +250,12 @@
if ( mImapPath.isEmpty() ) {
mImapPathCreation = config->readEntry("ImapPathCreation");
}
+
+ QStringList uids = config->readListEntry( "UIDSDeletedSinceLastSync" );
+ kdDebug( 5006 ) << "READING IN UIDSDeletedSinceLastSync: " << folder()->prettyURL() << endl << uids << endl;
+ for ( QStringList::iterator it = uids.begin(); it != uids.end(); it++ ) {
+ mDeletedUIDsSinceLastSync.insert( (*it).toULong(), 0);
+ }
}
void KMFolderCachedImap::writeConfig()
@@ -262,6 +271,15 @@
} else {
configGroup.deleteEntry( "ImapPathCreation" );
}
+ if ( !mDeletedUIDsSinceLastSync.isEmpty() ) {
+ QValueList<ulong> uids = mDeletedUIDsSinceLastSync.keys();
+ QStringList uidstrings;
+ for( QValueList<ulong>::iterator it = uids.begin(); it != uids.end(); it++ ) {
+ uidstrings.append( QString::number( (*it) ) );
+ }
+ configGroup.writeEntry( "UIDSDeletedSinceLastSync", uidstrings );
+ kdDebug( 5006 ) << "WRITING OUT UIDSDeletedSinceLastSync in: " << folder( )->prettyURL( ) << endl << uidstrings << endl;
+ }
}
writeConfigKeysWhichShouldNotGetOverwrittenByReadConfig();
KMFolderMaildir::writeConfig();
@@ -336,11 +354,12 @@
if( cacheVersion == UIDCACHE_VERSION ) {
len = uidcache.readLine( buf, sizeof(buf) );
if( len > 0 ) {
- setUidValidity( QString::fromLocal8Bit( buf).stripWhiteSpace() );
+ setUidValidity( QString::fromLocal8Bit(buf).stripWhiteSpace() );
len = uidcache.readLine( buf, sizeof(buf) );
if( len > 0 ) {
+ kdDebug(5006) << "Reading in last uid from cache: " << QString::fromLocal8Bit(buf).stripWhiteSpace() << " in " << folder()->prettyURL() << endl;
// load the last known highest uid from the on disk cache
- setLastUid( QString::fromLocal8Bit( buf).stripWhiteSpace().toULong() );
+ setLastUid( QString::fromLocal8Bit(buf).stripWhiteSpace().toULong() );
return 0;
}
}
@@ -359,6 +378,7 @@
return 0;
}
+ kdDebug(5006) << "Writing out UID cache lastuid: " << lastUid() << " in: " << folder()->prettyURL() << endl;
QFile uidcache( uidCacheLocation() );
if( uidcache.open( IO_WriteOnly ) ) {
QTextStream str( &uidcache );
@@ -400,6 +420,7 @@
KMMessage* KMFolderCachedImap::take(int idx)
{
uidMapDirty = true;
+ rememberDeletion( idx );
return KMFolderMaildir::take(idx);
}
@@ -432,11 +453,21 @@
return rc;
}
+void KMFolderCachedImap::rememberDeletion( int idx )
+{
+ KMMsgBase *msg = getMsgBase( idx );
+ assert(msg);
+ ulong uid = msg->UID();
+ assert(uid>=0);
+ mDeletedUIDsSinceLastSync.insert(uid, 0);
+ kdDebug(5006) << "Explicit delete of UID " << uid << " at index: " << idx << " in " << folder()->prettyURL();
+}
/* Reimplemented from KMFolderMaildir */
void KMFolderCachedImap::removeMsg(int idx, bool imapQuiet)
{
uidMapDirty = true;
+ rememberDeletion( idx );
// Remove it from disk
KMFolderMaildir::removeMsg(idx,imapQuiet);
}
@@ -493,6 +524,7 @@
void KMFolderCachedImap::setLastUid( ulong uid )
{
+ kdDebug(5006) << "Setting mLastUid to: " << uid << " in " << folder()->prettyURL() << endl;
mLastUid = uid;
if( uidWriteTimer == -1 )
// Write in one minute
@@ -524,6 +556,7 @@
if( it != uidMap.end() ) {
KMMsgBase *msg = getMsgBase( *it );
#if MAIL_LOSS_DEBUGGING
+ kdDebug(5006) << "Folder: " << folder()->prettyURL() << endl;
kdDebug(5006) << "UID " << uid << " is supposed to be in the map" << endl;
kdDebug(5006) << "UID's index is to be " << *it << endl;
kdDebug(5006) << "There is a message there? " << (msg != 0) << endl;
@@ -1559,14 +1592,24 @@
// kdDebug(5006) << "KMFolderCachedImap::slotGetMessagesData() : folder "<