summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2013-02-10 16:02:47 +0000
committerMichael Palimaka <kensington@gentoo.org>2013-02-10 16:02:47 +0000
commit43beabd5ff3cb37da7edc7d3b4a35f22152a5eaa (patch)
tree2b2c031a5829472a881cc5e48c62faa6e9a6354f /kde-base/nepomuk-core
parentLastrite media-tv/ivtv because it's only for Linux 2.6.25 and oldest udev in ... (diff)
downloadgentoo-2-43beabd5ff3cb37da7edc7d3b4a35f22152a5eaa.tar.gz
gentoo-2-43beabd5ff3cb37da7edc7d3b4a35f22152a5eaa.tar.bz2
gentoo-2-43beabd5ff3cb37da7edc7d3b4a35f22152a5eaa.zip
Backport patch from upstream to fix recursive file indexing.
(Portage version: 2.1.11.50/cvs/Linux x86_64, signed Manifest commit with key 675D0D2C)
Diffstat (limited to 'kde-base/nepomuk-core')
-rw-r--r--kde-base/nepomuk-core/ChangeLog8
-rw-r--r--kde-base/nepomuk-core/files/nepomuk-core-4.10.0-indexer.patch108
-rw-r--r--kde-base/nepomuk-core/nepomuk-core-4.10.0-r1.ebuild23
3 files changed, 138 insertions, 1 deletions
diff --git a/kde-base/nepomuk-core/ChangeLog b/kde-base/nepomuk-core/ChangeLog
index a42d2281191a..61c3dceb0398 100644
--- a/kde-base/nepomuk-core/ChangeLog
+++ b/kde-base/nepomuk-core/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for kde-base/nepomuk-core
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/nepomuk-core/ChangeLog,v 1.28 2013/02/07 04:57:53 alexxy Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/nepomuk-core/ChangeLog,v 1.29 2013/02/10 16:02:46 kensington Exp $
+
+*nepomuk-core-4.10.0-r1 (10 Feb 2013)
+
+ 10 Feb 2013; Michael Palimaka <kensington@gentoo.org>
+ +files/nepomuk-core-4.10.0-indexer.patch, +nepomuk-core-4.10.0-r1.ebuild:
+ Backport patch from upstream to fix recursive file indexing.
06 Feb 2013; Naohiro Aota <naota@gentoo.org> nepomuk-core-4.9.5.ebuild:
Add ~x86-fbsd wrt bug #430072
diff --git a/kde-base/nepomuk-core/files/nepomuk-core-4.10.0-indexer.patch b/kde-base/nepomuk-core/files/nepomuk-core-4.10.0-indexer.patch
new file mode 100644
index 000000000000..9f2231ade4e2
--- /dev/null
+++ b/kde-base/nepomuk-core/files/nepomuk-core-4.10.0-indexer.patch
@@ -0,0 +1,108 @@
+From b651f9231ac30072418bb06d602951f0f05da22c Mon Sep 17 00:00:00 2001
+From: Vishesh Handa <me@vhanda.in>
+Date: Sat, 9 Feb 2013 02:28:33 +0530
+Subject: [PATCH] Revert "BasicIndexingQueue: Use stacks instead of queues"
+
+This reverts commit 2f33141aa6716550e38b11ec9a0b000dd74eea79.
+
+The commit breaks recursive indexing. Doh!
+
+BUG: 314559
+---
+ services/fileindexer/basicindexingqueue.cpp | 18 ++++++------------
+ services/fileindexer/basicindexingqueue.h | 5 ++---
+ 2 files changed, 8 insertions(+), 15 deletions(-)
+
+diff --git a/services/fileindexer/basicindexingqueue.cpp b/services/fileindexer/basicindexingqueue.cpp
+index a295330..b581786 100644
+--- a/services/fileindexer/basicindexingqueue.cpp
++++ b/services/fileindexer/basicindexingqueue.cpp
+@@ -54,14 +54,14 @@ void BasicIndexingQueue::clear()
+
+ void BasicIndexingQueue::clear(const QString& path)
+ {
+- QMutableVectorIterator< QPair<QString, UpdateDirFlags> > it( m_paths );
++ QMutableListIterator< QPair<QString, UpdateDirFlags> > it( m_paths );
+ while( it.hasNext() ) {
+ it.next();
+ if( it.value().first.startsWith( path ) )
+ it.remove();
+ }
+
+- QMutableVectorIterator< QPair<QDirIterator*, UpdateDirFlags> > iter( m_iterators );
++ QMutableListIterator< QPair<QDirIterator*, UpdateDirFlags> > iter( m_iterators );
+ while( iter.hasNext() ) {
+ QDirIterator* dirIter = iter.next().first;
+
+@@ -100,7 +100,7 @@ void BasicIndexingQueue::enqueue(const QString& path, UpdateDirFlags flags)
+ {
+ kDebug() << path;
+ bool wasEmpty = m_paths.empty();
+- m_paths.push( qMakePair( path, flags ) );
++ m_paths.enqueue( qMakePair( path, flags ) );
+ callForNextIteration();
+
+ if( wasEmpty )
+@@ -120,12 +120,12 @@ void BasicIndexingQueue::processNextIteration()
+ processingFile = process( dirIt->next(), pair.second );
+ }
+ else {
+- delete m_iterators.pop().first;
++ delete m_iterators.dequeue().first;
+ }
+ }
+
+ else if( !m_paths.isEmpty() ) {
+- QPair< QString, UpdateDirFlags > pair = m_paths.pop();
++ QPair< QString, UpdateDirFlags > pair = m_paths.dequeue();
+ processingFile = process( pair.first, pair.second );
+ }
+
+@@ -161,7 +161,7 @@ bool BasicIndexingQueue::process(const QString& path, UpdateDirFlags flags)
+ QDir::Filters dirFilter = QDir::NoDotAndDotDot|QDir::Readable|QDir::Files|QDir::Dirs;
+
+ QPair<QDirIterator*, UpdateDirFlags> pair = qMakePair( new QDirIterator( path, dirFilter ), flags );
+- m_iterators.push( pair );
++ m_iterators.enqueue( pair );
+ }
+ }
+ else if( info.isFile() && (forced || indexingRequired) ) {
+@@ -259,12 +259,6 @@ void BasicIndexingQueue::slotIndexingFinished(KJob* job)
+
+ emit endIndexingFile( url );
+
+- // Give back the memory
+- if( m_paths.isEmpty() )
+- m_paths.clear();
+- if( m_iterators.isEmpty() )
+- m_iterators.clear();
+-
+ // Continue the queue
+ finishIteration();
+ }
+diff --git a/services/fileindexer/basicindexingqueue.h b/services/fileindexer/basicindexingqueue.h
+index 29dd9fd..5d1c190 100644
+--- a/services/fileindexer/basicindexingqueue.h
++++ b/services/fileindexer/basicindexingqueue.h
+@@ -23,7 +23,6 @@
+
+ #include "indexingqueue.h"
+ #include <KJob>
+-#include <QtCore/QStack>
+
+ namespace Nepomuk2 {
+
+@@ -106,8 +105,8 @@ namespace Nepomuk2 {
+ */
+ bool process(const QString& path, Nepomuk2::UpdateDirFlags flags);
+
+- QStack< QPair<QString, UpdateDirFlags> > m_paths;
+- QStack< QPair<QDirIterator*, UpdateDirFlags> > m_iterators;
++ QQueue< QPair<QString, UpdateDirFlags> > m_paths;
++ QQueue< QPair<QDirIterator*, UpdateDirFlags> > m_iterators;
+
+ QUrl m_currentUrl;
+ QString m_currentMimeType;
+--
+1.8.1.2
+
diff --git a/kde-base/nepomuk-core/nepomuk-core-4.10.0-r1.ebuild b/kde-base/nepomuk-core/nepomuk-core-4.10.0-r1.ebuild
new file mode 100644
index 000000000000..6976f58d3a94
--- /dev/null
+++ b/kde-base/nepomuk-core/nepomuk-core-4.10.0-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2013 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.10.0-r1.ebuild,v 1.1 2013/02/10 16:02:46 kensington Exp $
+
+EAPI=5
+
+inherit kde4-base
+
+DESCRIPTION="Nepomuk core libraries"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug"
+
+DEPEND="
+ >=dev-libs/soprano-2.9.0[dbus,raptor,redland,virtuoso]
+"
+RDEPEND="${DEPEND}"
+
+add_blocker nepomuk '<4.8.80'
+
+RESTRICT="test"
+# bug 392989
+
+PATCHES=( "${FILESDIR}/${P}-indexer.patch" )