Hello community,
here is the log from the commit of package akonadi-runtime for openSUSE:Factory
checked in at Fri Jan 8 16:14:59 CET 2010.
--------
--- KDE/akonadi-runtime/akonadi-runtime.changes 2009-12-04 19:05:31.000000000 +0100
+++ /mounts/work_src_done/STABLE/akonadi-runtime/akonadi-runtime.changes 2010-01-06 20:15:00.000000000 +0100
@@ -1,0 +2,11 @@
+Wed Jan 6 20:13:49 CET 2010 - dmueller@suse.de
+
+- update to 1.2.90:
+ - Fix change notifications for search results.
+ - Fix database creation with PostgreSQL.
+ - Fix copying of item flags.
+ - Fix internal MySQL shutdown.
+ - Support PostgreSQL in internal mode.
+ - Fix table name case mismatch.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
akonadi-1.2.80.tar.bz2
New:
----
akonadi-1.2.90.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ akonadi-runtime.spec ++++++
--- /var/tmp/diff_new_pack.RGQyMf/_old 2010-01-08 16:14:43.000000000 +0100
+++ /var/tmp/diff_new_pack.RGQyMf/_new 2010-01-08 16:14:43.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package akonadi-runtime (Version 1.2.80)
+# spec file for package akonadi-runtime (Version 1.2.90)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@
%if %suse_version > 1020
BuildRequires: fdupes
%endif
-Version: 1.2.80
+Version: 1.2.90
Release: 1
%define rversion %version
License: LGPLv2.1+
++++++ akonadi-1.2.80.tar.bz2 -> akonadi-1.2.90.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/akonadi-1.2.80/CMakeLists.txt new/akonadi-1.2.90/CMakeLists.txt
--- old/akonadi-1.2.80/CMakeLists.txt 2009-12-01 18:16:02.000000000 +0100
+++ new/akonadi-1.2.90/CMakeLists.txt 2010-01-06 19:37:21.000000000 +0100
@@ -32,7 +32,7 @@
set(AKONADI_VERSION_MAJOR "1")
set(AKONADI_VERSION_MINOR "2")
-set(AKONADI_VERSION_PATCH "80")
+set(AKONADI_VERSION_PATCH "90")
set(AKONADI_VERSION "${AKONADI_VERSION_MAJOR}.${AKONADI_VERSION_MINOR}.${AKONADI_VERSION_PATCH}")
# If Subversion is installed, and a '.svn' directory is found,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/akonadi-1.2.80/ChangeLog new/akonadi-1.2.90/ChangeLog
--- old/akonadi-1.2.80/ChangeLog 2009-12-01 18:16:02.000000000 +0100
+++ new/akonadi-1.2.90/ChangeLog 2010-01-06 19:37:21.000000000 +0100
@@ -1,3 +1,87 @@
+2010-01-01 15:45 +0000 [r1068573] Allen Winter winter@kde.org
+
+ * trunk/kdesupport/akonadi/server/tests/unittest/CMakeLists.txt:
+ fix so we don't get CMake warnings
+
+2009-12-29 22:16 +0000 [r1067593] Volker Krause vkrause@kde.org
+
+ * trunk/kdesupport/akonadi/server/src/storage/dbupdate.xml: We
+ cannot rely on case-insensitive table names when not using our
+ internal MySQL server, an external MySQL server might be
+ configured differently (not sure about PostgreSQL, might be
+ affected as well). BUG: 220007
+
+2009-12-29 10:30 +0000 [r1067230] Tobias Koenig tokoe@kde.org
+
+ * trunk/kdesupport/akonadi/server/src/akonadi.cpp: Switch on
+ configure option to treat backslashes in strings literally as
+ defined in SQL standard. That avoids the warnings for updating
+ data in the FlagsTable table.
+
+2009-12-29 09:04 +0000 [r1067215] Tobias Koenig tokoe@kde.org
+
+ * trunk/kdesupport/akonadi/server/src/akonadi.h,
+ trunk/kdesupport/akonadi/server/src/storage/dbconfig.cpp,
+ trunk/kdesupport/akonadi/server/src/akonadi.cpp: Add support for
+ let Akonadi start its own PostgreSQL server instance and
+ configure it automatically.
+
+2009-12-27 19:50 +0000 [r1066711] Till Adam adam@kde.org
+
+ * trunk/kdesupport/akonadi/server/src/storage/dbconfig.cpp,
+ trunk/kdesupport/akonadi/server/src/storage/dbconfig.h,
+ trunk/kdesupport/akonadi/server/src/akonadi.cpp: Try harder to
+ shut down mysqld nicely and cleanly by using mysqladmin if
+ present. In order to stay db agnostic, wrap the shutdown command
+ in a generic method in DbConfig.
+
+2009-12-27 18:19 +0000 [r1066685] Till Adam adam@kde.org
+
+ * trunk/kdesupport/akonadi/server/src/akonadi.cpp: Let's try a bit
+ harder to get rid of our mysqld process. On OSX terminate() is
+ apparently useless. This is not quite nice, it would be more
+ correct to use mysqladmin shutdown, but we don't want to rely on
+ that being installed, I guess, so let's do this. Better than
+ leaking mysqld processes.
+
+2009-12-26 19:08 +0000 [r1066341] Till Adam adam@kde.org
+
+ * trunk/kdesupport/akonadi/server/src/akonadi.cpp: Turns out that
+ mysql can't deal with socket paths longer than 103 characters.
+ Check for this early, so we can exit with a reasaonble error and
+ make unit tests fail quickly, instead of waiting for timeouts.
+
+2009-12-19 16:04 +0000 [r1063935] Volker Krause vkrause@kde.org
+
+ * trunk/kdesupport/akonadi/server/src/handler/copy.cpp: copy flags
+ as well when copying items
+
+2009-12-18 21:48 +0000 [r1063599] Kevin Krammer kevin.krammer@gmx.at
+
+ * trunk/kdesupport/akonadi/server/src/akonadi.cpp: Fixing database
+ creation code which was MySQL specific. Patch provided by Yury
+ Kudryashov See http://reviewboard.kde.org/r/2135/ Reviewed by
+ Volker
+
+2009-12-02 13:10 +0000 [r1057453] Volker Krause vkrause@kde.org
+
+ * trunk/kdesupport/akonadi/server/src/nepomukmanager.cpp,
+ trunk/kdesupport/akonadi/server/src/storage/datastore.cpp,
+ trunk/kdesupport/akonadi/server/src/nepomukmanager.h,
+ trunk/kdesupport/akonadi/server/src/notificationmanager.cpp,
+ trunk/kdesupport/akonadi/server/src/storage/notificationcollector.cpp,
+ trunk/kdesupport/akonadi/server/src/notificationmanager.h,
+ trunk/kdesupport/akonadi/server/src/storage/notificationcollector.h:
+ Send out change notifications when search results are
+ added/removed.
+
+2009-12-01 17:09 +0000 [r1057189] Volker Krause vkrause@kde.org
+
+ * trunk/kdesupport/akonadi/ChangeLog,
+ trunk/kdesupport/akonadi/NEWS,
+ trunk/kdesupport/akonadi/CMakeLists.txt: Prepare for the 1.2.80
+ release.
+
2009-12-01 16:01 +0000 [r1057161] Frank Osterfeld frank.osterfeld@kdemail.net
* trunk/kdesupport/akonadi/server/control/agentmanager.cpp: fix
@@ -48,11 +132,10 @@
(added), trunk/kdesupport/akonadi/server/src/tests (removed),
trunk/kdesupport/akonadi/server/tests/unittest/interpretertest.h
(added),
- trunk/kdesupport/akonadi/server/tests/unittest/querybuildertest.cpp
- (added),
trunk/kdesupport/akonadi/server/tests/unittest/CMakeLists.txt,
- trunk/kdesupport/akonadi/server/src/interpreter.h: Merge unit
- test moving from the pe5.20091123 tag.
+ trunk/kdesupport/akonadi/server/tests/unittest/querybuildertest.cpp
+ (added), trunk/kdesupport/akonadi/server/src/interpreter.h: Merge
+ unit test moving from the pe5.20091123 tag.
2009-11-27 08:03 +0000 [r1054921] Volker Krause vkrause@kde.org
@@ -106,8 +189,8 @@
* trunk/kdesupport/akonadi/server/src/search/query.cpp (removed),
trunk/kdesupport/akonadi/server/src/search/term.cpp (removed),
trunk/kdesupport/akonadi/server/src/search/query.h (removed),
- trunk/kdesupport/akonadi/server/src/search/term.h (removed),
trunk/kdesupport/akonadi/server/src/search/dbusoperators.cpp,
+ trunk/kdesupport/akonadi/server/src/search/term.h (removed),
trunk/kdesupport/akonadi/server/CMakeLists.txt,
trunk/kdesupport/akonadi/server/src/search/dbusoperators.h,
trunk/kdesupport/akonadi/server/src/search/querymetatype.h:
@@ -306,12 +389,12 @@
trunk/kdesupport/akonadi/server/src/handler/append.cpp,
trunk/kdesupport/akonadi/server/src/handler/login.cpp,
trunk/kdesupport/akonadi/server/src/handler/logout.cpp,
- trunk/kdesupport/akonadi/server/src/handler/list.cpp,
trunk/kdesupport/akonadi/server/src/handler/expunge.cpp,
+ trunk/kdesupport/akonadi/server/src/handler/list.cpp,
trunk/kdesupport/akonadi/server/src/handler/select.cpp,
trunk/kdesupport/akonadi/server/src/handler/capability.cpp,
- trunk/kdesupport/akonadi/server/src/handler/status.cpp,
trunk/kdesupport/akonadi/server/src/handler/akappend.cpp,
+ trunk/kdesupport/akonadi/server/src/handler/status.cpp,
trunk/kdesupport/akonadi/server/src/handler/transaction.cpp,
trunk/kdesupport/akonadi/server/src/handler/searchpersistent.cpp,
trunk/kdesupport/akonadi/server/src/handler/resourceselect.cpp,
@@ -417,17 +500,16 @@
2009-09-03 13:21 +0000 [r1019391-1019392] Tobias Koenig tokoe@kde.org
- * trunk/kdesupport/akonadi/server/src/handler/fetchhelper.h
- (added), trunk/kdesupport/akonadi/server/src/handler/fetch.h,
- trunk/kdesupport/akonadi/server/src/handler/search.cpp,
+ * trunk/kdesupport/akonadi/server/src/handler/fetch.h,
+ trunk/kdesupport/akonadi/server/src/handler/fetchhelper.h
+ (added), trunk/kdesupport/akonadi/server/src/handler/search.cpp,
trunk/kdesupport/akonadi/server/CMakeLists.txt,
- trunk/kdesupport/akonadi/server/src/handler/fetchhelper.cpp
- (added),
trunk/kdesupport/akonadi/server/src/akonadiconnection.cpp,
trunk/kdesupport/akonadi/server/src/handler/fetch.cpp,
- trunk/kdesupport/akonadi/server/src/handler/search.h: Refactor
- fetch handler to allow code sharing with search handler The
- SEARCH command takes fetchScope information now and returns
+ trunk/kdesupport/akonadi/server/src/handler/fetchhelper.cpp
+ (added), trunk/kdesupport/akonadi/server/src/handler/search.h:
+ Refactor fetch handler to allow code sharing with search handler
+ The SEARCH command takes fetchScope information now and returns
complete item descriptions, not only uids
* trunk/kdesupport/akonadi/server/akonadictl/main.cpp: Give status
@@ -690,8 +772,8 @@
trunk/kdesupport/akonadi/server/src/storage/datastore.h,
trunk/kdesupport/akonadi/server/src/handler/colmove.cpp,
trunk/kdesupport/akonadi/server/src/storage/notificationcollector.cpp,
- trunk/kdesupport/akonadi/server/src/handler/rename.cpp (removed),
trunk/kdesupport/akonadi/server/src/handler/modify.cpp,
+ trunk/kdesupport/akonadi/server/src/handler/rename.cpp (removed),
trunk/kdesupport/akonadi/server/CMakeLists.txt,
trunk/kdesupport/akonadi/server/src/storage/collectionqueryhelper.cpp,
trunk/kdesupport/akonadi/server/src/storage/notificationcollector.h:
@@ -1303,8 +1385,8 @@
* trunk/kdesupport/akonadi/server/src/handler/store.cpp,
trunk/kdesupport/akonadi/server/tests/unittest/handlertest.h,
trunk/kdesupport/akonadi/server/src/handler.cpp,
- trunk/kdesupport/akonadi/server/src/handler/uid.cpp (removed),
trunk/kdesupport/akonadi/server/src/handler/store.h,
+ trunk/kdesupport/akonadi/server/src/handler/uid.cpp (removed),
trunk/kdesupport/akonadi/server/src/handler.h,
trunk/kdesupport/akonadi/server/src/handler/uid.h (removed),
trunk/kdesupport/akonadi/server/CMakeLists.txt,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/akonadi-1.2.80/NEWS new/akonadi-1.2.90/NEWS
--- old/akonadi-1.2.80/NEWS 2009-12-01 18:16:02.000000000 +0100
+++ new/akonadi-1.2.90/NEWS 2010-01-06 19:37:21.000000000 +0100
@@ -1,3 +1,12 @@
+1.2.90 06-January-2010
+---------------------------------------------
+- Fix change notifications for search results.
+- Fix database creation with PostgreSQL.
+- Fix copying of item flags.
+- Fix internal MySQL shutdown.
+- Support PostgreSQL in internal mode.
+- Fix table name case mismatch.
+
1.2.80 01-December-2009
---------------------------------------------
- Support for collection content type filtering as part of LIST.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/akonadi-1.2.80/server/src/akonadi.cpp new/akonadi-1.2.90/server/src/akonadi.cpp
--- old/akonadi-1.2.80/server/src/akonadi.cpp 2009-12-01 18:16:02.000000000 +0100
+++ new/akonadi-1.2.90/server/src/akonadi.cpp 2010-01-06 19:37:20.000000000 +0100
@@ -242,9 +242,9 @@
if ( !DbConfig::useInternalServer() )
return;
- const QString mysqldPath = DbConfig::serverPath();
- if ( mysqldPath.isEmpty() )
- akFatal() << "No path to mysqld set in server configuration!";
+ const QString serverPath = DbConfig::serverPath();
+ if ( serverPath.isEmpty() )
+ akFatal() << "No path to external sql server set in server configuration!";
// create the database directories if they don't exists
const QString dataDir = XdgBaseDirs::saveDir( "data", QLatin1String( "akonadi/db_data" ) );
@@ -252,12 +252,135 @@
const QString miscDir = XdgBaseDirs::saveDir( "data", QLatin1String( "akonadi/db_misc" ) );
const QString fileDataDir = XdgBaseDirs::saveDir( "data", QLatin1String( "akonadi/file_db_data" ) );
+ if ( DbConfig::driverName() == QLatin1String( "QMYSQL" ) )
+ startMysqlDatabaseProcess();
+ else if ( DbConfig::driverName() == QLatin1String( "QPSQL" ) )
+ startPostgresqlDatabaseProcess();
+}
+
+void AkonadiServer::startPostgresqlDatabaseProcess()
+{
+ const QString dataDir = XdgBaseDirs::saveDir( "data", QLatin1String( "akonadi/db_data" ) );
+ const QString socketDir = XdgBaseDirs::saveDir( "data", QLatin1String( "akonadi/db_misc" ) );
+
+ if ( !QFile::exists( QString::fromLatin1( "%1/PG_VERSION" ).arg( dataDir ) ) ) {
+ // postgre data directory not initialized yet, so call initdb on it
+
+ const QStringList postgresSearchPath = QStringList()
+ << QLatin1String("/usr/sbin")
+ << QLatin1String("/usr/local/sbin")
+ << QLatin1String("/usr/lib/postgresql/8.4/bin");
+
+ const QString initDbPath = XdgBaseDirs::findExecutableFile( QLatin1String( "initdb" ), postgresSearchPath );
+
+ // call 'initdb -D/home/user/.local/share/akonadi/data_db'
+ const QString command = QString::fromLatin1( "%1 -D%2" ).arg( initDbPath ).arg( dataDir );
+ QProcess::execute( command );
+
+ const QString configFileName = dataDir + QDir::separator() + QLatin1String( "postgresql.conf" );
+ QFile configFile( configFileName );
+ configFile.open( QIODevice::ReadOnly );
+
+ QString content = QString::fromUtf8( configFile.readAll() );
+ configFile.close();
+
+ // avoid binding to tcp port
+ content.replace( QLatin1String( "#listen_addresses = 'localhost'" ),
+ QLatin1String( "listen_addresses = ''" ) );
+
+ // set the directory for unix domain socket communication
+ content.replace( QLatin1String( "#unix_socket_directory = ''" ),
+ QString::fromLatin1( "unix_socket_directory = '%1'" ).arg( socketDir ) );
+
+ // treat backslashes in strings literally as defined in the SQL standard
+ content.replace( QLatin1String( "#standard_conforming_strings = off" ),
+ QLatin1String( "standard_conforming_strings = on" ) );
+
+ configFile.open( QIODevice::WriteOnly );
+ configFile.write( content.toUtf8() );
+ configFile.close();
+ }
+
+ // synthesize the postgres command
+ QStringList arguments;
+ arguments << QString::fromLatin1( "-D%1" ).arg( dataDir );
+
+ mDatabaseProcess = new QProcess( this );
+ mDatabaseProcess->start( DbConfig::serverPath(), arguments );
+ if ( !mDatabaseProcess->waitForStarted() ) {
+ akError() << "Could not start database server!";
+ akError() << "executable:" << DbConfig::serverPath();
+ akError() << "arguments:" << arguments;
+ akFatal() << "process error:" << mDatabaseProcess->errorString();
+ }
+
+ const QLatin1String initCon( "initConnection" );
+ {
+ QSqlDatabase db = QSqlDatabase::addDatabase( DbConfig::driverName(), initCon );
+ DbConfig::configure( db );
+
+ // use the dummy database that is always available
+ db.setDatabaseName( QLatin1String( "template1" ) );
+
+ if ( !db.isValid() )
+ akFatal() << "Invalid database object during database server startup";
+
+ bool opened = false;
+ for ( int i = 0; i < 120; ++i ) {
+ opened = db.open();
+ if ( opened )
+ break;
+
+ if ( mDatabaseProcess->waitForFinished( 500 ) ) {
+ akError() << "Database process exited unexpectedly during initial connection!";
+ akError() << "executable:" << DbConfig::serverPath();
+ akError() << "arguments:" << arguments;
+ akError() << "stdout:" << mDatabaseProcess->readAllStandardOutput();
+ akError() << "stderr:" << mDatabaseProcess->readAllStandardError();
+ akError() << "exit code:" << mDatabaseProcess->exitCode();
+ akFatal() << "process error:" << mDatabaseProcess->errorString();
+ }
+ }
+
+ if ( opened ) {
+ {
+ QSqlQuery query( db );
+
+ // check if the 'akonadi' database already exists
+ query.exec( QString::fromLatin1( "SELECT * FROM pg_catalog.pg_database WHERE datname = '%1'" ).arg( DbConfig::databaseName() ) );
+
+ // if not, create it
+ if ( !query.first() ) {
+ if ( !query.exec( QString::fromLatin1( "CREATE DATABASE %1" ).arg( DbConfig::databaseName() ) ) ) {
+ akError() << "Failed to create database";
+ akError() << "Query error:" << query.lastError().text();
+ akFatal() << "Database error:" << db.lastError().text();
+ }
+ }
+ } // make sure query is destroyed before we close the db
+ db.close();
+ }
+ }
+
+ QSqlDatabase::removeDatabase( initCon );
+}
+
+void AkonadiServer::startMysqlDatabaseProcess()
+{
+ const QString mysqldPath = DbConfig::serverPath();
+
+ const QString dataDir = XdgBaseDirs::saveDir( "data", QLatin1String( "akonadi/db_data" ) );
+ const QString akDir = XdgBaseDirs::saveDir( "data", QLatin1String( "akonadi/" ) );
+ const QString miscDir = XdgBaseDirs::saveDir( "data", QLatin1String( "akonadi/db_misc" ) );
+ const QString fileDataDir = XdgBaseDirs::saveDir( "data", QLatin1String( "akonadi/file_db_data" ) );
+
// generate config file
const QString globalConfig = XdgBaseDirs::findResourceFile( "config", QLatin1String( "akonadi/mysql-global.conf" ) );
const QString localConfig = XdgBaseDirs::findResourceFile( "config", QLatin1String( "akonadi/mysql-local.conf" ) );
const QString actualConfig = XdgBaseDirs::saveDir( "data", QLatin1String( "akonadi" ) ) + QLatin1String("/mysql.conf");
if ( globalConfig.isEmpty() )
akFatal() << "Did not find MySQL server default configuration (mysql-global.conf)";
+
bool confUpdate = false;
QFile actualFile ( actualConfig );
// update conf only if either global (or local) is newer than actual
@@ -301,6 +424,10 @@
if ( miscDir.isEmpty() )
akFatal() << "Akonadi server was not able not create database misc directory";
+ // the socket path must not exceed 103 characters, so check for max dir length right away
+ if ( miscDir.length() >= 90 )
+ akFatal() << "MySQL cannot deal with a socket path this long. Path was: " << miscDir;
+
// move mysql error log file out of the way
const QFileInfo errorLog( dataDir + QDir::separator() + QString::fromLatin1( "mysql.err" ) );
if ( errorLog.exists() ) {
@@ -388,26 +515,30 @@
const QLatin1String initCon( "initConnection" );
QSqlDatabase db = QSqlDatabase::addDatabase( DbConfig::driverName(), initCon );
DbConfig::configure( db );
- db.setDatabaseName( QString() ); // might not exist yet, then connecting to the actual db will fail
+ db.setDatabaseName( DbConfig::databaseName() );
if ( !db.isValid() )
akFatal() << "Invalid database object during initial database connection";
- if ( db.open() ) {
- {
- QSqlQuery query( db );
- if ( !query.exec( QString::fromLatin1( "USE %1" ).arg( DbConfig::databaseName() ) ) ) {
- akDebug() << "Failed to use database" << DbConfig::databaseName();
- akDebug() << "Query error:" << query.lastError().text();
- akDebug() << "Database error:" << db.lastError().text();
- akDebug() << "Trying to create database now...";
+ if ( db.open() )
+ db.close();
+ else {
+ akDebug() << "Failed to use database" << DbConfig::databaseName();
+ akDebug() << "Database error:" << db.lastError().text();
+ akDebug() << "Trying to create database now...";
+
+ db.close();
+ db.setDatabaseName( QString() );
+ if ( db.open() ) {
+ {
+ QSqlQuery query( db );
if ( !query.exec( QLatin1String( "CREATE DATABASE akonadi" ) ) ) {
akError() << "Failed to create database";
akError() << "Query error:" << query.lastError().text();
akFatal() << "Database error:" << db.lastError().text();
}
- }
- } // make sure query is destroyed before we close the db
- db.close();
+ } // make sure query is destroyed before we close the db
+ db.close();
+ }
}
QSqlDatabase::removeDatabase( initCon );
}
@@ -416,8 +547,19 @@
{
if ( !mDatabaseProcess )
return;
+
+ // first, try the nicest approach
+ const QString shutdownCmd = DbConfig::cleanServerShutdownCommand();
+ if ( !shutdownCmd.isEmpty() ) {
+ QProcess::execute( shutdownCmd );
+ if ( mDatabaseProcess->waitForFinished(3000) )
+ return;
+ }
mDatabaseProcess->terminate();
- mDatabaseProcess->waitForFinished();
+ const bool result = mDatabaseProcess->waitForFinished(3000);
+ // We've waited nicely for 3 seconds, to no avail, let's be rude.
+ if ( !result )
+ mDatabaseProcess->kill();
}
void AkonadiServer::serviceOwnerChanged(const QString & name, const QString & oldOwner, const QString & newOwner)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/akonadi-1.2.80/server/src/akonadi.h new/akonadi-1.2.90/server/src/akonadi.h
--- old/akonadi-1.2.80/server/src/akonadi.h 2009-12-01 18:16:02.000000000 +0100
+++ new/akonadi-1.2.90/server/src/akonadi.h 2010-01-06 19:37:20.000000000 +0100
@@ -66,6 +66,9 @@
void createDatabase();
void stopDatabaseProcess();
+ void startMysqlDatabaseProcess();
+ void startPostgresqlDatabaseProcess();
+
CacheCleaner *mCacheCleaner;
IntervalCheck *mIntervalChecker;
ItemRetrievalThread *mItemRetrievalThread;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/akonadi-1.2.80/server/src/handler/copy.cpp new/akonadi-1.2.90/server/src/handler/copy.cpp
--- old/akonadi-1.2.80/server/src/handler/copy.cpp 2009-12-01 18:16:00.000000000 +0100
+++ new/akonadi-1.2.90/server/src/handler/copy.cpp 2010-01-06 19:37:20.000000000 +0100
@@ -52,7 +52,13 @@
newPart.setPimItemId( -1 );
parts << newPart;
}
- return store->appendPimItem( parts, item.mimeType(), target, QDateTime::currentDateTime(), QString(), newItem );
+ if ( !store->appendPimItem( parts, item.mimeType(), target, QDateTime::currentDateTime(), QString(), newItem ) )
+ return false;
+ foreach ( const Flag &flag, item.flags() ) {
+ if ( !newItem.addFlag( flag ) )
+ return false;
+ }
+ return true;
}
bool Copy::parseStream()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/akonadi-1.2.80/server/src/nepomukmanager.cpp new/akonadi-1.2.90/server/src/nepomukmanager.cpp
--- old/akonadi-1.2.80/server/src/nepomukmanager.cpp 2009-12-01 18:16:02.000000000 +0100
+++ new/akonadi-1.2.90/server/src/nepomukmanager.cpp 2010-01-06 19:37:20.000000000 +0100
@@ -26,6 +26,8 @@
#include "search/result.h"
#include "entities.h"
+#include "storage/notificationcollector.h"
+#include "notificationmanager.h"
using namespace Akonadi;
@@ -43,10 +45,12 @@
NepomukManager::NepomukManager( QObject* parent )
: QObject( parent ),
- mValid( true )
+ mValid( true ),
+ mCollector( new NotificationCollector( this ) )
{
Q_ASSERT( mInstance == 0 );
mInstance = this;
+ NotificationManager::self()->connectNotificationCollector( mCollector );
if ( !Nepomuk::Search::QueryServiceClient::serviceAvailable() ) {
qWarning() << "Nepomuk QueryServer interface not available!";
@@ -155,17 +159,19 @@
mMutex.lock();
qint64 collectionId = mQueryMap.value( query );
mMutex.unlock();
+ const Collection collection = Collection::retrieveById( collectionId );
Q_FOREACH( const Nepomuk::Search::Result &result, entries ) {
const qint64 itemId = uriToItemId( result.resourceUri() );
- if ( itemId == -1 ) {
- qWarning() << "Nepomuk QueryServer: Retrieved invalid item id from server!";
+ if ( itemId == -1 )
continue;
- }
Entity::addToRelation<CollectionPimItemRelation>( collectionId, itemId );
+ mCollector->itemLinked( PimItem::retrieveById( itemId ), collection );
}
+
+ mCollector->dispatchNotifications();
}
void NepomukManager::hitsRemoved( const QList<QUrl> &entries )
@@ -179,17 +185,19 @@
mMutex.lock();
qint64 collectionId = mQueryMap.value( query );
mMutex.unlock();
+ const Collection collection = Collection::retrieveById( collectionId );
Q_FOREACH( const QUrl &uri, entries ) {
const qint64 itemId = uriToItemId( uri );
- if ( itemId == -1 ) {
- qWarning() << "Nepomuk QueryServer: Retrieved invalid item id from server!";
+ if ( itemId == -1 )
continue;
- }
Entity::removeFromRelation<CollectionPimItemRelation>( collectionId, itemId );
+ mCollector->itemUnlinked( PimItem::retrieveById( itemId ), collection );
}
+
+ mCollector->dispatchNotifications();
}
#include "nepomukmanager.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/akonadi-1.2.80/server/src/nepomukmanager.h new/akonadi-1.2.90/server/src/nepomukmanager.h
--- old/akonadi-1.2.80/server/src/nepomukmanager.h 2009-12-01 18:16:02.000000000 +0100
+++ new/akonadi-1.2.90/server/src/nepomukmanager.h 2010-01-06 19:37:20.000000000 +0100
@@ -30,6 +30,8 @@
namespace Akonadi {
+class NotificationCollector;
+
class NepomukManager : public QObject, public AbstractSearchManager
{
Q_OBJECT
@@ -53,6 +55,7 @@
private:
bool mValid;
QMutex mMutex;
+ NotificationCollector* mCollector;
QHash