Bug 29612 - Passing "never" to InstallCatalogs DBus method still lets one dialog show
Summary: Passing "never" to InstallCatalogs DBus method still lets one dialog show
Alias: None
Product: PackageKit
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Richard Hughes
QA Contact:
Depends on:
Reported: 2010-08-17 07:13 UTC by David D Lowe
Modified: 2012-01-05 11:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description David D Lowe 2010-08-17 07:13:08 UTC
Running this Python code displays a confirmation dialog ("Install packages in catalogue?"), despite passing "never" to the DBus method. I expected the method to not show any dialogs, except perhaps an authorisation dialog.

import dbus
bus = dbus.SessionBus()
proxy = bus.get_object("org.freedesktop.PackageKit", "/org/freedesktop/PackageKit")
iface = dbus.Interface(proxy, "org.freedesktop.PackageKit.Modify")
iface.InstallCatalogs(dbus.UInt32(0), [catalog_file], "never")

I'm running Ubuntu 10.04 with these packages, installed through Ubuntu's repositories:
packagekit: 0.5.7-0ubuntu2
packagekit-gnome: 2.29.2-0ubuntu1

I have created an appropriate .service file in /usr/share/dbus-1/services for org.freedesktop.PackageKit to avoid this bug:

For discussion on why I might need this method to work correctly, see this mailing list thread:
Comment 1 Richard Hughes 2010-08-29 03:43:21 UTC
Why did you expect "never" to work? Usually you suppress dialogs with "hide-query", "hide-finished" etc. See http://git.gnome.org/browse/gnome-packagekit/plain/docs/DBusInterface.txt for the API.
Comment 2 David D Lowe 2010-08-29 07:39:49 UTC
See lines 156-158 of http://git.gnome.org/browse/gnome-packagekit/plain/src/org.freedesktop.PackageKit.xml

Convenience options such as:
<doc:tt>never</doc:tt>, <doc:tt>defaults</doc:tt> or <doc:tt>always</doc:tt>.
are also available.
Comment 3 Richard Hughes 2010-08-29 07:58:02 UTC
My mistake, apologies. I'll look at this tonight.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.