packagekit/backends/apt
Giovanni Campagna bb40628c68 Update internal API and backends for Details change
Include a summary argument to pk_backend_job_details (and the
python wrapper), and fill it for the hawkey, yum and dummy plugins.
Other backends need to be updated.

https://bugs.freedesktop.org/show_bug.cgi?id=74620

Signed-off-by: Richard Hughes <richard@hughsie.com>
2014-02-25 09:52:17 +00:00
..
data Revert "apt: Remove the python apt backend, and leave the aptcc backend" 2011-11-27 13:23:18 +01:00
tests apt: Update what-provides MODALIAS to documented syntax 2012-05-22 07:49:18 +02:00
20packagekit apt(cc): Use gdbus in the post-update hook call to StateHasChanged. 2011-12-01 11:09:34 +01:00
aptBackend.py Update internal API and backends for Details change 2014-02-25 09:52:17 +00:00
hotshot-analyze.py Revert "apt: Remove the python apt backend, and leave the aptcc backend" 2011-11-27 13:23:18 +01:00
Makefile.am Don't use the deprecated INCLUDES in Makefile.am 2013-01-14 09:23:12 +00:00
packagekit Revert "apt: Remove the python apt backend, and leave the aptcc backend" 2011-11-27 13:23:18 +01:00
pk-backend-apt.c trivial: Complete the GetDepends->DependsOn method rename 2014-01-03 09:08:19 +00:00
profiler.py apt: Don't use optparse to safe some startup time. Instead use a 2011-11-29 12:01:32 +01:00
README.apt apt: Add support for plugins, call them for what-provides 2012-02-01 10:23:30 +01:00
test.sh apt: Add a test suite covering already most of the methods 2011-11-29 11:34:34 +01:00
update-packagekit-app-data Revert "apt: Remove the python apt backend, and leave the aptcc backend" 2011-11-27 13:23:18 +01:00

The name of this backend is apt

It supports the Advanced Packaging Tool used by Debian and its derivates. The
implementation was done in Python. The communication between the daemon and
the backend process happens via stdin and stdout, it is a so called spawned
backend using a dispatcher to allow the execution of several commands in a row.

To provide a tremendously fast search function a Xapian database is used.
It is provided by Enrico Zini's apt-xapian-index. Debtags will be used to 
enhance the quality of the search results further.

A list of implemented functions are listed in the PackageKit FAQ:

http://www.packagekit.org/pk-faq.html

Feel free to send comments or bug reports to the PackageKit mailing list
or to the author directly.

Plugin support
--------------
You can create plugins to extend this backend to extend its functionality.  The
only supported plugin type is for the "what_provides" PackageKit call for now,
as this is generally the most useful for plugins.

In your module "my_plugin_module_name", implement a

      def my_what_provides(cache, type, search):

function which returns additional packages for the given type
(packagekit.enum.PROVIDES_*) and search string. The plugin should raise
NotImplementedError if it cannot handle the given type.

Register the plugin as an entry point (via python setuptools) in setup.py:

   setup(
       [....]

       entry_points="""[packagekit.apt.plugins]
what_provides=my_plugin_module_name:my_what_provides
""",
       [...])

You can register arbitrarily many plugins, they will be all called and their
resulting package lists joined.