Hello community,

here is the log from the commit of package akonadi-runtime for openSUSE:Factory 
checked in at 2012-11-08 07:40:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/akonadi-runtime (Old)
 and      /work/SRC/openSUSE:Factory/.akonadi-runtime.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "akonadi-runtime", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/akonadi-runtime/akonadi-runtime.changes  
2012-09-11 07:54:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.akonadi-runtime.new/akonadi-runtime.changes     
2012-11-08 07:40:46.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Nov  2 17:14:43 UTC 2012 - [email protected]
+
+- Update to akonadi 1.8.1
+  * Fix payload loss on some move/copy scenarios.
+  * Improve error reporting for failed item retrievals.
+
+-------------------------------------------------------------------

Old:
----
  akonadi-1.8.0.tar.bz2

New:
----
  akonadi-1.8.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ akonadi-runtime.spec ++++++
--- /var/tmp/diff_new_pack.7TJp1i/_old  2012-11-08 07:40:48.000000000 +0100
+++ /var/tmp/diff_new_pack.7TJp1i/_new  2012-11-08 07:40:48.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           akonadi-runtime
-Version:        1.8.0
+Version:        1.8.1
 Release:        0
 %define rversion %{version}
 Summary:        PIM Storage Service

++++++ akonadi-1.8.0.tar.bz2 -> akonadi-1.8.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/akonadi-1.8.0/CMakeLists.txt 
new/akonadi-1.8.1/CMakeLists.txt
--- old/akonadi-1.8.0/CMakeLists.txt    2012-07-25 09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/CMakeLists.txt    2012-10-14 17:34:40.000000000 +0200
@@ -66,7 +66,7 @@
 
 set(AKONADI_VERSION_MAJOR "1")
 set(AKONADI_VERSION_MINOR "8")
-set(AKONADI_VERSION_PATCH "0")
+set(AKONADI_VERSION_PATCH "1")
 set(AKONADI_VERSION 
"${AKONADI_VERSION_MAJOR}.${AKONADI_VERSION_MINOR}.${AKONADI_VERSION_PATCH}")
 set(AKONADI_VERSION_STRING "${AKONADI_VERSION}")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/akonadi-1.8.0/Mainpage.dox 
new/akonadi-1.8.1/Mainpage.dox
--- old/akonadi-1.8.0/Mainpage.dox      2012-07-25 09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/Mainpage.dox      2012-10-14 17:34:40.000000000 +0200
@@ -315,6 +315,6 @@
 
 // DOXYGEN_EXCLUDE = sqlplugin server/control server/akonadictl server/tests
 // DOXYGEN_PROJECTNAME=Akonadi
-// DOXYGEN_PROJECTVERSION=1.8.0
+// DOXYGEN_PROJECTVERSION=1.8.1
 
 // vim:ts=4:sw=4:expandtab:filetype=doxygen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/akonadi-1.8.0/NEWS new/akonadi-1.8.1/NEWS
--- old/akonadi-1.8.0/NEWS      2012-07-25 09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/NEWS      2012-10-14 17:34:40.000000000 +0200
@@ -1,3 +1,8 @@
+1.8.1                         14-October-2012
+---------------------------------------------
+- Fix payload loss on some move/copy scenarios.
+- Improve error reporting for failed item retrievals.
+
 1.8.0                            25-July-2012
 ---------------------------------------------
 - Fix deadlock in ad-hoc Nepomuk searches.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/akonadi-1.8.0/interfaces/org.freedesktop.Akonadi.Resource.xml 
new/akonadi-1.8.1/interfaces/org.freedesktop.Akonadi.Resource.xml
--- old/akonadi-1.8.0/interfaces/org.freedesktop.Akonadi.Resource.xml   
2012-07-25 09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/interfaces/org.freedesktop.Akonadi.Resource.xml   
2012-10-14 17:34:40.000000000 +0200
@@ -16,6 +16,13 @@
       <arg name="mimeType" type="s" direction="in"/>
       <arg name="parts" type="as" direction="in"/>
     </method>
+    <method name="requestItemDeliveryV2">
+      <arg type="s" direction="out"/>
+      <arg name="uid" type="x" direction="in"/>
+      <arg name="remoteId" type="s" direction="in"/>
+      <arg name="mimeType" type="s" direction="in"/>
+      <arg name="parts" type="as" direction="in"/>
+    </method>
     <method name="synchronize">
       <annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
     </method>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/akonadi-1.8.0/server/src/handler/colcopy.cpp 
new/akonadi-1.8.1/server/src/handler/colcopy.cpp
--- old/akonadi-1.8.0/server/src/handler/colcopy.cpp    2012-07-25 
09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/server/src/handler/colcopy.cpp    2012-10-14 
17:34:40.000000000 +0200
@@ -94,7 +94,9 @@
   ItemRetriever retriever( connection() );
   retriever.setCollection( source, true );
   retriever.setRetrieveFullPayload( true );
