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

r2060 - tzdata/trunk/debian



Author: aurel32
Date: 2007-04-14 11:37:51 +0000 (Sat, 14 Apr 2007)
New Revision: 2060

Modified:
   tzdata/trunk/debian/changelog
   tzdata/trunk/debian/config
   tzdata/trunk/debian/postinst
Log:
  * Don't ask debconf questions during the first upgrade if the timezone
    is already configured.



Modified: tzdata/trunk/debian/changelog
===================================================================
--- tzdata/trunk/debian/changelog	2007-04-14 10:57:27 UTC (rev 2059)
+++ tzdata/trunk/debian/changelog	2007-04-14 11:37:51 UTC (rev 2060)
@@ -1,3 +1,10 @@
+tzdata (2007e-4) unstable; urgency=low
+
+  * Don't ask debconf questions during the first upgrade if the timezone
+    is already configured.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 14 Apr 2007 13:33:23 +0200
+
 tzdata (2007e-3) unstable; urgency=low
 
   * Add missing Australia area (closes: bug#419191). 

Modified: tzdata/trunk/debian/config
===================================================================
--- tzdata/trunk/debian/config	2007-04-14 10:57:27 UTC (rev 2059)
+++ tzdata/trunk/debian/config	2007-04-14 11:37:51 UTC (rev 2060)
@@ -13,14 +13,20 @@
 if ! [ -f "/usr/share/zoneinfo/$TIMEZONE" ] && [ -f /etc/timezone ] ; then
     TIMEZONE=$(head -n 1 /etc/timezone | sed -e "s/ .*//")
 fi
-if ! [ -f "/usr/share/zoneinfo/$TIMEZONE" ] ; then
-    TIMEZONE=Etc/UTC
+if [ -f "/usr/share/zoneinfo/$TIMEZONE" ] ; then
+    AREA=$(echo $TIMEZONE | sed 's%/.*$%%')
+    ZONE=$(echo $TIMEZONE | sed 's%^.*/%%')
+    if [ "$1" != "reconfigure" ] && [ -z "$DEBCONF_RECONFIGURE" ] ; then
+        db_fset tzdata/Areas seen true
+        db_fset tzdata/Zones/$AREA seen true
+    fi
+else
+    AREA=Etc
+    ZONE=UTC
 fi
 
-AREA=$(echo $TIMEZONE | sed 's%/.*$%%')
-ZONE=$(echo $TIMEZONE | sed 's%^.*/%%')
-
 db_set tzdata/Areas "$AREA"
+db_set tzdata/Zones/$AREA "$ZONE"
 
 STATE=1
 while [ "$STATE" -ge 0 ]; do
@@ -33,11 +39,7 @@
         ;;
     2)
         db_get tzdata/Areas || RET=Etc
-        NEWAREA=$RET
-        if [ "$NEWAREA" = "$AREA" ] ; then
-            db_set tzdata/Zones/$NEWAREA "$ZONE"
-        fi
-        db_input high tzdata/Zones/$NEWAREA || true
+        db_input high tzdata/Zones/$RET || true
         ;;
     *)
         break

Modified: tzdata/trunk/debian/postinst
===================================================================
--- tzdata/trunk/debian/postinst	2007-04-14 10:57:27 UTC (rev 2059)
+++ tzdata/trunk/debian/postinst	2007-04-14 11:37:51 UTC (rev 2060)
@@ -6,10 +6,12 @@
     db_version 2.0
 
     LC_ALL=C
+    LANG=C
     AREA=Etc
     ZONE=UTC
     db_get tzdata/Areas && AREA="$RET"
     db_get tzdata/Zones/$AREA && ZONE="$RET"
+    db_stop
 
     umask 022
     echo $AREA/$ZONE > /etc/timezone



Reply to: