diff options
| author | Johannes Huber <johu@gentoo.org> | 2015-08-02 19:00:22 +0200 |
|---|---|---|
| committer | Johannes Huber <johu@gentoo.org> | 2015-08-02 19:00:22 +0200 |
| commit | 12c151c52fe8424961211771dea4ecfd119ceb7c (patch) | |
| tree | 67a81a6b6c6104c0407c127784cb852e62373cd0 | |
| parent | 258ab129b4696d32c3aff66da727625fe1fbce46 (diff) | |
| download | kde-12c151c52fe8424961211771dea4ecfd119ceb7c.tar.gz kde-12c151c52fe8424961211771dea4ecfd119ceb7c.tar.bz2 kde-12c151c52fe8424961211771dea4ecfd119ceb7c.zip | |
[kde-apps/akonadi] Fix start with Qt 5.5
This is already fixed in stable branch.
Package-Manager: portage-2.2.20
| -rw-r--r-- | kde-apps/akonadi/akonadi-9999.ebuild | 2 | ||||
| -rw-r--r-- | kde-apps/akonadi/files/akonadi-qt55-sql.patch | 42 |
2 files changed, 44 insertions, 0 deletions
diff --git a/kde-apps/akonadi/akonadi-9999.ebuild b/kde-apps/akonadi/akonadi-9999.ebuild index e307fe24959..730857559be 100644 --- a/kde-apps/akonadi/akonadi-9999.ebuild +++ b/kde-apps/akonadi/akonadi-9999.ebuild @@ -36,6 +36,8 @@ RDEPEND="${CDEPEND} !app-office/akonadi-server " +PATCHES=( "${FILESDIR}/${PN}-qt55-sql.patch" ) + pkg_setup() { # Set default storage backend in order: MySQL, SQLite PostgreSQL # reverse driver check to keep the order diff --git a/kde-apps/akonadi/files/akonadi-qt55-sql.patch b/kde-apps/akonadi/files/akonadi-qt55-sql.patch new file mode 100644 index 00000000000..5e0158b143d --- /dev/null +++ b/kde-apps/akonadi/files/akonadi-qt55-sql.patch @@ -0,0 +1,42 @@ +From: Martin Koller <kollix@aon.at> +Date: Sun, 02 Aug 2015 14:30:59 +0000 +Subject: Workaround Qt 5.5.0 bug not detecting a failed db.open() +X-Git-Url: http://quickgit.kde.org/?p=akonadi.git&a=commitdiff&h=a0d51b01f45f7b4417455218ff91feaac3aa6bf6 +--- +Workaround Qt 5.5.0 bug not detecting a failed db.open() + +QTBUG-47475 leads to db.open() not detecting that the mysqld does not +run (any connection failure still results in open() returning true) +This patch introduces a workaround to check for the existance of +the mysql unix socket file before we actually try to open the connection + +REVIEW: 124588 +--- + + +--- a/src/server/storage/dbconfigmysql.cpp ++++ b/src/server/storage/dbconfigmysql.cpp +@@ -28,6 +28,7 @@ + #include <QtCore/QDateTime> + #include <QtCore/QDir> + #include <QtCore/QProcess> ++#include <QtCore/QThread> + #include <QtSql/QSqlDriver> + #include <QtSql/QSqlError> + #include <QtSql/QSqlQuery> +@@ -312,6 +313,15 @@ + akFatal() << "process error:" << mDatabaseProcess->errorString(); + } + ++#ifndef Q_OS_WIN ++ // wait until mysqld has created the socket file (workaround for QTBUG-47475 in Qt5.5.0) ++ QString socketFile = QString::fromLatin1("%1/mysql.socket").arg(socketDirectory); ++ int counter = 50; // avoid an endless loop in case mysqld terminated ++ while ((counter-- > 0) && !QFileInfo::exists(socketFile)) { ++ QThread::msleep(100); ++ } ++#endif ++ + const QLatin1String initCon("initConnection"); + { + QSqlDatabase db = QSqlDatabase::addDatabase(QLatin1String("QMYSQL"), initCon); |
