[pacman-dev] [PATCH] New sync070.py pactest

Nagy Gabor ngaba at bibl.u-szeged.hu
Wed Jul 2 11:24:14 EDT 2008

> >From cfcaa50b83d6ce09a026e8275f19ce0665365e31 Mon Sep 17 00:00:00
> >2001
> From: Nagy Gabor <ngaba at bibl.u-szeged.hu>
> Date: Wed, 2 Jul 2008 17:04:29 +0200
> Subject: [PATCH] New sync070.py pactest
> This pactest tests the cooperation between front-end and back-end in
> case of "-S provision" operation.
> Signed-off-by: Nagy Gabor <ngaba at bibl.u-szeged.hu>

This pactest currently fails. It shows that the current "sync
addtarget" is quite messy. Most of the work (search for provision,
install group) is done in the front-end, some of the work done in the
back-end (interpret '/', avoid duplicated targets, and the
"conversion" from pmpkg_t to pmsyncpkg_t). The only information
back-end can pass to front-end is the package name, which is not
enough (that's why the pactest fails). As a possible fix, we could
patch front-end to give more concrete info to backend (to
sync_addtarget) by using 'db/package' format. But I think that
still would be ugly, the back-end should be able to say, that he wants
to add _this_ (pmpkg_t*) target (API change). IMHO most of the -S
provision/group work should be done by back-end, thus we could hide
some public functions (whatprovides, etc.). Unfortunately an other
problem pops up here: the hackish communication between back-end and
user ("Select packages to install from foo group...").

Conlusion? I don't know. Clearly, the "add provision" and "add group"
analogous to "add literal", that's why these codeparts should be in
back-end. But user<->back-end communication is not perfect atm...


More information about the pacman-dev mailing list