[Bug 1040619] Re: aptdaemon does not support listing the files of a package

Launchpad Bug Tracker 1040619 at bugs.launchpad.net
Thu Aug 23 12:43:27 UTC 2012


** Branch linked: lp:aptdaemon

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to aptdaemon in Ubuntu.
https://bugs.launchpad.net/bugs/1040619

Title:
  aptdaemon does not support listing the files of a package

Status in “aptdaemon” package in Ubuntu:
  Fix Committed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/aptdaemon/+bug/1040619/+subscriptions




More information about the foundations-bugs mailing list