Debian Bug report logs - #174130
debconf: allow empty variable substitutions in Choices field

version graph

Package: debconf; Maintainer for debconf is Debconf Developers <[email protected]>; Source for debconf is src:debconf (PTS, buildd, popcon).

Reported by: Denis Barbier <[email protected]>

Date: Mon, 23 Dec 2002 22:48:04 UTC

Severity: normal

Tags: patch

Found in version 1.2.20

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Joey Hess <[email protected]>, [email protected]:
Bug#174130; Package debconf. (full text, mbox, link).


Acknowledgement sent to Denis Barbier <[email protected]>:
New Bug report received and forwarded. Copy sent to Joey Hess <[email protected]>, [email protected]. (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Denis Barbier <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: debconf: allow empty variable substitutions in Choices field
Date: Mon, 23 Dec 2002 23:36:15 +0100
[Message part 1 (text/plain, inline)]
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

[substempty.patch (text/plain, attachment)]

Information forwarded to [email protected], [email protected]:
Bug#174130; Package debconf. (full text, mbox, link).


Acknowledgement sent to Joey Hess <[email protected]>:
Extra info received and forwarded to list. Copy sent to [email protected]. (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Joey Hess <[email protected]>
To: Denis Barbier <[email protected]>, [email protected]
Subject: Re: Bug#174130: debconf: allow empty variable substitutions in Choices field
Date: Thu, 26 Dec 2002 21:30:31 -0500
[Message part 1 (text/plain, inline)]
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
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to [email protected]:
Bug#174130; Package debconf. (full text, mbox, link).


Acknowledgement sent to [email protected] (Denis Barbier):
Extra info received and filed, but not forwarded. Copy sent to [email protected]. (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: [email protected] (Denis Barbier)
To: [email protected]
Cc: Denis Barbier <[email protected]>
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



Information forwarded to [email protected], Joey Hess <[email protected]>, [email protected]:
Bug#174130; Package debconf. (full text, mbox, link).


Acknowledgement sent to [email protected] (Denis Barbier):
Extra info received and forwarded to list. Copy sent to Joey Hess <[email protected]>, [email protected]. (full text, mbox, link).


Message #20 received at [email protected] (full text, mbox, reply):

From: [email protected] (Denis Barbier)
To: [email protected]
Cc: Denis Barbier <[email protected]>
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



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Fri May 16 09:30:25 2025; Machine Name: buxtehude

Debian Bug tracking system

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/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.