From: "Dennis Schridde" <devurandom@gmx.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/kde:master commit in: kde-base/nepomuk-core/files/, kde-base/nepomuk-core/
Date: Mon, 6 Aug 2012 20:42:56 +0000 (UTC) [thread overview]
Message-ID: <1344285629.ca56132cd123b061963b6f19aa099e557edd4080.devurandom@gentoo> (raw)
commit: ca56132cd123b061963b6f19aa099e557edd4080
Author: Dennis Schridde <devurandom <AT> gmx <DOT> net>
AuthorDate: Mon Aug 6 20:40:29 2012 +0000
Commit: Dennis Schridde <devurandom <AT> gmx <DOT> net>
CommitDate: Mon Aug 6 20:40:29 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=ca56132c
[kde-base/nepomuk-core-4.9.0-r1] Fix for KDE bug #304476 - nepomukfilewatch memleak
Bug: 430226
KDE-Bug: 304476
---
...notify-do-not-store-the-paths-to-be-added.patch | 80 ++++++++++++++++++++
kde-base/nepomuk-core/nepomuk-core-4.9.0-r1.ebuild | 28 +++++++
2 files changed, 108 insertions(+), 0 deletions(-)
diff --git a/kde-base/nepomuk-core/files/nepomuk-core-4.9.0-kinotify-do-not-store-the-paths-to-be-added.patch b/kde-base/nepomuk-core/files/nepomuk-core-4.9.0-kinotify-do-not-store-the-paths-to-be-added.patch
new file mode 100644
index 0000000..7c2cff2
--- /dev/null
+++ b/kde-base/nepomuk-core/files/nepomuk-core-4.9.0-kinotify-do-not-store-the-paths-to-be-added.patch
@@ -0,0 +1,80 @@
+diff --git a/services/filewatch/kinotify.cpp b/services/filewatch/kinotify.cpp
+index e8843c8..5e6ff05 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,24 @@ 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();
++ if( dirIterators.isEmpty() ) {
++ kDebug() << "Done adding watches";
++ return;
++ }
+ }
+ }
+
+ // 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 +236,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/nepomuk-core-4.9.0-r1.ebuild b/kde-base/nepomuk-core/nepomuk-core-4.9.0-r1.ebuild
new file mode 100644
index 0000000..4c95084
--- /dev/null
+++ b/kde-base/nepomuk-core/nepomuk-core-4.9.0-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+KDE_SCM="git"
+inherit kde4-base
+
+DESCRIPTION="Nepomuk core libraries"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug"
+
+DEPEND="
+ >=app-misc/strigi-0.7.7[dbus,qt4]
+ >=dev-libs/soprano-2.8.0[dbus,raptor,redland,virtuoso]
+ !~dev-db/virtuoso-server-6.1.5
+ !~dev-db/virtuoso-odbc-6.1.5
+ !~dev-db/virtuoso-jdbc-6.1.5
+"
+RDEPEND="${DEPEND}"
+
+add_blocker nepomuk '<4.8.80'
+
+RESTRICT="test"
+# bug 392989
+
+PATCHES=( "${FILESDIR}/${P}-kinotify-do-not-store-the-paths-to-be-added.patch" )
next reply other threads:[~2012-08-06 20:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 20:42 Dennis Schridde [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-12-20 12:20 [gentoo-commits] proj/kde:master commit in: kde-base/nepomuk-core/files/, kde-base/nepomuk-core/ Johannes Huber
2013-06-28 12:58 David Heidelberger
2013-06-23 18:49 David Heidelberger
2012-08-07 17:49 Johannes Huber
2012-06-01 16:13 Johannes Huber
2012-05-30 14:45 Johannes Huber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344285629.ca56132cd123b061963b6f19aa099e557edd4080.devurandom@gentoo \
--to=devurandom@gmx.net \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox