[arch-commits] Commit in kdelibs/kde-unstable (PKGBUILD fix-nepomuk-cpu-usage.patch)

Andrea Scarpino andrea at archlinux.org
Tue Jul 12 16:19:26 EDT 2011


    Date: Tuesday, July 12, 2011 @ 16:19:25
  Author: andrea
Revision: 131358

this patch is for the kde-runtime

Modified:
  kdelibs/kde-unstable/PKGBUILD
Deleted:
  kdelibs/kde-unstable/fix-nepomuk-cpu-usage.patch

-----------------------------+
 PKGBUILD                    |    9 --
 fix-nepomuk-cpu-usage.patch |  133 ------------------------------------------
 2 files changed, 2 insertions(+), 140 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-07-12 20:18:53 UTC (rev 131357)
+++ PKGBUILD	2011-07-12 20:19:25 UTC (rev 131358)
@@ -19,12 +19,10 @@
 replaces=('kdelibs-experimental')
 install='kdelibs.install'
 source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2"
-        'kde-applications-menu.patch' 'archlinux-menu.patch'
-        'fix-nepomuk-cpu-usage.patch')
+        'kde-applications-menu.patch' 'archlinux-menu.patch')
 sha1sums=('9c46d7653a19f5897d4408180de239d7004c470e'
           '86ee8c8660f19de8141ac99cd6943964d97a1ed7'
-          '63a850ab4196b9d06934f2b4a13acd9f7739bc67'
-          'dcddfd7b3191597edaaab93d358e6ff87c53a627')
+          '63a850ab4196b9d06934f2b4a13acd9f7739bc67')
 
 build() {
        cd ${srcdir}/${pkgname}-${pkgver}
@@ -34,9 +32,6 @@
        # add Archlinux menu entry
        patch -p1 -i $srcdir/archlinux-menu.patch
 
-       # Already fixed upstream
-       patch -p1 -i "${srcdir}"/fix-nepomuk-cpu-usage.patch
-
        cd ${srcdir}
        mkdir build
        cd build

Deleted: fix-nepomuk-cpu-usage.patch
===================================================================
--- fix-nepomuk-cpu-usage.patch	2011-07-12 20:18:53 UTC (rev 131357)
+++ fix-nepomuk-cpu-usage.patch	2011-07-12 20:19:25 UTC (rev 131358)
@@ -1,133 +0,0 @@
-commit 327ec9a67af653467b670115ebb3e26b00183c1d
-Author: Sebastian Trueg <trueg at kde.org>
-Date:   Thu Jul 7 17:33:23 2011 +0200
-
-    Throttle the IndexCleaner the same way we do with the IndexScheduler.
-    
-    BUG: 276593
-
-diff --git a/nepomuk/services/strigi/indexcleaner.cpp b/nepomuk/services/strigi/indexcleaner.cpp
-index 5c604ab..9198d0b 100644
---- a/nepomuk/services/strigi/indexcleaner.cpp
-+++ b/nepomuk/services/strigi/indexcleaner.cpp
-@@ -47,7 +47,8 @@ using namespace Soprano::Vocabulary;
- 
- 
- Nepomuk::IndexCleaner::IndexCleaner(QObject* parent)
--    : KJob(parent)
-+    : KJob(parent),
-+      m_delay(0)
- {
-     setCapabilities( Suspendable );
- }
-@@ -268,7 +269,7 @@ void Nepomuk::IndexCleaner::slotRemoveResourcesDone(KJob* job)
- 
-     QMutexLocker lock(&m_stateMutex);
-     if( !m_suspended ) {
--        clearNextBatch();
-+        QTimer::singleShot(m_delay, this, SLOT(clearNextBatch()));
-     }
- }
- 
-@@ -313,4 +314,9 @@ bool Nepomuk::IndexCleaner::doResume()
-     return true;
- }
- 
-+void Nepomuk::IndexCleaner::setDelay(int msecs)
-+{
-+    m_delay = msecs;
-+}
-+
- #include "indexcleaner.moc"
-diff --git a/nepomuk/services/strigi/indexcleaner.h b/nepomuk/services/strigi/indexcleaner.h
-index e1c38ca..bf0713e 100644
---- a/nepomuk/services/strigi/indexcleaner.h
-+++ b/nepomuk/services/strigi/indexcleaner.h
-@@ -41,6 +41,16 @@ namespace Nepomuk {
-         virtual bool doSuspend();
-         virtual bool doResume();
- 
-+    public slots:
-+        /**
-+         * Set the delay between the cleanup queries.
-+         * Used for throtteling the cleaner to not grab too
-+         * many resources. Default is 0.
-+         *
-+         * \sa IndexScheduler::setIndexingSpeed()
-+         */
-+        void setDelay(int msecs);
-+
-     private slots:
-         void clearNextBatch();
-         void slotRemoveResourcesDone(KJob* job);
-@@ -52,6 +62,7 @@ namespace Nepomuk {
- 
-         QMutex m_stateMutex;
-         bool m_suspended;
-+        int m_delay;
-     };
- }
- 
-diff --git a/nepomuk/services/strigi/indexscheduler.cpp b/nepomuk/services/strigi/indexscheduler.cpp
-index 3c92657..f3c6c36 100644
---- a/nepomuk/services/strigi/indexscheduler.cpp
-+++ b/nepomuk/services/strigi/indexscheduler.cpp
-@@ -208,7 +208,7 @@ Nepomuk::IndexScheduler::IndexScheduler( QObject* parent )
-     : QObject( parent ),
-       m_suspended( false ),
-       m_indexing( false ),
--      m_speed( FullSpeed )
-+      m_indexingDelay( 0 )
- {
-     m_cleaner = new IndexCleaner(this);
-     connect( m_cleaner, SIGNAL(finished(KJob*)), this, SLOT(slotCleaningDone()) );
-@@ -266,7 +266,13 @@ void Nepomuk::IndexScheduler::setSuspended( bool suspended )
- void Nepomuk::IndexScheduler::setIndexingSpeed( IndexingSpeed speed )
- {
-     kDebug() << speed;
--    m_speed = speed;
-+    m_indexingDelay = 0;
-+    if ( speed != FullSpeed ) {
-+        m_indexingDelay = (speed == ReducedSpeed) ? s_reducedSpeedDelay : s_snailPaceDelay;
-+    }
-+    if( m_cleaner ) {
-+        m_cleaner->setDelay(m_indexingDelay);
-+    }
- }
- 
- 
-@@ -481,11 +487,7 @@ bool Nepomuk::IndexScheduler::analyzeDir( const QString& dir_, Nepomuk::IndexSch
- void Nepomuk::IndexScheduler::callDoIndexing()
- {
-     if( !m_suspended ) {
--        uint delay = 0;
--        if ( m_speed != FullSpeed ) {
--            delay = (m_speed == ReducedSpeed) ? s_reducedSpeedDelay : s_snailPaceDelay;
--        }
--        QTimer::singleShot( delay, this, SLOT(doIndexing()) );
-+        QTimer::singleShot( m_indexingDelay, this, SLOT(doIndexing()) );
-     }
- }
- 
-diff --git a/nepomuk/services/strigi/indexscheduler.h b/nepomuk/services/strigi/indexscheduler.h
-index 9ae1f18..8756206 100644
---- a/nepomuk/services/strigi/indexscheduler.h
-+++ b/nepomuk/services/strigi/indexscheduler.h
-@@ -121,8 +121,6 @@ namespace Nepomuk {
-             SnailPace
-         };
- 
--        IndexingSpeed currentSpeed() const { return m_speed; }
--
-     public Q_SLOTS:
-         void suspend();
-         void resume();
-@@ -226,7 +224,7 @@ namespace Nepomuk {
-         QString m_currentFolder;
-         KUrl m_currentUrl;
- 
--        IndexingSpeed m_speed;
-+        int m_indexingDelay;
-         IndexCleaner* m_cleaner;
-     };
- 



More information about the arch-commits mailing list