[SCM] Akonadi packaging branch, master, updated. debian/1.12.0-1

Maximiliano Curia maxy at moszumanska.debian.org
Wed Apr 2 08:21:55 UTC 2014


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-req/akonadi.git;a=commitdiff;h=08db26e

The following commit has been merged in the master branch:
commit 08db26efd2883ebe52f5f5c7eb2a514ec54d8c17
Author: Maximiliano Curia <maxy at debian.org>
Date:   Tue Apr 1 13:39:01 2014 +0200

    Remove patches applied upstream
---
 debian/changelog                                   |   3 +
 ...lways_verify_writing_data_to_external_file.diff | 150 ---------------------
 .../correctly_detect_inter-resource_moves.diff     |  26 ----
 debian/patches/dont_do_redundant_flag_changes.diff | 110 ---------------
 debian/patches/series                              |   3 -
 5 files changed, 3 insertions(+), 289 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index be09b69..4f09e93 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ akonadi (1.12.0-1) UNRELEASED; urgency=medium
 
   * 
   * New upstream release.
+  * Remove patch: dont_do_redundant_flag_changes.diff
+  * Remove patch: always_verify_writing_data_to_external_file.diff
+  * Remove patch: correctly_detect_inter-resource_moves.diff
 
  -- Maximiliano Curia <maxy at debian.org>  Mon, 31 Mar 2014 22:45:11 +0200
 
