[packagekit] Add a 'store_in_cache' attribute to the DownloadPackages method

Richard Hughes hughsient at gmail.com
Wed Mar 30 05:56:45 PDT 2011


I've just merged this:

commit c1ee03fb4c29922acd69d33e8cbe5aa85aad8d30
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Mar 30 12:56:20 2011 +0100

    Add a 'store_in_cache' attribute to the DownloadPackages method

    This is so we know whether to copy them into a new directory, or
leave them in
    the package manager cache.

    Note: this does not change the API of the client libraries as we
can test if the
    download directory is not NULL and set the boolean value accordingly.

:100644 100644 cea899f... b9156e6... M  lib/packagekit-glib2/pk-client.c
:100644 100644 da08713... 019bbed... M
src/org.freedesktop.PackageKit.Transaction.xml
:100644 100644 e60b176... 80c2450... M  src/pk-transaction.c
:100644 100644 4afbaca... a307fc4... M  src/pk-transaction.h

Daniel is fixing up packagekit-qt now, and client programs shouldn't
be affected at all. The purpose of the patch is to allow client
programs such as gnome-shell to download the pending updates in the
user session, and then for system programs like systemd to install the
updates when then user shuts down. Do do this, we need to store the
packages in the system package cache rather than copy them into
/var/lib/PackageKit like we normally do.

If you're maintaining a backend, please make sure that it accepts NULL
as a directory value for DownloadPackages. If NULL, just download to
the system package cache like normal, and you don't need to emit
::Files() either (but if you do, it's ignored).

If you find the downloading stuff complicated, just see
http://packagekit.org/gtk-doc/introduction-ideas-transactions.html#introduction-ideas-transactions-download
-- Questions welcome :-)

Thanks,

Richard.



More information about the PackageKit mailing list