Bug 882024 - virt-manager packagekit install is broken on kde
Summary: virt-manager packagekit install is broken on kde
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 18
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2012-11-30 00:13 UTC by Peter Trenholme
Modified: 2013-04-10 01:28 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-04-10 01:28:40 UTC
Type: Bug

Attachments (Terms of Use)

Description Peter Trenholme 2012-11-30 00:13:06 UTC
Description of problem: I had failed to install the kvm group, and, when virt-manager offered to install them, the method "InstallPackageNames" was passed to Package=kit via dbus, but dbus could not find that method.

Version-Release number of selected component (if applicable):
virt-manager:       0.9.4
dbus (dbus-daemon): 1.6.8
PackageKit (pkcon): 0.8.4

How reproducible:
Only tried once, but I suspect every time.

Steps to Reproduce:
1. Answer "Yes" to the "Do you want to install ..." pop-up
Actual results:
traceback (see the "Additional Info" section, below)

Expected results:
Installation of the missing package(s).

Additional info:
Error talking to PackageKit: org.freedesktop.DBus.Error.UnknownMethod: No such method 'InstallPackageNames' in interface 'org.freedesktop.PackageKit.Modify' at object path '/org/freedesktop/PackageKit' (signature 'iass')

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/packageutils.py", line 103, in check_packagekit
  File "/usr/share/virt-manager/virtManager/packageutils.py", line 135, in packagekit_install
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such method 'InstallPackageNames' in interface 'org.freedesktop.PackageKit.Modify' at object path '/org/freedesktop/PackageKit' (signature 'iass')

Comment 1 Cole Robinson 2012-12-17 01:16:18 UTC
This is because we still screwed up some variable substitution, so virt-manager is trying to install ::KVM_PACKAGES:: and PackageKit is correctly telling us that it's not a valid package

Comment 2 Cole Robinson 2012-12-17 01:17:39 UTC
Err, ignore that last comment, wrong bug.

I can't reproduce this issue, packagekit installs packages quite fine here. Are you using gnome desktop, or something else like kde?

Comment 3 Peter Trenholme 2012-12-17 21:21:10 UTC
I use KDE, and only install the minimum GNOME stuff needed to make thing work.

That being said, have you verified that the "InstallPackageNames" method is, in fact, defined? (If it is, someone is not too familiar with standard English usage unless, for some strange reason, the names of packages need to be "installed" before a package (or set of packages) can be installed by name.)

This, however, suggests that the method name should have been "InstallPackages":
$ grep '<method' /usr/share/dbus-1/interfaces/org.freedesktop.PackageKit.xml
    <method name="CanAuthorize">
    <method name="CreateTransaction">
    <method name="GetTimeSinceAction">
    <method name="GetTransactionList">
    <method name="StateHasChanged">
    <method name="SuggestDaemonQuit">
    <method name="GetDaemonState">
    <method name="SetProxy">
$ grep '<method' /usr/share/dbus-1/interfaces/org.freedesktop.PackageKit.Transaction.xml
    <method name="SetHints">
    <method name="AcceptEula">
    <method name="Cancel">
    <method name="DownloadPackages">
    <method name="GetCategories">
    <method name="GetDepends">
    <method name="GetDetails">
    <method name="GetFiles">
    <method name="GetOldTransactions">
    <method name="GetPackages">
    <method name="GetRepoList">
    <method name="GetRequires">
    <method name="GetUpdateDetail">
    <method name="GetUpdates">
    <method name="GetDistroUpgrades">
    <method name="InstallFiles">
    <method name="InstallPackages">
    <method name="InstallSignature">
    <method name="RefreshCache">
    <method name="RemovePackages">
    <method name="RepoEnable">
    <method name="RepoSetData">
    <method name="Resolve">
    <method name="SearchDetails">
    <method name="SearchFiles">
    <method name="SearchGroups">
    <method name="SearchNames">
    <method name="UpdatePackages">
    <method name="WhatProvides">
    <method name="UpgradeSystem">
    <method name="RepairSystem">

I did just check my installed package list, and both gnome-packagekit and apper are in it.

Comment 4 Cole Robinson 2012-12-17 22:41:07 UTC
Okay, I dug into this a bit.

InstallPackageNames comes from the session org.freedesktop.PackageKit provider. gnome-packagekit for gnome and apper for KDE. AFAICT they are supposed to provide the exact same interface, and they even both have the reference XML spec in their source trees. It isn't installed anywhere though, so I think the API is hardcoded into the provider binaries, hence why your grep didn't find it.

So apper is supposed to be providing InstallPackageNames. If you grep the source, there are tons of hits for it, so I think it is intending to provide it by something is going wrong.

If you pull latest virt-manager from F18 updates-testing, this issue is easy to reproduce by uninstalling libvirt\*, and doing

virt-manager --test-first-run

After that, the apper provider will be autolaunched. Then you can poke at the dbus interface with the d-feet tool, go to org.freedesktop.PackageKit. However d-feet has some issues parsing info about the apper interface, which might be another symptom of the underlying issue, whatever it is:

ERROR:dbus.proxies:Introspect error on org.freedesktop.PackageKit:/org/freedesktop/PackageKit: dbus.exceptions.IntrospectionParserException: Error parsing introspect data: <class 'xml.parsers.expat.ExpatError'>: unbound prefix: line 5, column 4
ERROR: Some clever service is trying to be cute and has the same method name in the same interface
ERROR: Some clever service is trying to be cute and has the same method name in the same interface
ERROR: Some clever service is trying to be cute and has the same method name in the same interface
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 604, in msg_reply_handler
  File "/usr/lib/python2.7/site-packages/dfeet/dbus_introspector.py", line 60, in <lambda>
    reply_handler=lambda xml: self._query_introspect_data_cb(name, node, xml),
  File "/usr/lib/python2.7/site-packages/dfeet/dbus_introspector.py", line 70, in _query_introspect_data_cb
    data = _introspect_parser.process_introspection_data(xml)
  File "/usr/lib/python2.7/site-packages/dfeet/_introspect_parser.py", line 150, in process_introspection_data
    raise IntrospectionParserException('%s: %s' % (e.__class__, e))
dbus.exceptions.IntrospectionParserException: Error parsing introspect data: <class 'xml.parsers.expat.ExpatError'>: unbound prefix: line 5, column 4

Comment 5 Daniel Nicoletti 2012-12-19 17:56:58 UTC
The bug is in virt-manager.
The correct DBus signature is uass and not iass (the fist parameter is
an uint and not an integer) like virt-manager is trying to pass,
both gnome-packagekit and apper share the same identical session interface.

Please reasing.

Comment 6 Rex Dieter 2012-12-19 18:07:15 UTC
reassigning to virt-manager per comment #5

Comment 7 Cole Robinson 2012-12-20 18:21:41 UTC
Thanks for pointing that out Daniel, I didn't notice. Strange that gnome-packagekit doesn't choke on that, but ah well. I've fixed this in virt-manager and verified it works on kde and gnome:


I filed the d-feet issue at:


Comment 8 Daniel Nicoletti 2012-12-20 18:52:47 UTC
Right, gdbus is more forgiving than libdbus, it's not the first time a wrong signature usage is more forgiving on gdbus.
DBus itself just passes the message without verifying it's signature.

Comment 9 Fedora Update System 2013-04-01 12:55:41 UTC
virt-manager-0.9.5-1.fc18 has been submitted as an update for Fedora 18.

Comment 10 Fedora Update System 2013-04-01 22:29:08 UTC
Package virt-manager-0.9.5-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing virt-manager-0.9.5-1.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2013-04-10 01:28:43 UTC
virt-manager-0.9.5-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.