From bbb460f85242e6ac03f47b74b9d0be66ff089ac4 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 May 2011 22:34:00 +0000 Subject: Mon May 9 22:34:00 UTC 2011 --- extra/dconf/PKGBUILD | 12 ++++++--- ...x-crash-when-user-database-is-not-present.patch | 29 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 extra/dconf/fix-crash-when-user-database-is-not-present.patch (limited to 'extra/dconf') 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 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 +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 -- cgit v1.2.3-54-g00ecf