summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2012-10-04 07:25:15 +0000
committerJohannes Huber <johu@gentoo.org>2012-10-04 07:25:15 +0000
commit192a086ea8c322e5a4d83bfc8bfe0b04d1e18c84 (patch)
treecb4f1c4efcfc9316337eab6da6a5b0e3b70ef19f /kde-base/nepomuk-core
parentMaintenance release. Remove buggy 3.21.51 (diff)
downloadgentoo-2-192a086ea8c322e5a4d83bfc8bfe0b04d1e18c84.tar.gz
gentoo-2-192a086ea8c322e5a4d83bfc8bfe0b04d1e18c84.tar.bz2
gentoo-2-192a086ea8c322e5a4d83bfc8bfe0b04d1e18c84.zip
Revision bump backports upstream patches to fix bug #435112. Remove unused patches.
(Portage version: 2.2.0_alpha134/cvs/Linux x86_64)
Diffstat (limited to 'kde-base/nepomuk-core')
-rw-r--r--kde-base/nepomuk-core/ChangeLog13
-rw-r--r--kde-base/nepomuk-core/files/nepomuk-core-4.9.0-kinotify-infinite-loop.patch21
-rw-r--r--kde-base/nepomuk-core/files/nepomuk-core-4.9.0-kinotify-memleak.patch105
-rw-r--r--kde-base/nepomuk-core/files/nepomuk-core-4.9.2-dirwatch-null.patch44
-rw-r--r--kde-base/nepomuk-core/files/nepomuk-core-4.9.2-kinotify-delete.patch25
-rw-r--r--kde-base/nepomuk-core/nepomuk-core-4.9.2-r1.ebuild (renamed from kde-base/nepomuk-core/nepomuk-core-4.9.2.ebuild)7
6 files changed, 87 insertions, 128 deletions
diff --git a/kde-base/nepomuk-core/ChangeLog b/kde-base/nepomuk-core/ChangeLog
index 7eccb3b5d671..9a6b83e48351 100644
--- a/kde-base/nepomuk-core/ChangeLog
+++ b/kde-base/nepomuk-core/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for kde-base/nepomuk-core
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/nepomuk-core/ChangeLog,v 1.10 2012/10/02 18:11:48 johu Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/nepomuk-core/ChangeLog,v 1.11 2012/10/04 07:25:15 johu Exp $
+
+*nepomuk-core-4.9.2-r1 (04 Oct 2012)
+
+ 04 Oct 2012; Johannes Huber <johu@gentoo.org>
+ +files/nepomuk-core-4.9.2-dirwatch-null.patch,
+ +files/nepomuk-core-4.9.2-kinotify-delete.patch,
+ +nepomuk-core-4.9.2-r1.ebuild,
+ -files/nepomuk-core-4.9.0-kinotify-infinite-loop.patch,
+ -files/nepomuk-core-4.9.0-kinotify-memleak.patch, -nepomuk-core-4.9.2.ebuild:
+ Revision bump backports upstream patches to fix bug #435112. Remove unused
+ patches.
*nepomuk-core-4.9.2 (02 Oct 2012)
diff --git a/kde-base/nepomuk-core/files/nepomuk-core-4.9.0-kinotify-infinite-loop.patch b/kde-base/nepomuk-core/files/nepomuk-core-4.9.0-kinotify-infinite-loop.patch
deleted file mode 100644
index 95554867c498..000000000000
--- a/kde-base/nepomuk-core/files/nepomuk-core-4.9.0-kinotify-infinite-loop.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-commit 7322b28f46969adb721daecf5a7fb67b8e0c6ae4
-Author: Vishesh Handa <me@vhanda.in>
-Date: Wed Aug 8 14:33:02 2012 +0530
-
- Break out of kinotify's _k_addWatches loop
-
- Didn't test the patch out after making a super trivial change in the
- review request. Stupid Stupid me!
-
-diff --git a/services/filewatch/kinotify.cpp b/services/filewatch/kinotify.cpp
-index 47eb8ed..509abff 100644
---- a/services/filewatch/kinotify.cpp
-+++ b/services/filewatch/kinotify.cpp
-@@ -152,6 +152,7 @@ public:
- }
- else {
- delete dirIterators.dequeue();
-+ break;
- }
- }
-
diff --git a/kde-base/nepomuk-core/files/nepomuk-core-4.9.0-kinotify-memleak.patch b/kde-base/nepomuk-core/files/nepomuk-core-4.9.0-kinotify-memleak.patch
deleted file mode 100644
index 806f6c924ef5..000000000000
--- a/kde-base/nepomuk-core/files/nepomuk-core-4.9.0-kinotify-memleak.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-commit a81f05034baef438eacd346fcbc97dd818a0b5bf
-Author: Vishesh Handa <me@vhanda.in>
-Date: Mon Aug 6 15:01:14 2012 +0530
-
- kinotify: Do not store the paths to be added
-
- kinotify used a QQueue<QByteArray> to store all the directories which
- need to be added. Since we use QDirIterator, each path is presented as a
- QString which is then encoded to its QByteArray (QFile::encodeName).
- This results in *large* chunks of memory being allocated, and then
- slowly being deallocated.
-
- Instead, we now use a QDirIterator, and do not store all the directories
- which need to be added, we simply iterate over them. This way we do not
- allocate large amounts of memory.
-
- There is a large performance improvement as well. On my system, with
- 38829 directories, adding all the watches now takes only about 10 seconds,
- instead of about 65.
-
- Patch possible due to massif output provided by Jure Repinc <jlp@holodeck1.com>.
- Thanks a lot.
-
- tldr: Use DFS instead of BFS -> Less memory consumption
-
- BUG: 304476
- REVIEW: 105892
- DIGEST: Fix massive memory leak in Nepomuk File Monitoring Service
-
-diff --git a/services/filewatch/kinotify.cpp b/services/filewatch/kinotify.cpp
-index e8843c8..47eb8ed 100644
---- a/services/filewatch/kinotify.cpp
-+++ b/services/filewatch/kinotify.cpp
-@@ -79,8 +79,8 @@ public:
- QHash<int, QByteArray> watchPathHash;
- QHash<QByteArray, int> pathWatchHash;
-
-- /// queue of paths to install watches for
-- QQueue<QByteArray> pathsToWatch;
-+ /// A list of all the current dirIterators
-+ QQueue<QDirIterator*> dirIterators;
-
- unsigned char eventBuffer[EVENT_BUFFER_SIZE];
-
-@@ -136,20 +136,6 @@ public:
- }
- }
-
-- bool addWatchesRecursively( const QByteArray& path )
-- {
-- if ( !addWatch( path ) )
-- return false;
--
-- const QString stringPath = QFile::decodeName(path);
-- QDirIterator iter( stringPath, QDir::Dirs | QDir::NoDotAndDotDot );
-- while( iter.hasNext() ) {
-- pathsToWatch.enqueue( QFile::encodeName(iter.next()) );
-- }
--
-- return true;
-- }
--
- void removeWatch( int wd ) {
- kDebug() << wd << watchPathHash[wd];
- pathWatchHash.remove( watchPathHash.take( wd ) );
-@@ -159,19 +145,20 @@ public:
- void _k_addWatches() {
- // add the next batch of paths
- for ( int i = 0; i < 100; ++i ) {
-- if ( pathsToWatch.isEmpty() ||
-- !addWatchesRecursively( pathsToWatch.dequeue() ) ) {
-- return;
-+ QDirIterator* it = dirIterators.front();
-+ if( it->hasNext() ) {
-+ it->next();
-+ addWatch( QFile::encodeName(it->filePath()) );
-+ }
-+ else {
-+ delete dirIterators.dequeue();
- }
- }
-
- // asyncroneously add the next batch
-- if ( !pathsToWatch.isEmpty() ) {
-+ if ( !dirIterators.isEmpty() ) {
- QMetaObject::invokeMethod( q, "_k_addWatches", Qt::QueuedConnection );
- }
-- else {
-- kDebug() << "All watches installed";
-- }
- }
-
- private:
-@@ -245,7 +232,10 @@ bool KInotify::addWatch( const QString& path, WatchEvents mode, WatchFlags flags
-
- d->mode = mode;
- d->flags = flags;
-- d->pathsToWatch.append( QFile::encodeName( path ) );
-+ d->addWatch( QFile::encodeName(path) );
-+ QDirIterator* iter = new QDirIterator( path, QDir::Dirs | QDir::NoDotAndDotDot,
-+ QDirIterator::Subdirectories );
-+ d->dirIterators.append( iter );
- d->_k_addWatches();
- return true;
- }
diff --git a/kde-base/nepomuk-core/files/nepomuk-core-4.9.2-dirwatch-null.patch b/kde-base/nepomuk-core/files/nepomuk-core-4.9.2-dirwatch-null.patch
new file mode 100644
index 000000000000..fb08140536bf
--- /dev/null
+++ b/kde-base/nepomuk-core/files/nepomuk-core-4.9.2-dirwatch-null.patch
@@ -0,0 +1,44 @@
+commit 32b44881dda4f243932c59c11bf39c91f30c224b
+Author: Dan Vrátil <dvratil@redhat.com>
+Date: Wed Oct 3 13:27:22 2012 +0200
+
+ Add null-crash guards for m_dirWatch to FileWatch
+
+ BUG: 307388
+
+diff --git a/services/filewatch/nepomukfilewatch.cpp b/services/filewatch/nepomukfilewatch.cpp
+index 94db504..83045da 100644
+--- a/services/filewatch/nepomukfilewatch.cpp
++++ b/services/filewatch/nepomukfilewatch.cpp
+@@ -114,6 +114,7 @@ namespace {
+
+ Nepomuk2::FileWatch::FileWatch( QObject* parent, const QList<QVariant>& )
+ : Service( parent )
++ , m_dirWatch( 0 )
+ {
+ // Create the configuration instance singleton (for thread-safety)
+ // ==============================================================
+@@ -324,8 +325,10 @@ void Nepomuk2::FileWatch::slotInotifyWatchUserLimitReached()
+ {
+ // we do it the brutal way for now hoping with new kernels and defaults this will never happen
+ // Delete the KInotify and switch to KDirNotify dbus signals
+- m_dirWatch->deleteLater();
+- m_dirWatch = 0;
++ if( m_dirWatch ) {
++ m_dirWatch->deleteLater();
++ m_dirWatch = 0;
++ }
+ connectToKDirWatch();
+ }
+ #endif
+@@ -413,7 +416,9 @@ void Nepomuk2::FileWatch::slotDeviceMounted(const Nepomuk2::RemovableMediaCache:
+ void Nepomuk2::FileWatch::slotDeviceTeardownRequested(const Nepomuk2::RemovableMediaCache::Entry* entry )
+ {
+ #ifdef BUILD_KINOTIFY
+- m_dirWatch->removeWatch( entry->mountPath() );
++ if( m_dirWatch ) {
++ m_dirWatch->removeWatch( entry->mountPath() );
++ }
+ #endif
+ }
+
diff --git a/kde-base/nepomuk-core/files/nepomuk-core-4.9.2-kinotify-delete.patch b/kde-base/nepomuk-core/files/nepomuk-core-4.9.2-kinotify-delete.patch
new file mode 100644
index 000000000000..a683c133b336
--- /dev/null
+++ b/kde-base/nepomuk-core/files/nepomuk-core-4.9.2-kinotify-delete.patch
@@ -0,0 +1,25 @@
+commit 804e54f83ade8a377d392d350981ead07f60a9d3
+Author: David Faure <faure@kde.org>
+Date: Tue Oct 2 20:27:03 2012 +0200
+
+ Fix crash when watchUserLimitReached() leads to deleting the KInotify instance
+
+ ... which emitted the signal. So don't use a direct delete.
+
+ BUG: 307388
+ FIXED-IN: 4.9.3
+
+diff --git a/services/filewatch/nepomukfilewatch.cpp b/services/filewatch/nepomukfilewatch.cpp
+index 9fd5d9c..94db504 100644
+--- a/services/filewatch/nepomukfilewatch.cpp
++++ b/services/filewatch/nepomukfilewatch.cpp
+@@ -323,7 +323,8 @@ void Nepomuk2::FileWatch::connectToKDirWatch()
+ void Nepomuk2::FileWatch::slotInotifyWatchUserLimitReached()
+ {
+ // we do it the brutal way for now hoping with new kernels and defaults this will never happen
+- delete m_dirWatch;
++ // Delete the KInotify and switch to KDirNotify dbus signals
++ m_dirWatch->deleteLater();
+ m_dirWatch = 0;
+ connectToKDirWatch();
+ }
diff --git a/kde-base/nepomuk-core/nepomuk-core-4.9.2.ebuild b/kde-base/nepomuk-core/nepomuk-core-4.9.2-r1.ebuild
index 75d33a4b53dc..ded05864b4fa 100644
--- a/kde-base/nepomuk-core/nepomuk-core-4.9.2.ebuild
+++ b/kde-base/nepomuk-core/nepomuk-core-4.9.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/nepomuk-core/nepomuk-core-4.9.2.ebuild,v 1.1 2012/10/02 18:11:48 johu Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/nepomuk-core/nepomuk-core-4.9.2-r1.ebuild,v 1.1 2012/10/04 07:25:15 johu Exp $
EAPI=4
@@ -20,3 +20,8 @@ add_blocker nepomuk '<4.8.80'
RESTRICT="test"
# bug 392989
+
+PATCHES=(
+ "${FILESDIR}/${P}-kinotify-delete.patch"
+ "${FILESDIR}/${P}-dirwatch-null.patch"
+)