-  retriever.exec();
+  if (!retriever.exec()) {
+    return failureResponse( retriever.lastError() );
+  }
 
   DataStore *store = connection()->storageBackend();
   Transaction transaction( store );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/akonadi-1.8.0/server/src/handler/colmove.cpp 
new/akonadi-1.8.1/server/src/handler/colmove.cpp
--- old/akonadi-1.8.0/server/src/handler/colmove.cpp    2012-07-25 
09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/server/src/handler/colmove.cpp    2012-10-14 
17:34:40.000000000 +0200
@@ -62,7 +62,9 @@
   ItemRetriever retriever( connection() );
   retriever.setCollection( source, true );
   retriever.setRetrieveFullPayload( true );
-  retriever.exec();
+  if (!retriever.exec()) {
+    return failureResponse( retriever.lastError() );
+  }
 
   DataStore *store = connection()->storageBackend();
   Transaction transaction( store );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/akonadi-1.8.0/server/src/handler/copy.cpp 
new/akonadi-1.8.1/server/src/handler/copy.cpp
--- old/akonadi-1.8.0/server/src/handler/copy.cpp       2012-07-25 
09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/server/src/handler/copy.cpp       2012-10-14 
17:34:40.000000000 +0200
@@ -73,7 +73,9 @@
   ItemRetriever retriever( connection() );
   retriever.setItemSet( set );
   retriever.setRetrieveFullPayload( true );
-  retriever.exec();
+  if (!retriever.exec()) {
+    return failureResponse( retriever.lastError() );
+  }
 
   const QByteArray tmp = m_streamParser->readString();
   const Collection targetCollection = HandlerHelper::collectionFromIdOrName( 
tmp );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/akonadi-1.8.0/server/src/handler/modify.cpp 
new/akonadi-1.8.1/server/src/handler/modify.cpp
--- old/akonadi-1.8.0/server/src/handler/modify.cpp     2012-07-25 
09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/server/src/handler/modify.cpp     2012-10-14 
17:34:40.000000000 +0200
@@ -70,7 +70,9 @@
       ItemRetriever retriever( connection() );
       retriever.setCollection( collection, true );
       retriever.setRetrieveFullPayload( true );
-      retriever.exec();
+      if (!retriever.exec()) {
+        throw HandlerException( retriever.lastError() );
+      }
     }
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/akonadi-1.8.0/server/src/handler/move.cpp 
new/akonadi-1.8.1/server/src/handler/move.cpp
--- old/akonadi-1.8.0/server/src/handler/move.cpp       2012-07-25 
09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/server/src/handler/move.cpp       2012-10-14 
17:34:40.000000000 +0200
@@ -50,7 +50,9 @@
   ItemRetriever retriever( connection() );
   retriever.setScope( mScope );
   retriever.setRetrieveFullPayload( true );
-  retriever.exec();
+  if (!retriever.exec()) {
+    return failureResponse( retriever.lastError() );
+  }
 
   DataStore *store = connection()->storageBackend();
   Transaction transaction( store );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/akonadi-1.8.0/server/src/storage/itemretrievaljob.cpp 
new/akonadi-1.8.1/server/src/storage/itemretrievaljob.cpp
--- old/akonadi-1.8.0/server/src/storage/itemretrievaljob.cpp   2012-07-25 
09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/server/src/storage/itemretrievaljob.cpp   2012-10-14 
17:34:40.000000000 +0200
@@ -36,15 +36,17 @@
   Q_ASSERT( m_request );
   akDebug() << "processing retrieval request for item" << m_request->id << " 
parts:" << m_request->parts << " of resource:" << m_request->resourceId;
 
