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.
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:
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:
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.
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.
My mistake, apologies. I'll look at this tonight.