Code break requested for gnome-packgekit
- From: Richard Hughes <hughsient gmail com>
- To: GNOME 2 release team <release-team gnome org>
- Subject: Code break requested for gnome-packgekit
- Date: Thu, 22 Mar 2012 13:12:54 +0000
Aisleroit seems to call into the DBus interface of gnome-packages with
a request to install zero packages. This is forwarded to PackageKit,
which duly crashes if you are running the zif backend. I've fixed up
PackageKit-zif upstream and also added a check in the daemon to block
this kind of broken request. It also makes sense to patch g-pk in
gnome-3-4 so we don't crash older versions of PackageKit.
Trivial path below, thanks.
Richard.
diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index 2f3a6ed..936b442 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -1221,6 +1221,14 @@ gpk_dbus_task_install_package_names
(GpkDbusTask *dtask, gchar **packages, GpkDb
string = g_string_new ("");
len = g_strv_length (packages);
+ if (len == 0) {
+ error_dbus = g_error_new (GPK_DBUS_ERROR,
+ GPK_DBUS_ERROR_FAILED,
+ "no packages specified");
+ gpk_dbus_task_dbus_return_error (dtask, error_dbus);
+ g_error_free (error_dbus);
+ goto out;
+ }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]