Re: Code break requested for gnome-packgekit

2012-03-22 Thread Javier Jardón
On 22 March 2012 22:44, Andre Klapper  wrote:
> On Thu, 2012-03-22 at 14:31 +, Richard Hughes wrote:
>> diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
>> index 2f3a6ed..065c213 100644
>> --- a/src/gpk-dbus-task.c
>> +++ b/src/gpk-dbus-task.c
>> @@ -1221,6 +1221,10 @@ gpk_dbus_task_install_package_names
>> (GpkDbusTask *dtask, gchar **packages, GpkDb
>>
>>         string = g_string_new ("");
>>         len = g_strv_length (packages);
>> +       if (len == 0) {
>> +               gpk_dbus_task_dbus_return_value (dtask, TRUE);
>> +               goto out;
>> +       }
>>
>>         /* don't use a bullet for one item */
>
> release-team approval 1 of 2 (for the updated patch).

2/2 approval from the r-t



-- 
Javier Jardón Cabezas
___
release-team@gnome.org
http://mail.gnome.org/mailman/listinfo/release-team
Release-team lurker? Do NOT participate in discussions.

Re: Code break requested for gnome-packgekit

2012-03-22 Thread Andre Klapper
On Thu, 2012-03-22 at 14:31 +, Richard Hughes wrote:
> diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
> index 2f3a6ed..065c213 100644
> --- a/src/gpk-dbus-task.c
> +++ b/src/gpk-dbus-task.c
> @@ -1221,6 +1221,10 @@ gpk_dbus_task_install_package_names
> (GpkDbusTask *dtask, gchar **packages, GpkDb
> 
> string = g_string_new ("");
> len = g_strv_length (packages);
> +   if (len == 0) {
> +   gpk_dbus_task_dbus_return_value (dtask, TRUE);
> +   goto out;
> +   }
> 
> /* don't use a bullet for one item */

release-team approval 1 of 2 (for the updated patch).

andre
-- 
mailto:ak...@gmx.net | failed
http://blogs.gnome.org/aklapper

___
release-team@gnome.org
http://mail.gnome.org/mailman/listinfo/release-team
Release-team lurker? Do NOT participate in discussions.


Re: Code break requested for gnome-packgekit

2012-03-22 Thread Richard Hughes
On 22 March 2012 13:29, Christian Persch  wrote:
> Wouldn't it be better to make this a *successful* return
> (after all, nothing went wrong, all requested packages were
> installed :-) ) instead of an error?

Yes, of course, makes sense:

diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index 2f3a6ed..065c213 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -1221,6 +1221,10 @@ gpk_dbus_task_install_package_names
(GpkDbusTask *dtask, gchar **packages, GpkDb

string = g_string_new ("");
len = g_strv_length (packages);
+   if (len == 0) {
+   gpk_dbus_task_dbus_return_value (dtask, TRUE);
+   goto out;
+   }

/* don't use a bullet for one item */

Richard.
___
release-team@gnome.org
http://mail.gnome.org/mailman/listinfo/release-team
Release-team lurker? Do NOT participate in discussions.


Re: Code break requested for gnome-packgekit

2012-03-22 Thread Christian Persch
Hi;

> 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.

I don't think it's aisleriot itself that calls packagekit with 0
packages to install. Aisleriot uses
org.freedesktop.PackageKit.Modify.InstallCatalogs with
http://git.gnome.org/browse/aisleriot/tree/data/aisleriot.catalog.in
(well, the result of that file being processed by config.status,
obviously). I guess packagekit doesn't handle this resulting in a call
to install 0 packages?

> Trivial path below, thanks.

Wouldn't it be better to make this a *successful* return
(after all, nothing went wrong, all requested packages were
installed :-) ) instead of an error?

Regards,
Christian
___
release-team@gnome.org
http://mail.gnome.org/mailman/listinfo/release-team
Release-team lurker? Do NOT participate in discussions.


Code break requested for gnome-packgekit

2012-03-22 Thread Richard Hughes
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;
+   }
___
release-team@gnome.org
http://mail.gnome.org/mailman/listinfo/release-team
Release-team lurker? Do NOT participate in discussions.