diff --git a/debian/patches/always_verify_writing_data_to_external_file.diff b/debian/patches/always_verify_writing_data_to_external_file.diff
deleted file mode 100644
index c26b59b..0000000
--- a/debian/patches/always_verify_writing_data_to_external_file.diff
+++ /dev/null
@@ -1,150 +0,0 @@
-commit 40e7cff2c75a7ba986f9ab0ab5171dc899c57b39
-Author: Dan Vrátil <dvratil at redhat.com>
-Date:   Fri Dec 6 17:08:39 2013 +0100
-
-    Always verify writing data to external file was successfull
-    
-    Always make sure that QFile::write() has written all data to prevent data
-    loss in case we run out of disk space.
-    
-    BUG: 283692
-    FIXED-IN: 1.11.1
-
-diff --git a/server/src/handler/append.cpp b/server/src/handler/append.cpp
-index 6746a41..14930fb 100644
---- a/server/src/handler/append.cpp
-+++ b/server/src/handler/append.cpp
-@@ -62,22 +62,16 @@ bool Append::commit()
-       m_size = qMax( m_size, dataSize );
-       storeInFile = dataSize > DbConfig::configuredDatabase()->sizeThreshold();
-       if ( storeInFile ) {
--        if ( !tmpFile.open() ) {
--          storeInFile =  false;
-+        try {
-+          PartHelper::streamToFile( m_streamParser, tmpFile );
-+        } catch ( const PartHelperException &e ) {
-+          return failureResponse( e.what() );
-         }
--      }
--      while ( !m_streamParser->atLiteralEnd() ) {
--        if ( !storeInFile ) {
-+      } else {
-+        while ( !m_streamParser->atLiteralEnd() ) {
-           m_data += m_streamParser->readLiteralPart();
--        } else {
--          m_data = m_streamParser->readLiteralPart();
--          tmpFile.write( m_data );
-         }
-       }
--      if ( storeInFile ) {
--        tmpFile.close();
--        m_data = "";
--      }
-     } else {
-       m_data = m_streamParser->readString();
-     }
-diff --git a/server/src/handler/store.cpp b/server/src/handler/store.cpp
-index 262f4c9..19d3559 100644
---- a/server/src/handler/store.cpp
-+++ b/server/src/handler/store.cpp
-@@ -302,17 +302,11 @@ bool Store::parseStream()
- 
-           //the actual streaming code for the remaining parts:
-           // reads from the parser, writes immediately to the file
--          // ### move this entire block to part helper? should be useful for append as well
--          const QString fileName = PartHelper::resolveAbsolutePath( part.data() );
--          QFile file( fileName );
--          if ( file.open( QIODevice::WriteOnly | QIODevice::Append ) ) {
--            while ( !m_streamParser->atLiteralEnd() ) {
--              value = m_streamParser->readLiteralPart();
--              file.write( value ); // ### error handling?
--            }
--            file.close();
--          } else {
--            return failureResponse( "Unable to update item part" );
-+          QFile partFile( PartHelper::resolveAbsolutePath( part.data() ) );
-+          try {
-+            PartHelper::streamToFile( m_streamParser, partFile, QIODevice::WriteOnly | QIODevice::Append );
-+          } catch ( const PartHelperException &e ) {
-+            return failureResponse( e.what() );
-           }
- 
-           changes << partName;
-diff --git a/server/src/storage/parthelper.cpp b/server/src/storage/parthelper.cpp
-index 67a9ecc..d510a56 100644
---- a/server/src/storage/parthelper.cpp
-+++ b/server/src/storage/parthelper.cpp
-@@ -23,6 +23,7 @@
- #include "entities.h"
- #include "selectquerybuilder.h"
- #include "dbconfig.h"
-+#include "imapstreamparser.h"
- #include <akstandarddirs.h>
- #include <libs/xdgbasedirs_p.h>
- 
-@@ -201,6 +202,31 @@ void PartHelper::removeFile( const QString &fileName )
-   QFile::remove( fileName );
- }
- 
-+bool PartHelper::streamToFile( ImapStreamParser* streamParser, QFile &file, QIODevice::OpenMode openMode )
-+{
-+  Q_ASSERT( openMode & QIODevice::WriteOnly );
-+
-+  if ( !file.isOpen() ) {
-+    if ( !file.open( openMode ) ) {
-+      throw PartHelperException( "Unable to update item part" );
-+    }
-+  } else {
-+    Q_ASSERT( file.openMode() & QIODevice::WriteOnly );
-+  }
-+
-+  QByteArray value;
-+  while ( !streamParser->atLiteralEnd() ) {
-+    value = streamParser->readLiteralPart();
-+    if ( file.write( value ) != value.size() ) {
-+      throw PartHelperException( "Unable to write payload to file" );
-+    }
-+  }
-+  file.close();
-+
-+  return true;
-+}
-+
-+
- QByteArray PartHelper::translateData( const QByteArray &data, bool isExternal )
- {
-   if ( isExternal ) {
-diff --git a/server/src/storage/parthelper.h b/server/src/storage/parthelper.h
-index 5d1fb59..bd82ab6 100644
---- a/server/src/storage/parthelper.h
-+++ b/server/src/storage/parthelper.h
-@@ -26,10 +26,13 @@
- 
- class QString;
- class QVariant;
-+class QFile;
- 
- namespace Akonadi
- {
- 
-+class ImapStreamParser;
-+
- AKONADI_EXCEPTION_MAKE_INSTANCE( PartHelperException );
- 
- /**
-@@ -67,6 +70,15 @@ namespace PartHelper
-    */
-   void removeFile( const QString &fileName );
- 
-+  /**
-+   * Reads data from @p streamParser as they arrive from client and writes them
-+   * to @p partFile. It will close the file when all data are read.
-+   *
-+   * @param partFile File to write into. The file must be closed, or opened in write mode
-+   * @throws PartHelperException when an error occurs (write fails, data truncated, etc)
-+   */
-+  bool streamToFile( ImapStreamParser *streamParser, QFile &partFile, QIODevice::OpenMode = QIODevice::WriteOnly );
-+
-   /** Returns the payload data. */
-   QByteArray translateData( const QByteArray &data, bool isExternal );
-   /** Convenience overload of the above. */
diff --git a/debian/patches/correctly_detect_inter-resource_moves.diff b/debian/patches/correctly_detect_inter-resource_moves.diff
deleted file mode 100644
index f0bbf59..0000000
--- a/debian/patches/correctly_detect_inter-resource_moves.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-commit 980b02ff4b0ba7e49f3b32d39ecd76121456c3f6
-Author: Dan Vrátil <dvratil at redhat.com>
-Date:   Thu Dec 12 16:13:41 2013 +0100
-
-    Correctly detect inter-resource moves
-    
-    When comparing the source and destination resources, the item
-    already has the destination collection and resource  set, so
-    we need to compare it with the source resource
-    
-    BUG: 328298
-    FIXED-IN: 1.11.1
-
-diff --git a/server/src/handler/move.cpp b/server/src/handler/move.cpp
-index b5b20f4..8bea8f8 100644
---- a/server/src/handler/move.cpp
-+++ b/server/src/handler/move.cpp
-@@ -106,7 +106,7 @@ bool Move::parseStream()
-       Q_FOREACH ( PimItem moved, toMove.values( sourceId ) ) {
-         // reset RID on inter-resource moves, but only after generating the change notification
-         // so that this still contains the old one for the source resource
--        const bool isInterResourceMove = moved.collection().resource().id() != destResource.id();
-+        const bool isInterResourceMove = moved.collection().resource().id() != source.resource().id();
-         if ( isInterResourceMove ) {
-           moved.setRemoteId( QString() );
-         }
diff --git a/debian/patches/dont_do_redundant_flag_changes.diff b/debian/patches/dont_do_redundant_flag_changes.diff
deleted file mode 100644
index bd55420..0000000
--- a/debian/patches/dont_do_redundant_flag_changes.diff
+++ /dev/null
@@ -1,110 +0,0 @@
-commit faabb920d8efe5c35bba070396b8df608c5a910a
-Author: Tomáš Trnka <tomastrnka at gmx.com>
-Date:   Sun Dec 1 18:39:12 2013 +0100
-
-    Don't do redundant flag changes in setItemsFlags
-    
-    Instead of removing all flags and then adding the requested ones
-    back, figure out which flags are actually getting added or removed
-    and only apply those changes.
-    
-    Everything is still carried out in up to two DB queries.
-    
-    Additionally, don't send out the change notification if nothing
-    has actually changed.
-    
-    BUG:328286
-    FIXED-IN:1.11.1
-    REVIEW:114241
-
-diff --git a/server/src/storage/datastore.cpp b/server/src/storage/datastore.cpp
-index 2fb5f80..efc0d57 100644
---- a/server/src/storage/datastore.cpp
-+++ b/server/src/storage/datastore.cpp
-@@ -182,57 +182,57 @@ DataStore * Akonadi::DataStore::self()
- 
- bool DataStore::setItemsFlags( const PimItem::List &items, const QVector<Flag> &flags )
- {
--  // first delete all old flags of this pim item
-   QSet<QByteArray> removedFlags;
-   QSet<QByteArray> addedFlags;
--  QVariantList ids;
-   QVariantList insIds;
-   QVariantList insFlags;
-+  Query::Condition delConds( Query::Or );
- 
-   Q_FOREACH ( const PimItem &item, items ) {
-     Q_FOREACH ( const Flag &flag, item.flags() ) {
--      if ( !removedFlags.contains( flag.name().toLatin1() ) ) {
-+      if ( !flags.contains( flag ) ) {
-         removedFlags << flag.name().toLatin1();
-+        Query::Condition cond;
-+        cond.addValueCondition( PimItemFlagRelation::leftFullColumnName(), Query::Equals, item.id() );
-+        cond.addValueCondition( PimItemFlagRelation::rightFullColumnName(), Query::Equals, flag.id() );
-+        delConds.addCondition(cond);
-       }
-     }
- 
--    // create a bind values for the insert query - every item repeats exactly
--    // flags.count()-times
--    for ( int i = 0; i < flags.count(); ++i ) {
--      insIds << item.id();
-+    Q_FOREACH ( const Flag &flag, flags ) {
-+      if ( !item.flags().contains( flag ) ) {
-+        addedFlags << flag.name().toLatin1();
-+        insIds << item.id();
-+        insFlags << flag.id();
-+      }
-     }
--
--    ids << item.id();
-   }
- 
--  // Clear all flags of all given items at once
--  QueryBuilder qb( PimItemFlagRelation::tableName(), QueryBuilder::Delete );
--  Query::Condition cond;
--  cond.addValueCondition( PimItemFlagRelation::leftFullColumnName(), Query::In, ids );
--  qb.addCondition( cond );
--  if ( !qb.exec() ) {
--    return false;
-+  if ( !removedFlags.empty() ) {
-+    QueryBuilder qb( PimItemFlagRelation::tableName(), QueryBuilder::Delete );
-+    qb.addCondition( delConds );
-+    if ( !qb.exec() ) {
-+      return false;
-+    }
-   }
- 
--  // create bind values for the insert quest - every flags repeats exactly
--  // items.count()-times
--  Q_FOREACH ( const Flag &flag, flags ) {
--    for ( int i = 0; i < items.count(); ++i ) {
--      insFlags << flag.id();
-+  if ( !addedFlags.empty() ) {
-+    QueryBuilder qb2( PimItemFlagRelation::tableName(), QueryBuilder::Insert );
-+    qb2.setColumnValue( PimItemFlagRelation::leftColumn(), insIds );
-+    qb2.setColumnValue( PimItemFlagRelation::rightColumn(), insFlags );
-+    qb2.setIdentificationColumn( QString() );
-+    if ( !qb2.exec() ) {
-+      return false;
-     }
--
--    addedFlags << flag.name().toLatin1();
-   }
- 
--  QueryBuilder qb2( PimItemFlagRelation::tableName(), QueryBuilder::Insert );
--  qb2.setColumnValue( PimItemFlagRelation::leftColumn(), insIds );
--  qb2.setColumnValue( PimItemFlagRelation::rightColumn(), insFlags );
--  qb2.setIdentificationColumn( QString() );
--  if ( !qb2.exec() ) {
--    return false;
-+  if ( addedFlags.empty() && removedFlags.empty() ) {
-+    // no changes done, notification not needed
-+    return true;
-   }
- 
-   mNotificationCollector->itemsFlagsChanged( items, addedFlags, removedFlags );
-+
-   return true;
- }
- 
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 809addd..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-dont_do_redundant_flag_changes.diff
-always_verify_writing_data_to_external_file.diff
-correctly_detect_inter-resource_moves.diff

-- 
Akonadi packaging



More information about the pkg-kde-commits mailing list