[pacman-dev] pmtransconv_t + cb_trans_conv

Nagy Gabor ngaba at bibl.u-szeged.hu
Thu Jan 31 01:46:14 EST 2008


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?

Bye




More information about the pacman-dev mailing list