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

Bug#704089: tzdata config script prevents non-interactive (re)configuration



Package: tzdata
Version: 2012j-1

The configuration script of the tzdata package, wich uses debconf, prevents
non-interactive (re)configuration of the package.

To reproduce:

- feed debconf with new values for tzdata keys (ex. debconf-set-selections)
- run 'dpkg-reconfigure -fnoninteractive tzdata'
- configuration is unchanged

I propose the following change which makes non-interactive reconfiguration possible:

  
  --- /var/lib/dpkg/info/tzdata.config.orig       2013-03-27 18:58:53.000000000 +0100
  +++ /var/lib/dpkg/info/tzdata.config    2013-03-27 18:35:53.000000000 +0100
  @@ -370,8 +370,10 @@
   
   # Initializes debconf default values from the ones found in
   # configuration files
  -db_set tzdata/Areas "$AREA"
  -db_set tzdata/Zones/$AREA "$ZONE"
  +if [ -z "$DEBCONF_RECONFIGURE" ]; then
  +  db_set tzdata/Areas "$AREA"
  +  db_set tzdata/Zones/$AREA "$ZONE"
  +fi
   
   STATE=1
   while [ "$STATE" -ge 0 ]; do
  

Note: the comment could make us believe that keys are initialized with the
current values of the debconf database, but it is not the case. These values
are computed from /etc/timezone.

Thanks,

-- 
Sebastien Bocahu


Reply to: