[packagekit] About Debian user-defined files

Ivan Gomez Rodriguez igomez at igalia.com
Tue May 5 12:02:04 PDT 2009

Hi all,

I'm playing with packagekit to check how I could use packagekit in a
scenario like the following: (It is based on the Hildon Application
Manager [1])

In a applications manager, I would like to indicate, for example, the
following conditions to the UI, in order to change the UI behavior
depending on them:

  Application manager close all aplications before installing this

  Application manager suggest user to taka a backup before installing
this package.

  Application manage will reboot the device cleanly after the package
has been installed.

 Indicate that the package is a *meta-package that controls operating
system update*.

In HAM, which uses apt and interacts with apt through libapt-pkg, those
conditions are stored in the packages as debian's user-defined control
[2]. Therefore, the control file of a debian package to be used with HAM
include a field like:

Maemo-Flags: reboot, suggest-backup

And the package's mantainers should be aware of that and use theses
fields in their packages.

This allows to check this info before installing or updating a package
(through libapt-pkg) and, therefore, display the warnings or prompt
properly the user.

Is there any way to access this kind of fields through packagekit? 

I can't found API to access those fields but is it possible to modify
the apt backend to get those fields and make them avaliable in the
higher level? 

Could fit somehow this info in the data field of the Package ID or
making use of another packagekit's concept?

Thanks in advance,
	Iván Gómez

[1] http://hildon-app-mgr.garage.maemo.org/index.html
[2] http://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.7

More information about the PackageKit mailing list