[arch-commits] Commit in baloo/trunk (PKGBUILD krunner-crash.patch)

Andrea Scarpino andrea at nymeria.archlinux.org
Mon May 5 17:50:08 UTC 2014


    Date: Monday, May 5, 2014 @ 19:50:08
  Author: andrea
Revision: 212053

upgpkg: baloo 4.13.0-2

Fix krunner crash (FS#40222)

Added:
  baloo/trunk/krunner-crash.patch
Modified:
  baloo/trunk/PKGBUILD

---------------------+
 PKGBUILD            |   13 +++++++++----
 krunner-crash.patch |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-05-05 17:47:59 UTC (rev 212052)
+++ PKGBUILD	2014-05-05 17:50:08 UTC (rev 212053)
@@ -3,7 +3,7 @@
 
 pkgname=baloo
 pkgver=4.13.0
-pkgrel=1
+pkgrel=2
 pkgdesc="A framework for searching and managing metadata"
 arch=('i686' 'x86_64')
 url='https://projects.kde.org/projects/kde/kdelibs/baloo'
@@ -11,11 +11,16 @@
 depends=('kdepimlibs' 'xapian-core' 'kfilemetadata')
 makedepends=('cmake' 'automoc4' 'boost')
 install=${pkgname}.install
-source=("http://download.kde.org/stable/${pkgver}/src/${pkgname}-${pkgver}.tar.xz")
-sha1sums=('ace3a80d3c0e3bb444ebe7f30392db791eab7c61')
+source=("http://download.kde.org/stable/${pkgver}/src/${pkgname}-${pkgver}.tar.xz"
+        'krunner-crash.patch')
+sha1sums=('ace3a80d3c0e3bb444ebe7f30392db791eab7c61'
+          'fdb37257dca64531559fdc2ddf4730582b9a009c')
 
 prepare() {
   mkdir build
+
+  cd ${pkgname}-${pkgver}
+  patch -p1 -i "${srcdir}"/krunner-crash.patch
 }
 
 build() {
@@ -22,7 +27,7 @@
   cd build
   cmake ../${pkgname}-${pkgver} \
     -DCMAKE_BUILD_TYPE=Release \
-		-DCMAKE_INSTALL_PREFIX=/usr
+    -DCMAKE_INSTALL_PREFIX=/usr
   make
 }
 

Added: krunner-crash.patch
===================================================================
--- krunner-crash.patch	                        (rev 0)
+++ krunner-crash.patch	2014-05-05 17:50:08 UTC (rev 212053)
@@ -0,0 +1,35 @@
+commit 5bdb32928dc3eabf482676bb039104d1137cf1fb
+Author: Vishesh Handa <me at vhanda.in>
+Date:   Mon May 5 16:28:17 2014 +0200
+
+    XapianSearchStore: Split the string based on + * / - =
+    
+    When we receive a search string, we typically split it up by spaces and
+    dots. Then each sub string is checked, if it is <= 3 characters, we use
+    our own expansion scheme (imperfect) otherwise xapians.
+    
+    We need to use our own completion scheme because xapian's consumes too
+    much memory in the case of very few characters. It basically expands the
+    string to every possible completion result it has in its db, this
+    results in loads and loads of memory being consumed.
+    
+    We now split based on some extra characters so that when searching for
+    '2*2=' will not consume all your RAM in the case when your DB has many
+    words starting with 2.
+    
+    BUG: 332253
+    FIXED-IN: 4.13.1
+
+diff --git a/src/xapian/xapiansearchstore.cpp b/src/xapian/xapiansearchstore.cpp
+index a0529ce..1a59e3e 100644
+--- a/src/xapian/xapiansearchstore.cpp
++++ b/src/xapian/xapiansearchstore.cpp
+@@ -174,7 +174,7 @@ namespace {
+ Xapian::Query XapianSearchStore::constructSearchQuery(const QString& str)
+ {
+     QVector<Xapian::Query> queries;
+-    QRegExp splitRegex("[\\s.]");
++    QRegExp splitRegex("[\\s.+*/\\-=]");
+     QStringList list = str.split(splitRegex, QString::SkipEmptyParts);
+ 
+     QMutableListIterator<QString> iter(list);




More information about the arch-commits mailing list