New sync070.py pactest
> >From cfcaa50b83d6ce09a026e8275f19ce0665365e31 Mon Sep 17 00:00:00
> From: Nagy Gabor <firstname.lastname@example.org>
> 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 <email@example.com>
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...
pacman-dev mailing list