tzdata upgrade: /usr/sbin/tzconfig: No such file or directory

Bug #164254 reported by bettlebrox
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tzdata (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: tzdata

Error when upgrading to latest version of tzdata in Gutsy:

Setting up tzdata (2007i-0ubuntu0.7.04) ...
Running 'tzconfig' to set this system's timezone.
/var/lib/dpkg/info/tzdata.postinst: line 27: /usr/sbin/tzconfig: No such file or directory
dpkg: error processing tzdata (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 tzdata
E: Sub-process /usr/bin/dpkg returned an error code (1)

Version is:

Package: tzdata
Priority: required
Section: libs
Installed-Size: 5768
Maintainer: Martin Pitt <email address hidden>
Original-Maintainer: GNU Libc Maintainers <email address hidden>
Architecture: all
Version: 2007i-0ubuntu0.7.04
Replaces: libc0.1, libc0.3, libc6, libc6.1, locales
Filename: pool/main/t/tzdata/tzdata_2007i-0ubuntu0.7.04_all.deb
Size: 314502
MD5sum: ac62b58dcad4784e67aca0f7d51909ca
SHA1: 78f0b05476ff11ae70cbf5e11bc2e06ef84afe45
SHA256: 8bf0fd89078bd3d974d6d9773718374d66a7f459785c9e655da1cd2cd9c030d8
Description: Time Zone and Daylight Saving Time Data
 This package contains data that represent the history of local time for many
 representative locations around the globe. It is updated periodically to
 reflect changes made by political bodies to time zone boundaries, UTC offsets,
 and daylight-saving rules
Bugs: mailto:<email address hidden>
Origin: Ubuntu
Task: minimal

Revision history for this message
Sneb (largadas) wrote :

I have a similar bug

When I try to use apt, I have a problem because tzdata is missconfigured

Setting up tzdata (2007i-0ubuntu0.7.10) ...
dpkg: error processing tzdata (--configure):
 subprocess post-installation script returned error exit status 10

Revision history for this message
Sneb (largadas) wrote :

I forget to comment that I haven't got problems on i386 arquitecture.

The problem is on machine amd64.

This is strange because tzdata is a pakage for all arquitectures. :-O

Revision history for this message
Sneb (largadas) wrote :

The bug was reported in debian as #452275
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452275

Revision history for this message
bettlebrox (micktimony) wrote :

Sneb it's not the same error as what I reported.

With mine it can't find the executable /usr/sbin/tzconfig . Searching through the package names returns no package in gutsy that has tzconfig:
http://packages.ubuntu.com/cgi-bin/search_contents.pl?word=tzconfig&searchmode=searchfiles&case=insensitive&version=gutsy&arch=i386

This is holding back any other packages from upgrading or installing.

Revision history for this message
bettlebrox (micktimony) wrote :

To get past the install error I edited line 27 of /var/lib/dpkg/info/tzdata.postinst and replaced /usr/sbin/tzconfig with /usr/bin/tzselect:

Before:

    else
        echo "Running 'tzconfig' to set this system's timezone."
        /usr/sbin/tzconfig
    fi
After:

     else
        echo "Running 'tzselect' to set this system's timezone."
        /usr/bin/tzselect
    fi

Revision history for this message
Martin Pitt (pitti) wrote :

This is fixed in the current versions in gutsy-updates and hardy.

Changed in tzdata:
assignee: nobody → pitti
status: New → Triaged
status: Triaged → Fix Released
Revision history for this message
Frederick Reeve (cylix) wrote :

Its back...

Setting up tzdata (2008a-0ubuntu0.7.10) ...
dpkg: error processing tzdata (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 tzdata
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is there a quick work around for this?

Revision history for this message
Frederick Reeve (cylix) wrote :

I didn't figure out exactly what was causing it but its definitely because some one is using dash to do something dash doesn't do. I changed the interpreter from /bin/sh a link to dash to /bin/bash and now the world is happy again.

So I answer my own question here the quick fix:

Edit the first line of /var/lib/dpkg/info/tzdata.postinst replacing #!/bin/sh with #!/bin/bash

Revision history for this message
Martin Pitt (pitti) wrote :

Frederick, thanks for your followup. However, this is unrelated to the original bug. Can you reproduce the failure when switching back to dash? I can't (and I have used dash since ages). You can simulate an upgrade and enable debugging with

  sudo env DEBCONF_DEBUG=developer apt-get install --reinstall tzdata

Revision history for this message
onny (onny) wrote :

ubuntu@ubuntu:~$ sudo env DEBCONF_DEBUG=developer apt-get install --reinstall tzdata
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Lese Status-Informationen ein... Fertig
0 aktualisiert, 0 neu installiert, 1 erneut installiert, 0 zu entfernen und 5 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0B Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren [J/n]? J
Richte tzdata ein (2009r-0ubuntu9.10) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is tzdata
debconf (developer): starting /var/lib/dpkg/info/tzdata.config configure 2009o-1ubuntu2
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): <-- CAPB backup
debconf (developer): --> 0 multiselect escape backup
debconf (developer): <-- FSET tzdata/Areas seen true
debconf (developer): --> 10 tzdata/Areas doesn't exist
dpkg: Fehler beim Bearbeiten von tzdata (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 10 zurück
Fehler traten auf beim Bearbeiten von:
 tzdata
E: Sub-process /usr/bin/dpkg returned an error code (1)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.