[oe-commits] Sebastian Krzyszkowiak : packagekit: fix segfaults when hald is not running
git version control
git at git.openembedded.org
Thu Aug 13 15:02:11 UTC 2009
Module: openembedded.git
Branch: shr/import
Commit: e6cf32c744b49c7d58ebd409e01c27f61e89fffa
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=e6cf32c744b49c7d58ebd409e01c27f61e89fffa
Author: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
Date: Thu Aug 13 13:36:28 2009 +0000
packagekit: fix segfaults when hald is not running
---
.../fix-segfault-when-hald-is-not-running.patch | 22 ++++++++++++++++++++
recipes/packagekit/packagekit_0.5.1.bb | 3 +-
2 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/recipes/packagekit/files/fix-segfault-when-hald-is-not-running.patch b/recipes/packagekit/files/fix-segfault-when-hald-is-not-running.patch
new file mode 100644
index 0000000..72889ec
--- /dev/null
+++ b/recipes/packagekit/files/fix-segfault-when-hald-is-not-running.patch
@@ -0,0 +1,22 @@
+From cdb5dad2785a6f418bec25e80283c0554fa972cd Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard at hughsie.com>
+Date: Thu, 13 Aug 2009 13:14:19 +0000
+Subject: If there is no HAL, don't segfault when unloading PkInhibit
+
+---
+diff --git a/src/pk-inhibit.c b/src/pk-inhibit.c
+index a9e68a7..5038aec 100644
+--- a/src/pk-inhibit.c
++++ b/src/pk-inhibit.c
+@@ -215,7 +215,8 @@ pk_inhibit_finalize (GObject *object)
+ }
+ /* no need to free the data in the array */
+ g_ptr_array_free (inhibit->priv->array, TRUE);
+- g_object_unref (inhibit->priv->proxy);
++ if (inhibit->priv->proxy != NULL)
++ g_object_unref (inhibit->priv->proxy);
+
+ G_OBJECT_CLASS (pk_inhibit_parent_class)->finalize (object);
+ }
+--
+cgit v0.8.2
diff --git a/recipes/packagekit/packagekit_0.5.1.bb b/recipes/packagekit/packagekit_0.5.1.bb
index 7a96a23..112f52a 100644
--- a/recipes/packagekit/packagekit_0.5.1.bb
+++ b/recipes/packagekit/packagekit_0.5.1.bb
@@ -9,9 +9,10 @@ inherit gnome autotools_stage
SRC_URI = "http://www.packagekit.org/releases/PackageKit-${PV}.tar.gz \
file://fix-segfaults-when-consolekit-is-missing.patch;patch=1 \
+ file://fix-segfault-when-hald-is-not-running.patch;patch=1 \
"
-PR = "r1"
+PR = "r2"
PE = "2"
S = "${WORKDIR}/PackageKit-${PV}"
More information about the Openembedded-commits
mailing list