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

Bug#427584: tzdata fails to configure if /etc/localtime is missing



Package: tzdata
Version: 2007f-8
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

schwan:~# rm /etc/localtime 
schwan:~# apt-get --reinstall install tzdata
Reading package lists... Done
Building dependency tree... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/386kB of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]? 
Preconfiguring packages ...
tzdata failed to preconfigure, with exit status 10
(Reading database ... 7179 files and directories currently installed.)
Preparing to replace tzdata 2007f-8 (using .../tzdata_2007f-8_all.deb) ...
Unpacking replacement tzdata ...
Setting up tzdata (2007f-8) ...
dpkg: error processing tzdata (--configure):
 subprocess post-installation script returned error exit status 10
Errors were encountered while processing:
 tzdata
E: Sub-process /usr/bin/dpkg returned an error code (1)
schwan:~# 

The bug is in the debconf config script, which is using TZ_LOCALTIME when it
can not been set to set AREA and ZONE. It should use TZ_TIMEZONE instead. See
attached patch.

    Ingo

- -- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (800, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-rc3-schwan20070526
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages tzdata depends on:
ii  debconf [debconf-2.0]         1.5.13     Debian configuration management sy

tzdata recommends no packages.

- -- debconf information excluded

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGZMzk4XrXtQkN2NURAvFvAKCIahvV3ViOQ/MfGvacl5g0CeTeQACgtNZg
xbcHyAD/R0fStrzlmptFbXQ=
=xq1j
-----END PGP SIGNATURE-----
diff -Ndurp tzdata-2007f.orig/debian/config tzdata-2007f/debian/config
--- tzdata-2007f.orig/debian/config	2007-06-05 04:35:26.000000000 +0200
+++ tzdata-2007f/debian/config	2007-06-05 04:36:18.433546583 +0200
@@ -341,8 +341,8 @@ fi
 # The timezone has never been configured or is falsely configured
 if ! [ -e /etc/localtime ] ; then
     if [ -n "$TZ_TIMEZONE" ] ; then
-        AREA="${TZ_LOCALTIME%%/*}"
-        ZONE="${TZ_LOCALTIME#*/}"
+        AREA="${TZ_TIMEZONE%%/*}"
+        ZONE="${TZ_TIMEZONE#*/}"
     else
         AREA="Etc"
 	ZONE="UTC"

Reply to: