[Debconf-devel] Bug#657630: Bug#657630: debconf: Silently fails on multi-line values in db_set

Joey Hess joeyh at debian.org
Fri Jan 27 18:16:26 UTC 2012

Matthijs Kooijman wrote:
> after spending quite some time on debugging a nullmailer postinst issue,
> I discovered that debconf's db_set chokes when multi-line values are
> passed to it (in this particular case, /etc/mailname contained two
> lines, and db_set shared/mailname "`cat /etc/mailname`" was called).
> I'm not quite sure if multi-line values should be supported (the manual
> doesn't seem to mention supporting it, nor requiring that values be
> single line).
> Right now, if a multiline value is passed to db_set, it simply sends it
> over causing debconf to interpret the second line as an invalid command,
> breaking the rest of the script (due to a desync in command/responses).
> This can be reproduced with the following script (for some reason I
> needed to db_get's after the broken db_set, not sure why that is, the
> original case used a db_set).

You need to use debconf-escape to handle cases like these. It could
be documented/integrated better.

see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debconf-devel/attachments/20120127/41e1aca3/attachment.pgp>

More information about the Debconf-devel mailing list