summaryrefslogtreecommitdiff
path: root/extra/dconf
diff options
context:
space:
mode:
Diffstat (limited to 'extra/dconf')
-rw-r--r--extra/dconf/PKGBUILD12
-rw-r--r--extra/dconf/fix-crash-when-user-database-is-not-present.patch29
2 files changed, 37 insertions, 4 deletions
diff --git a/extra/dconf/PKGBUILD b/extra/dconf/PKGBUILD
index 9a920ce73..e0d1b48a0 100644
--- a/extra/dconf/PKGBUILD
+++ b/extra/dconf/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 123046 2011-05-07 19:01:26Z ibiru $
+# $Id: PKGBUILD 123094 2011-05-08 12:20:20Z ibiru $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
pkgname=dconf
pkgver=0.7.4
-pkgrel=1
+pkgrel=2
pkgdesc="A low-level configuration system."
arch=(i686 x86_64)
url="http://live.gnome.org/dconf"
@@ -11,12 +11,16 @@ depends=('glib2')
makedepends=('vala' 'gobject-introspection' 'gtk3')
optdepends=('gtk3: for dconf-editor')
install=dconf.install
-source=(http://download.gnome.org/sources/${pkgname}/0.7/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('299d79daf0b214c692e7d5788d7bda76d778c1748ea37c33256c4fa6143b22cd')
+source=(http://download.gnome.org/sources/${pkgname}/0.7/${pkgname}-${pkgver}.tar.bz2
+ fix-crash-when-user-database-is-not-present.patch)
+sha256sums=('299d79daf0b214c692e7d5788d7bda76d778c1748ea37c33256c4fa6143b22cd'
+ 'c78ea8db69a1be1286846282897f99e843e14d1e450beee4339d5500b2f0f73d')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/fix-crash-when-user-database-is-not-present.patch"
+
./configure --prefix=/usr --sysconfdir=/etc \
--libexecdir=/usr/lib/dconf
make
diff --git a/extra/dconf/fix-crash-when-user-database-is-not-present.patch b/extra/dconf/fix-crash-when-user-database-is-not-present.patch
new file mode 100644
index 000000000..ce748492b
--- /dev/null
+++ b/extra/dconf/fix-crash-when-user-database-is-not-present.patch
@@ -0,0 +1,29 @@
+From c80896f5644ec0a07822047dd7e899da63b42e89 Mon Sep 17 00:00:00 2001
+From: Ryan Lortie <desrt@desrt.ca>
+Date: Sun, 08 May 2011 12:08:38 +0000
+Subject: Fix crash when user database is not present
+
+If we fail to open the database in the user's home directory then the
+variable will be NULL. The refactor of the read function for lockdown
+support missed this check, resulting in a rather dramatic crash on fresh
+accounts.
+---
+diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
+index ec99116..087d780 100644
+--- a/engine/dconf-engine.c
++++ b/engine/dconf-engine.c
+@@ -452,7 +452,11 @@ dconf_engine_read_internal (DConfEngine *engine,
+ break;
+
+ while (i < limit && value == NULL)
+- value = gvdb_table_get_value (engine->gvdbs[i++], key);
++ {
++ if (engine->gvdbs[i] != NULL)
++ value = gvdb_table_get_value (engine->gvdbs[i], key);
++ i++;
++ }
+
+ g_static_mutex_unlock (&engine->lock);
+
+--
+cgit v0.9