Package: debconf
Version: 1.2.20
Severity: normal
Tags: patch
Hi,
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.
Here is a patch.
Denis
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux france0danemark2 2.4.20-386 #1 Sat Dec 21 14:31:26 EST 2002 i586
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (ignored: LC_ALL set)
Versions of packages debconf depends on:
ii perl-base 5.8.0-14 The Pathologically Eclectic Rubbis
-- debconf information excluded
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
Subject: Re: Bug#174130: debconf: allow empty variable substitutions in Choices field
Date: Mon, 30 Dec 2002 21:28:25 +0100
On Thu, Dec 26, 2002 at 09:30:31PM -0500, Joey Hess wrote:
> 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"
[...]
Please keep l10n problems in mind when designing this command, I am
afraid that these choices won't be easily translated.
Denis
Subject: Re: Bug#174130: debconf: allow empty variable substitutions in Choices field
Date: Mon, 13 Jan 2003 16:41:08 +0100
On Thu, Dec 26, 2002 at 09:30:31PM -0500, Joey Hess wrote:
> 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"
[...]
This is another issue, my bugreport is about empty fields in choices list.
IMO they must be skipped, whatever implementation is used to build the
choices list.
Denis
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.