[packagekit] ALPM Backend

Georg Grabler ggrabler at gmail.com
Tue Sep 2 02:40:13 PDT 2008


Hi,

I'm just aware of one type of data to be set in ALPM. I'm currently in talks
with the ALPM / Pacman devs to find out if more is required.

ALPM at least needs:
1.) Which repositories to sync (core, extra, community, unstable, testing
etc). I couldn't find a similar configuration option in PackageKit.
2.) The Mirror URL for the specific repository (probably possible with
RepoSetData).

Can SetRepoData be used for somethin like:

RepoSetData ("core", "set-download-url", "http://ftp.gigabit.nu/core/os/i686/");


In example:
Step one, setting a ALPM repository to use: "core":
Function to use: pmdb_t *alpm_db_register_sync(const char* treename);
Example: pmdb_t* coredb = alpm_db_register_sync('core');

Step two, setting the repository server:
Function to use: int alpm_db_setserver(pmdb_t *db, const char *url);
Example: alpm_db_setserver(coredb, 'http://ftp.gigabit.nu/core/os/i686');

So basically, I need a way to supply the database name, as well as the
database mirror url (you probably name it download-url) from PackageKit to
the ALPM backend.

Now, I'll have to look closer at the RepoSetData method, and what's called
with which options in the backend, if the frontend calls RepoSetData.

An other way:
I'm not quite sure if this will work out.
ALPM has the option, to set additional cache directories
alpm_option_add_cachedir(const char* cachedir);

Means, that this directory will be used as an additional cache directory.
I don't know how ALPM will react if i just add a cachedir, and call the
sysupgrade function like
alpm_sync_sysupgrade (pmdb_t *db_local, alpm_list_t *dbs_sync, alpm_list_t
**syncpkgs);

I don't think ALPM has ever been used in this way. The pacman devs will be
able to answer this (hopefully).

Kind regards,
Georg

On Tue, Sep 2, 2008 at 10:51 AM, Richard Hughes <hughsient at gmail.com> wrote:

> On Mon, 2008-09-01 at 20:57 +0200, Georg Grabler wrote:
> > Now, to clarify the "arch" point of view:
> > The Lib (libalpm) shall not care about any configuration or
> > configuration file handling. Therefore, the packagemanagers are
> > intended to read the configuraiton (basically the mirrors, temp dirs,
> > etc), and provide ALPM with the necessary information.
>
> Right.
>
> > Now, PackageKit does not support any interface, to apply mirror
> > settings to the backend (at least I didn't find any similar
> > functionality - I have confess that I'm quite new to the code of
> > packagekit though). I see two options for this:
> > 1.) Reading the configuration of the "main" packagemanager "pacman" in
> > arch linux (/etc/pacman.conf, /etc/pacman.d/mirrorlist).
> > 2.) Giving PackageKit the possibility to set mirrors, and to care
> > about this configuration.
>
> Right, so you are reading and writing repo configuration.
>
> > For #1, I'm not sure if this would apply for forks of Arch Linux as
> > well - probably not.
> > For #2, quite a lot of configuration can be done. I'm not sure right
> > now, how many interfaces it would actually need.
>
> Indeed, making abstract methods for this would be a giant waste of time
> -- and there's no need to.
>
> > What would be the perefered way?
>
> Well, at the moment there is RepoSetData [1] which allows you to set
> backend specific strings using the PackageKit API. There's currently no
> RepoGetData function, as I figured it wouldn't be needed.
>
> What exact data are you trying to get and set?
>
> > We're generally interested in a packagekit backend, since the
> > developers of the GUI Shaman will be using PackageKit in version 2 of
> > their package manager GUI (basically the first QT/KDE gui which did
> > exist for arch linux), to archive the goal of having a KDE package
> > manager supporting multiple distributions.
>
> You've seen KPackageKit[2], right?
>
> Richard.
>
> [1]
> http://www.packagekit.org/gtk-doc/Transaction.html#Transaction.RepoSetData
> [2] http://www.packagekit.org/pk-screenshots.html#kde
>
>
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20080902/2b403254/attachment-0002.htm>


More information about the PackageKit mailing list