[Debconf-devel] Bug#636219: How can we quote # in a value passed to debconf-set-selections?

Steven Chamberlain steven at pyro.eu.org
Mon Mar 26 19:23:32 UTC 2012


On 26/03/12 19:58, Steven Chamberlain wrote:
> Yes that could be a problem, but according to the manual of the version
> in Squeeze it seems that embedded comments should not have been allowed.
>  From debconf-set-selections(1):
> 
>> DATA FORMAT
>>        The data is a series of lines. Lines beginning with a # character are
>>        comments. Blank lines are ignored. All other lines set the value...

I should be more specific;  the meaning of 'embedded comment' could be
misinterpreted (and I think I just did).


A comment that appears on a line on its own, within the preseed file, is
fine in any case:

> # Example 1
> # This is a comment
> example^Ifoo^Ibar


A comment that appears on the end of a line after debconf
package/name/value fields, is currently allowed.  But in my opinion that
was a mistake, undocumented, and has caused at least some issues.

In this example, the debconf-set-selections in Squeeze discards the '#'
character and rest of the line for both of these settings:

> # Example 2
> example^Ifoo^Ibar # This comment should not be here
> example^Itype^IPKCS#05

Wheezy has already corrected this (debconf-set-selections will treat the
'#' character literally and accept the rest of the line as being part of
the value).

The version in Wheezy also handles the even less likely scenario of a
'#' character immediately following a line continuation.

-- 
Steven Chamberlain
steven at pyro.eu.org





More information about the Debconf-devel mailing list