[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to preconfigure debconf values?



On Mon, Dec 24, 2007 at 01:58:39AM +0100, Frans Pop wrote:
> On Sunday 23 December 2007, Joey Hess wrote:
> > tzdata 2007b-1 (in etch) does not use debconf.

Thanks for the clarification, Joey!

> Right. Etch still used tzconfig to set the timezone. I forgot about that.
> 
> That means Josef will probably just have to set the timezone the way we did 
> it in D-I, which can be seen in this script:
> http://svn.debian.org/wsvn/d-i/branches/d-i/etch/packages/tzsetup/post-base-installer.d/05tzsetup?op=file&rev=0&sc=0

OK, I'll do it this way.

But even tzdata-2007j (which is used in ubuntu/gutsy) behaves somewhat
unexpected (at least to me).  Here is what I see after a fresh debootstrap:

  $ sudo chroot gutsy/target apt-get install debconf-utils
  [ ... ]
  $ sudo chroot gutsy/target debconf-show tzdata
    tzdata/Zones/Australia:
    tzdata/Zones/Asia:
  * tzdata/Zones/Etc: UTC
    tzdata/Zones/SystemV:
    tzdata/Zones/Africa:
    tzdata/Zones/America:
    tzdata/Zones/Arctic:
    tzdata/Zones/Pacific:
  * tzdata/Areas: Etc
    tzdata/Zones/Antarctica:
    tzdata/Zones/Atlantic:
    tzdata/Zones/Canada:
    tzdata/Zones/Europe:
    tzdata/Zones/Indian:

OK, this seems to be OK, since there's no way to preseed packages which are
installed by debootstrap (I guess tha would be a new feature request for
debootstrap).  Then I preseed tzdata:

  $ cat gutsy/target/etc/preseed
  tzdata tzdata/Areas select Europe
  tzdata tzdata/Areas seen true
  tzdata tzdata/Zones/Europe select Berlin
  tzdata tzdata/Zones/Europe seen true
  $ sudo chroot guts/target debconf-set-selections /etc/preseed
  [ ... ]
  $ sudo chroot gutsy/target debconf-show tzdata
    tzdata/Zones/Australia:
    tzdata/Zones/Asia:
  * tzdata/Zones/Etc: UTC
    tzdata/Zones/SystemV:
    tzdata/Zones/Africa:
    tzdata/Zones/America:
    tzdata/Zones/Arctic:
    tzdata/Zones/Pacific:
  * tzdata/Areas: Europe
    tzdata/Zones/Antarctica:
    tzdata/Zones/Atlantic:
    tzdata/Zones/Canada:
  * tzdata/Zones/Europe: Berlin
    tzdata/Zones/Indian:

Please note that tzdata/Zones/Etc is still set to UTC.

  $ sudo chroot gutsy/target dpkg-reconfigure tzdata
  [ ... ]

In the following dialog, I am interactively asked the questions, although
I explicitly set the values as seen.  The fist asked question
(tzdata/Zones/Etc) defaults to "UTC".  I then manually choose Europe.
The second question defaults to "Berlin".  This means, the values are
_somehow_ recognized, but the tzdata/Zones/Etc value is not cleared
properly.

> > (BTW, several people in this thread have seemed to not be aware that
> > debconf-set-selections automatically sets the seen flag of preseeded
> > values.)

But dpkg-reconfigure still asks, even though I explicitly set them as
"seen".

BTW: Merry Christmas!


Reply to: