[pacman-dev] pmtransconv_t + cb_trans_conv

Aaron Griffin aaronmgriffin at gmail.com
Thu Jan 31 12:42:30 EST 2008


On Jan 31, 2008 12:46 AM, Nagy Gabor <ngaba at bibl.u-szeged.hu> wrote:
> Hi!
>
> Some background: FS#7524 and
> http://bbs.archlinux.org/viewtopic.php?id=42959
> So I decided to rephrase our questions and messages to give more
> information about what happening "inside".
>
> Then I soon ran into the question: "Is pmtransconv_t needed?".
> Why do we restrict ourselves to some pre-defined questions? The
> question string [char *] should also work, and then the front-end could
> put a " [Y/n]" after the question (or add yes/no buttons in a graphic
> dialog box).
> But after looking into cb_trans_conv I got the answer: the front-end
> must know the "meaning" of the question to apply its --no-confirm or
> (removed) --ask rules.
> I also saw in the comment, that function is tagged as ugly. My
> compromise: let the backend formulate the question (snprintf + pass
> char* question param or by using va_list) and keep this pmtransconv_t.
>
> An example:
> PM_TRANS_CONV_CONFLICT_PKG:
> "foo [pulled dependency] conflicts with bar. Do you remove bar?"
> Or we could use a more general PM_TRANS_CONV_REMOVE_LOCAL type...
>
> Opinions, ideas?

My opinion is that the backend should not have questions at all. All
of the backend functions which need this sort of stuff to function
should be redesigned and the questions moved to the front end.




More information about the pacman-dev mailing list