+  m_interface = interface;
   // call the resource
   if ( interface ) {
     m_active = true;
+    m_oldMethodCalled = false;
     QList<QVariant> arguments;
     arguments << m_request->id
               << QString::fromUtf8( m_request->remoteId )
               << QString::fromUtf8( m_request->mimeType )
               << m_request->parts;
-    interface->callWithCallback( QLatin1String( "requestItemDelivery" ), 
arguments, this, SLOT(callFinished(bool)), SLOT(callFailed(QDBusError)) );
+    interface->callWithCallback( QLatin1String( "requestItemDeliveryV2" ), 
arguments, this, SLOT(callFinished(QString)), SLOT(callFailed(QDBusError)) );
   } else {
     Q_EMIT requestCompleted( m_request, QString::fromLatin1( "Unable to 
contact resource" ) );
     deleteLater();
@@ -69,8 +71,34 @@
   deleteLater();
 }
 
+void ItemRetrievalJob::callFinished(const QString& errorMsg)
+{
+  if ( m_active ) {
+    m_active = false;
+    if ( !errorMsg.isEmpty() )
+      Q_EMIT requestCompleted( m_request, QString::fromLatin1( "Unable to 
retrieve item from resource: %1" ).arg( errorMsg ) );
+    else
+      Q_EMIT requestCompleted( m_request, QString() );
+  }
+  deleteLater();
+}
+
+
 void ItemRetrievalJob::callFailed(const QDBusError& error)
 {
+  if ( error.type() == QDBusError::UnknownMethod && !m_oldMethodCalled ) {
+    akDebug() << "processing retrieval request (old method) for item" << 
m_request->id << " parts:" << m_request->parts << " of resource:" << 
m_request->resourceId;
+    Q_ASSERT(m_interface);
+    //try the old version
+    QList<QVariant> arguments;
+    arguments << m_request->id
+              << QString::fromUtf8( m_request->remoteId )
+              << QString::fromUtf8( m_request->mimeType )
+              << m_request->parts;
+    m_oldMethodCalled = true;
+    m_interface->callWithCallback( QLatin1String( "requestItemDelivery" ), 
arguments, this, SLOT(callFinished(bool)), SLOT(callFailed(QDBusError)) );
+    return;
+  }
   if ( m_active ) {
     m_active = false;
     Q_EMIT requestCompleted( m_request, QString::fromLatin1( "Unable to 
retrieve item from resource: %1" ).arg( error.message() ) );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/akonadi-1.8.0/server/src/storage/itemretrievaljob.h 
new/akonadi-1.8.1/server/src/storage/itemretrievaljob.h
--- old/akonadi-1.8.0/server/src/storage/itemretrievaljob.h     2012-07-25 
09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/server/src/storage/itemretrievaljob.h     2012-10-14 
17:34:40.000000000 +0200
@@ -31,7 +31,7 @@
 {
   Q_OBJECT
   public:
-    ItemRetrievalJob( ItemRetrievalRequest *req, QObject *parent ) : QObject( 
parent ), m_request( req ), m_active( false ) {}
+    ItemRetrievalJob( ItemRetrievalRequest *req, QObject *parent ) : QObject( 
parent ), m_request( req ), m_active( false ), m_interface( 0 ), 
m_oldMethodCalled( false ) {}
     ~ItemRetrievalJob();
     void start( QDBusAbstractInterface* interface );
     void kill();
@@ -41,11 +41,14 @@
 
   private Q_SLOTS:
     void callFinished( bool returnValue );
+    void callFinished( const QString& errorMsg );
     void callFailed( const QDBusError &error );
 
   private:
     ItemRetrievalRequest *m_request;
     bool m_active;
+    QDBusAbstractInterface *m_interface;
+    bool m_oldMethodCalled;
 };
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/akonadi-1.8.0/server/src/storage/itemretriever.cpp 
new/akonadi-1.8.1/server/src/storage/itemretriever.cpp
--- old/akonadi-1.8.0/server/src/storage/itemretriever.cpp      2012-07-25 
09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/server/src/storage/itemretriever.cpp      2012-10-14 
17:34:40.000000000 +0200
@@ -160,8 +160,10 @@
 
   qb.addSortColumn( PimItem::idFullColumnName(), Query::Ascending );
 
-  if ( !qb.exec() )
-    throw ItemRetrieverException( "Unable to retrieve items" );
+  if ( !qb.exec() ) {
+    mLastError = "Unable to retrieve items";
+    throw ItemRetrieverException( mLastError );
+  }
 
   qb.query().next();
 
@@ -233,25 +235,33 @@
       ItemRetrievalManager::instance()->requestItemDelivery( request );
     } catch ( const ItemRetrieverException &e ) {
       akError() << e.type() << ": " << e.what();
+      mLastError = e.what();
       return false;
     }
   }
 
   // retrieve items in child collections if requested
+  bool result = true;
   if ( mRecursive && mCollection.isValid() ) {
     Q_FOREACH ( const Collection &col, mCollection.children() ) {
       ItemRetriever retriever( mConnection );
       retriever.setCollection( col, mRecursive );
       retriever.setRetrieveParts( mParts );
       retriever.setRetrieveFullPayload( mFullPayload );
-      retriever.exec();
+      result = retriever.exec();
+      if (!result) break;
     }
   }
 
-  return true;
+  return result;
 }
 
 QString ItemRetriever::driverName()
 {
   return mConnection->storageBackend()->database().driverName();
 }
+
+QByteArray ItemRetriever::lastError() const
+{
+  return mLastError;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/akonadi-1.8.0/server/src/storage/itemretriever.h 
new/akonadi-1.8.1/server/src/storage/itemretriever.h
--- old/akonadi-1.8.0/server/src/storage/itemretriever.h        2012-07-25 
09:45:25.000000000 +0200
+++ new/akonadi-1.8.1/server/src/storage/itemretriever.h        2012-10-14 
17:34:40.000000000 +0200
@@ -64,6 +64,8 @@
 
     bool exec();
 
+    QByteArray lastError() const;
+
   private:
     /** Convenience method which returns the database driver name */
     QString driverName();
@@ -77,6 +79,7 @@
     QStringList mParts;
     bool mFullPayload;
     bool mRecursive;
+    mutable QByteArray mLastError;
 };
 
 }

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to