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

Re: How to preconfigure debconf values?



On Mon, Dec 24, 2007 at 11:38:10AM +0100, Frans Pop wrote:
> On Monday 24 December 2007, Josef Wolf wrote:
> > But dpkg-reconfigure still asks, even though I explicitly set them as
> > "seen".
> 
> That is correct. dpkg-reconfigure ignores the seen flag as otherwise it 
> would be completely impossible to _ever_ reconfigure packages that were 
> installed with preseeding (at least, from the PoV of a regular user).

Yes, I understand.  But as tzdata is installed by debootstrap, there's no
way to preseed it before installation.

> Reinstalling the package _without_ purging it could work.

Without purging, the tzdata/Zones/Etc value is left in place, so
reinstalling still don't get the preseeded value.  With purging, it
gets even more wired:

  # DEBIAN_FRONTEND=noninteractive apt-get remove --purge -y --force-yes tzdata
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  The following packages will be REMOVED:
    locales* tzdata* ubuntu-minimal* util-linux* util-linux-locales*
  WARNING: The following essential packages will be removed.
  This should NOT be done unless you know exactly what you are doing!
    util-linux tzdata (due to util-linux)
  0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
  Need to get 0B of archives.
  After unpacking 19.9MB disk space will be freed.
  You are about to do something potentially harmful.
  To continue type in the phrase 'Yes, do as I say!'
   ?] Yes, do as I say!
  [ ... ]

I still don't get in completely non-interactive :-/  In addition, please
note the broken prompt.  And I am not entirely sure I really want all of
those packages to be removed.  But I'm curious, so I go ahead:

  # debconf-show tzdata
  # debconf-set-selections /etc/preseed
  # debconf-show tzdata
  * tzdata/Areas: Europe
  * tzdata/Zones/Europe: Berlin

OK, tzdata/Zones/Etc is finally gone and here are my desired values.  But
there's still no luck:

  # apt-get install tzdata
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  The following NEW packages will be installed:
    tzdata
  0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  Need to get 0B/649kB of archives.
  After unpacking 6283kB of additional disk space will be used.
  Preconfiguring packages ...
  Selecting previously deselected package tzdata.
  (Reading database ... 11884 files and directories currently installed.)
  Unpacking tzdata (from .../tzdata_2007j-0ubuntu0.7.10_all.deb) ...
  Setting up tzdata (2007j-0ubuntu0.7.10) ...
 
  User defined timezone, leaving /etc/localtime unchanged.
  Local time is now:      Mon Dec 24 12:27:47 UTC 2007.
  Universal Time is now:  Mon Dec 24 12:27:47 UTC 2007.
  Run 'dpkg-reconfigure tzdata' if you wish to change it.

My settings are simply ignored...

> P.S. Do we need to keep CCing you, or are you subscribed to the list?

I am subscribed.  But I am still not sure whether debootstrap and debconf
are ontopic on this list or whether this list is for d-i only.


Reply to: