aptdaemon does not support listing the files of a package

Bug #1040619 reported by Till Kamppeter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
aptdaemon (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

I am installing packages out of a Python program (system-config-printer) and want to list the files contained in the installed package via

----------
#!/usr/bin/python

from gi.repository import GLib, PackageKitGlib
import sys

package = sys.argv[1]

try:
    res = pk.resolve(PackageKitGlib.FilterEnum.NONE, [package],
                     None, lambda p, t, d: True, None)
except GLib.GError:
    sys.exit(1)
if res.get_exit_code() != PackageKitGlib.ExitEnum.SUCCESS:
    sys.exit(1)
package_ids = res.get_package_array()
if len(package_ids) <= 0:
    sys.exit(1)
package_id = package_ids[0].get_id()

try:
    res = pk.get_files([package_id], None, progress, None)
except GLib.GError:
    pass

files = res.get_files_array()
if not files:
    print []
print files[0].get_property('files')
----------

The result is always empty. I asked on IRC and this is due to missing implementation of listing files in aptdaemon.

Changed in cups (Ubuntu):
importance: Undecided → High
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti)
affects: cups (Ubuntu) → aptdaemon (Ubuntu)
Changed in aptdaemon (Ubuntu):
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in aptdaemon (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Manually applying the patch shows that this actually fixes the problem. Thank you very much.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package aptdaemon - 0.45+bzr856-0ubuntu1

---------------
aptdaemon (0.45+bzr856-0ubuntu1) quantal; urgency=low

  * New upstream snapshot:
    - pkcompat: Fix get_files() LP: #1040619 (thanks to Martin Pitt)
    - Fix crash when run inside non-ascii dirs LP: #1044900
    - Fix crash in widget's diff view if a @@ line does not have a range
      LP: #875879 (thanks to Brian Murray)
    - Support credentials change when adding a repository that is already
      in sources.list/auth.conf
 -- Michael Vogt <email address hidden> Fri, 07 Sep 2012 10:20:10 +0200

Changed in aptdaemon (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.