Subject: Bug#174130: debconf: allow empty variable substitutions in Choices field

From: Joey Hess <[email-masked]>
Date: Thu, 26 Dec 2002 21:30:31 -0500

Denis Barbier wrote:
> consider for instance
>   Choices: ${foo}, Other, Exit
> Sometimes ${foo} may be empty, in which case debconf displays an empty
> line.  A workaround is to replace it by
>   Choices: ${foo} Other, Exit
> and to add a comma within foo when needed.
> This is silly, IMO debconf should not take empty fields into account in
> Choices fields.

This is part of the reason I intend to do away with substitution into
Choices fields and add a new command to the protocol that can be used to
set choices on the fly instead. You'd then do something like:

db_getchoices question
db_setchoices question "$RET, new choice 1, new choice 2"

Since your patch, while fine, is just a hack that I'd have to remove
once this is fixed right, I'm inclined to ignore it. I may be able to do
the design work next month (traveling), if so I'll see if I can get
something added to the spec in February.

-- 
see shy jo