[SCM] baloo packaging branch, kubuntu_wily_archive, updated. ubuntu/5.14.0-0ubuntu1-3-g90bd0d0

Philip Muškovac yofel-guest at moszumanska.debian.org
Sat Sep 26 15:54:30 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/baloo.git;a=commitdiff;h=d6e2938

The following commit has been merged in the kubuntu_wily_archive branch:
commit d6e2938bf8400f31832bc17241cbdfd4123a9da7
Author: Philip Muškovac <yofel at gmx.net>
Date:   Sat Sep 26 17:36:31 2015 +0200

    cherry pick bug fixes from upstream master
    
      * Add
        upstream_add_error_checking_in_various_bits_so_that_baloo_doesnt_crash.diff
        for better reliabiltiy
      * Add upstream_fail_baloo_file_load_if_the_database_is_not_open.diff
        to fix a dolphin crash when selection multiple files
---
 debian/changelog                                   | 10 ++++
 debian/patches/series                              |  2 +
 ...in_various_bits_so_that_baloo_doesnt_crash.diff | 61 ++++++++++++++++++++++
 ...aloo_file_load_if_the_database_is_not_open.diff | 30 +++++++++++
 4 files changed, 103 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 222d61d..0562b11 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+baloo-kf5 (5.14.0-0ubuntu3) wily; urgency=medium
+
+  * Add
+    upstream_add_error_checking_in_various_bits_so_that_baloo_doesnt_crash.diff
+    for better reliabiltiy
+  * Add upstream_fail_baloo_file_load_if_the_database_is_not_open.diff
+    to fix a dolphin crash when selection multiple files
+
+ -- Philip Muškovac <yofel at kubuntu.org>  Sat, 26 Sep 2015 17:34:57 +0200
+
 baloo-kf5 (5.14.0-0ubuntu2) wily; urgency=medium
 
   * Remove balloengine from baloo-kf5-dev.acc.in, dev symlink no longer
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1fd4e87
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+upstream_add_error_checking_in_various_bits_so_that_baloo_doesnt_crash.diff
+upstream_fail_baloo_file_load_if_the_database_is_not_open.diff
diff --git a/debian/patches/upstream_add_error_checking_in_various_bits_so_that_baloo_doesnt_crash.diff b/debian/patches/upstream_add_error_checking_in_various_bits_so_that_baloo_doesnt_crash.diff
new file mode 100644
index 0000000..c30b4da
--- /dev/null
+++ b/debian/patches/upstream_add_error_checking_in_various_bits_so_that_baloo_doesnt_crash.diff
@@ -0,0 +1,61 @@
+From 3312d6f3f4b80ec04e86c2ea103adc51ade0f020 Mon Sep 17 00:00:00 2001
+From: Rohan Garg <rohan at garg.io>
+Date: Wed, 16 Sep 2015 01:20:47 +0200
+Subject: [PATCH] Add error checking in various bits so that Baloo doesn't
+ crash when disabled.
+
+REVIEW: 125241
+BUG: 352454
+---
+ src/engine/database.cpp | 16 +++++++++++++---
+ src/lib/searchstore.cpp |  2 +-
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/engine/database.cpp b/src/engine/database.cpp
+index b2b9f47..4f0579f 100644
+--- a/src/engine/database.cpp
++++ b/src/engine/database.cpp
+@@ -72,14 +72,24 @@ bool Database::open(OpenMode mode)
+         return false;
+     }
+ 
+-    mdb_env_create(&m_env);
++    int rc = mdb_env_create(&m_env);
++    if (rc) {
++        m_env = 0;
++        return false;
++    }
++
+     mdb_env_set_maxdbs(m_env, 12);
+     mdb_env_set_mapsize(m_env, static_cast<size_t>(1024) * 1024 * 1024 * 5); // 5 gb
+ 
+     // The directory needs to be created before opening the environment
+     QByteArray arr = QFile::encodeName(m_path) + "/index";
+-    mdb_env_open(m_env, arr.constData(), MDB_NOSUBDIR | MDB_NOMEMINIT, 0664);
+-    int rc = mdb_reader_check(m_env, 0);
++    rc = mdb_env_open(m_env, arr.constData(), MDB_NOSUBDIR | MDB_NOMEMINIT, 0664);
++    if (rc) {
++        m_env = 0;
++        return false;
++    }
++
++    rc = mdb_reader_check(m_env, 0);
+     Q_ASSERT_X(rc == 0, "Database::open reader_check", mdb_strerror(rc));
+ 
+     //
+diff --git a/src/lib/searchstore.cpp b/src/lib/searchstore.cpp
+index d4abf50..806ea5f 100644
+--- a/src/lib/searchstore.cpp
++++ b/src/lib/searchstore.cpp
+@@ -66,7 +66,7 @@ SearchStore::~SearchStore()
+ 
+ QStringList SearchStore::exec(const Term& term, int offset, int limit, bool sortResults)
+ {
+-    if (!m_db) {
++    if (!m_db || !m_db->isOpen()) {
+         return QStringList();
+     }
+ 
+-- 
+2.5.0
+
diff --git a/debian/patches/upstream_fail_baloo_file_load_if_the_database_is_not_open.diff b/debian/patches/upstream_fail_baloo_file_load_if_the_database_is_not_open.diff
new file mode 100644
index 0000000..d0e5957
--- /dev/null
+++ b/debian/patches/upstream_fail_baloo_file_load_if_the_database_is_not_open.diff
@@ -0,0 +1,30 @@
+From 29fe68f2657df503926e629477a41f7d9435048f Mon Sep 17 00:00:00 2001
+From: Boudhayan Gupta <me at BaloneyGeek.com>
+Date: Wed, 23 Sep 2015 00:25:36 +0530
+Subject: [PATCH] Fail Baloo::File::load() if the Database is not open. Fixes
+ crash if selecting multiple files in Dolphin with Baloo disabled.
+
+BUG: 353049
+REVIEW: 125352
+---
+ src/lib/file.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/lib/file.cpp b/src/lib/file.cpp
+index 6bff57d..ac034eb 100644
+--- a/src/lib/file.cpp
++++ b/src/lib/file.cpp
+@@ -98,6 +98,10 @@ bool File::load()
+     Database *db = globalDatabaseInstance();
+     db->open(Database::OpenDatabase);
+ 
++    if (!db->isOpen()) {
++        return false;
++    }
++
+     quint64 id = filePathToId(QFile::encodeName(d->url));
+     if (!id) {
+         return false;
+-- 
+2.5.0
+

-- 
baloo packaging



More information about the pkg-kde-commits mailing list