[pacman-dev] ALPM Questions
Hey guys, I know, none if you is quite happy with the current public interface of ALPM. Anyway, we're on to build up python bindings for this library. We'll be with you when the API of ALPM changes, so i'll watch the lists and cvs carefully. We have a feature plan for the first milestone of the project, but for the sake of task definition i'm missing information (basically documentation, but we all know it always could be better :) .. i hate documenting things too, it's annoying but needed). You have exported quite a lot of data structures. Basically, the first milestone will include a configuration "interface", spoken from the binding, the possibility to add and remove packages (undecided for packagegroups). I've some question regarding alpm features, as well as data structure questions. I'll start with the alpm features. As it seems, alpm currently has no possibility to fetch a list of packages provided by a specified package database. It seems, as if i need to use the pmdb_t structure and manually step trough the pkgcache of it to have a list what the repo provides. Am i right? Or is there any other interface? The data structures: Since adding and removing packages are quite simple tasks (at least from the point of view of someone using the API), by taking a look at the pacman code (3.0.0, don't have the current 3.0.3 here), it seems as i need a type implementation in the binding for the following structures: pmdb_t alpm_list pmgrp_t (if we provide the grouping already in ms1) pmdepmissing_t pmdepend_t (if i want a list what a package depends on anyway, the implementation might be needed for the purpose of building a pkg object containing a set of information). pmconflict_t pmsyncpkg_t There i'm unsure what it is used for, and if i need it at all. I could not find any function which i definitely need to call where this structure is used for. --- Feature related bindings Register / unregister DBs Register / unregister cache directories (handled by the binding, not the client) Add packages (resolving deps, conflichts, handling of ignorepkg, checksums, sha1, architecture handling and adding packages using alpm_trans_addtarget, alpm_prepare and alpm_commit). Removing packages Resolving of all removable dependencies to keep the system "clean". Remove packages including removable dependencies (using alpm_trans_addtarget, alpm_prepare and alpm_commit). QUESTION: how to find out which dependencies of a package are stil in use by other installed packages, and which not? The features of the first test client are still undecided, even though there is no decision if there will be a GUIfied test for the first milestone release. A closer look: https://213.129.245.26/svn/ggtest/docs/milestone_0_1.pdf This document is missing the pmdb_t implementation - was late yesterday in the evening i started the document, and i've still some more tasks (getting the domain right down the same server as the svn is located, providing a task-tracking and bug-tracking for the dev etc or a groupware etc). A basic question is: pyalpm will break within a new version with API changes of alpm. Will it be possible to have two libraries installed? Otherwhise, we would either have to react fast, or keep on track with your development, for being able to release with a new alpm api as well. There we'd definitely need proper information befor it's pushed live. For now, not important, but all this are things somehow turning my brain around. Kind regards, Georg
Na Fri, May 04, 2007 at 09:44:50AM +0200, Georg Grabler <ggrabler@gmail.com> pisal(a):
pmsyncpkg_t There i'm unsure what it is used for, and if i need it at all. I could not find any function which i definitely need to call where this structure is used for.
cmiiw, but when you get the list of packages currently in the transaction, you'll need it (ie. when you add a pkg to a sync transaction and you would like to see what deps it pulled in) VMiklos -- developer of Frugalware Linux - http://frugalware.org
Sounds intersting, thank you. Could you describe in short what the sync anyway does? So which functionalities does it include? We'd like sync just to have a (in example) current.db.tar.gz provided (by path or how ever) and let alpm sync it with the current package db. We have plans not to implement any download feature of alpm, so downloading files (in our opinion) definitely is no task of the library / binding, but of the client, and i'm currently not sure if that's possible at all. So rather, we will want to use alpm for the following features: - Package DB handling (basically update pacman db dirs with the lib, by already existing pdbs in the fs) - Adding packages (so pulling depends, installing and adding it to the cache, handling the packages how ever the installed / not installed works. Also there, packages exist in the fs, which should be possible by setting another package cache dir for alpm) - Removing packages (as i wrote reverse-depend calc and handling of the uninstall process). Thank you, Georg On 5/4/07, VMiklos <vmiklos@frugalware.org> wrote:
Na Fri, May 04, 2007 at 09:44:50AM +0200, Georg Grabler <ggrabler@gmail.com> pisal(a):
pmsyncpkg_t There i'm unsure what it is used for, and if i need it at all. I could not find any function which i definitely need to call where this structure is used for.
cmiiw, but when you get the list of packages currently in the transaction, you'll need it (ie. when you add a pkg to a sync transaction and you would like to see what deps it pulled in)
VMiklos
-- developer of Frugalware Linux - http://frugalware.org
Na Fri, May 04, 2007 at 12:41:51PM +0200, Georg Grabler <ggrabler@gmail.com> pisal(a):
Could you describe in short what the sync anyway does? So which functionalities does it include?
first, you init the transaction with trans_init(), then add the targets using trans_addtarget(). trans_prepare() will check depends/conflicts, etc. (this time you can get the list of packages and that's the case when you need PM_SYNCPKG). finally trans_commit() will download, check for conflicting files and install the targets
We'd like sync just to have a (in example) current.db.tar.gz provided (by path or how ever) and let alpm sync it with the current package db.
you need db_update()
We have plans not to implement any download feature of alpm, so downloading files (in our opinion) definitely is no task of the library / binding, but of the client, and i'm currently not sure if that's possible at all.
if you don't register a callback, the lib should be still fine
So rather, we will want to use alpm for the following features: - Package DB handling (basically update pacman db dirs with the lib, by already existing pdbs in the fs)
db_update()
- Adding packages (so pulling depends, installing and adding it to the cache, handling the packages how ever the installed / not installed works. Also there, packages exist in the fs, which should be possible by setting another package cache dir for alpm)
PM_TRANS_TYPE_ADD
- Removing packages (as i wrote reverse-depend calc and handling of the uninstall process).
PM_TRANS_TYPE_REMOVE A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? thanks, VMiklos -- developer of Frugalware Linux - http://frugalware.org
participants (2)
-
Georg Grabler
-
VMiklos