Bug#386837: [Pkg-kbd-devel] Bug#386837: console-setup: "none" defaults for several questions seem bogus

Anton Zinoviev anton at lml.bas.bg
Sat Sep 16 20:52:22 UTC 2006


On Sun, Sep 10, 2006 at 04:15:07PM +0100, Colin Watson wrote:
> 
> I don't think the "none" defaults for several debconf questions make a
> lot of sense.

Yes, it doesn't.  I am not sure, but I have the feeling that two years
ago cdebconf didn't allow partman to db_set default value of a
question that has not been asked yet and whose template doesn't have
the "Default:" field.  If you know that this is not the case then it
will be better to remove these spurious "Default: none" from the
template file.  Otherwise it is better to stay safe.

I would have tested the removal of this field from the template file
but I don't know how to use cdebconf on my desktop computer...  For
now I am changing "none" to "this default value is completely
ignored".

> Nothing in console-setup appears to have any kind of special
> handling for "none", and it's more usual to default unset string
> questions to just the empty string. The attached patch does this.

The config script of console-setup always sets the default value of
the questions before asking them ignoring the current value of the
question.  Because of that this "none" is completely irrelevant and
can be changed to anything.

> This patch also adds special handling for XKBOPTIONS being '' to avoid
> triggering unsupported_layout=yes. If you refuse the other part of the
> patch, then "'')" would need to be changed to "''|none)".

It is impossible for the $option variable to have value ''.  Look at
the loop:

      for option in `echo $XKBOPTIONS | sed 's/,/ /g'`; do

If XKBOPTIONS='' then the loop executes zero times.  If
XKBOPTIONS=',a,,b,' then the loop executes only two times.

However my tests showed that if the user backs up from the debconf
questions then the config script has no chance to change the default
'none' values in the Debconf data base.  Then the postinst reads these
bad values, puts them in /etc/default/console-setup and later ckbcomp
fails.

The problem comes from the following code at the end of the config script:

      if [ $STATE -eq 1 ]; then
          exit 10
      fi

In the first line of this code 1 should be changed to 0 or else the
script will never exit with code 10.  Unfortunately I copyed this code
from an example script in the manpage debconf-devel meaning that
possibly there are other packages having the same bug...  I've already
reported this problem as #387708.

Anton Zinoviev




More information about the Pkg-kbd-devel mailing list