/usr/bin/locale missing during upgrade

Bug #330048 reported by Colin Watson
4
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Fix Released
High
Martin Pitt
Jaunty
Fix Released
High
Martin Pitt

Bug Description

Preparing to replace libc6-pic 2.9-0ubuntu9 (using .../libc6-pic_2.9-0ubuntu10_i386.deb) ...
Unpacking replacement libc6-pic ...
dpkg: belocs-locales-bin: dependency problems, but removing anyway as you request:
 locales depends on belocs-locales-bin (>= 2.4-2.2ubuntu2).
(Reading database ... 243956 files and directories currently installed.)
Removing belocs-locales-bin ...
Processing triggers for man-db ...
(Reading database ... 243937 files and directories currently installed.)
Preparing to replace locales 2.7.9-5 (using .../locales_2.9+cvs20090214-2_all.deb) ...
Removing obsolete conffile /etc/belocs/iso-639.def ...
Removing obsolete conffile /etc/belocs/locale-gen.conf ...
Unpacking replacement locales ...
Preparing to replace libc6-dev 2.9-0ubuntu9 (using .../libc6-dev_2.9-0ubuntu10_i386.deb) ...
Unpacking replacement libc6-dev ...
Preparing to replace libc6-dev-amd64 2.9-0ubuntu9 (using .../libc6-dev-amd64_2.9-0ubuntu10_i386.deb) ...
Unpacking replacement libc6-dev-amd64 ...
Preparing to replace libc6-amd64 2.9-0ubuntu9 (using .../libc6-amd64_2.9-0ubuntu10_i386.deb) ...
Unpacking replacement libc6-amd64 ...
Preparing to replace libc6 2.9-0ubuntu9 (using .../libc6_2.9-0ubuntu10_i386.deb) ...
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
Unpacking replacement libc6 ...
Processing triggers for man-db ...
Setting up libc6 (2.9-0ubuntu10) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place

/usr/bin/locale is now shipped by libc6, so it isn't available between belocs-locales-bin being removed and the new libc6 being unpacked. debconf is relying on this being treated like an essential component of an Essential package, and always being available.

In this case the problem was non-fatal and debconf recovered, but I'm concerned that this might cause some more serious problems in bigger upgrades. The Conflicts forces belocs-locales-bin to be removed - perhaps this is too heavyweight?

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

I saw that error as well, but since debconf also triggers at postinst time again, I deemed it non-fatal.

However, if this is considered a potential trap, then dropping the Conflicts: would work as well (and just keep the Replaces:). I just added the Conflicts: so that belocs-locales-bin would be cleaned up during upgrade, since we don't want to support/use it any more.

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

OTOH, the new libc6 already Conflicts: to belocs-locales-bin, so we don't need to repeat it again in locales.

Changed in langpack-locales:
assignee: nobody → pitti
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package langpack-locales - 2.9+cvs20090214-4

---------------
langpack-locales (2.9+cvs20090214-4) jaunty; urgency=low

  * Drop Conflicts: to belocs-locales-bin, just keep the Replaces:.
    libc6 already conflicts to it and thus will cause it to be cleaned
    up on upgrades. This narrows the time when /usr/bin/locale does
    not exist. (LP: #330048)

 -- Martin Pitt <email address hidden> Mon, 16 Feb 2009 15:18:57 +0100

Changed in langpack-locales:
status: New → Fix Released
Revision history for this message
Neil Levine (levine) wrote :

Upgrading from Intrepid to Jaunty. Still have the same issue:

(Reading database ... 126069 files and directories currently installed.)
Preparing to replace locales 2.7.9-5 (using .../locales_2.9+cvs20090214-7_all.deb) ...
Removing obsolete conffile /etc/belocs/iso-639.def ...
Unpacking replacement locales ... <<<<<<<<<<<<<<
Replacing files in old package belocs-locales-bin ...
Processing triggers for man-db ...
(Reading database ... 126078 files and directories currently installed.)
Removing belocs-locales-bin ... <<<<<<<<<<<<<<
Processing triggers for man-db ...
(Reading database ... 126061 files and directories currently installed.)
Preparing to replace libc6 2.8~20080505-0ubuntu9 (using .../libc6_2.9-4ubuntu3_i386.deb) ...
Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16. <<<<<<<<<<<
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
dpkg: error processing /var/cache/apt/archives/libc6_2.9-4ubuntu3_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.9-4ubuntu3_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

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

Reopening then, will investigate.

Changed in langpack-locales (Ubuntu):
status: Fix Released → In Progress
Martin Pitt (pitti)
Changed in langpack-locales (Ubuntu):
importance: Undecided → High
Revision history for this message
Martin Pitt (pitti) wrote :

I just did an intrepid->jaunty upgrade, and I noticed that "Can't exec "locale" error in libc6's preinst as well, but the upgrade just went on, and libc6 was correctly updated. It seems this depends on a particular unpack order, so I need to play with this harder.

Neil, how did you do the upgrade, with update-manager or apt-get, or aptitude? If you used update-manager, can you please attach the logs in /var/log/dist-upgrader/ ?

Revision history for this message
Neil Levine (levine) wrote : Re: [Bug 330048] Re: /usr/bin/locale missing during upgrade

On Tue, Mar 31, 2009 at 10:07:30AM -0000, Martin Pitt said:
> I just did an intrepid->jaunty upgrade, and I noticed that "Can't exec
> "locale" error in libc6's preinst as well, but the upgrade just went on,
> and libc6 was correctly updated. It seems this depends on a particular
> unpack order, so I need to play with this harder.
>
> Neil, how did you do the upgrade, with update-manager or apt-get, or
> aptitude? If you used update-manager, can you please attach the logs in
> /var/log/dist-upgrader/ ?

I used apt-get dist-upgrade which failed. I consequently used
update-manager which also failed.

term.log reads:

(Reading database ... 126069 files and directories currently installed.)
Preparing to replace locales 2.7.9-5 (using
.../locales_2.9+cvs20090214-7_all.deb) ...
Removing obsolete conffile /etc/belocs/iso-639.def ...
Unpacking replacement locales ...
Replacing files in old package belocs-locales-bin ...
Processing triggers for man-db ...
(Reading database ...
(Reading database ... 126078 files and directories currently installed.)
Removing belocs-locales-bin ...
(Reading database ...
(Reading database ... 126061 files and directories currently installed.)
Preparing to replace libc6 2.8~20080505-0ubuntu9 (using
.../libc6_2.9-4ubuntu3_i386.deb) ...
Can't exec "locale": No such file or directory at
/usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp
at /usr/share/perl5/Debconf/Encoding.pm line 17.
rocess: Resource temporarily unavailable
dpkg: error processing
/var/cache/apt/archives/libc6_2.9-4ubuntu3_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.9-4ubuntu3_i386.deb
dpkg: error processing libc6 (--configure):
 package libc6 is already installed and configured
 libc6
386.deb) ...
dpkg: regarding .../libc6-i686_2.9-4ubuntu3_i386.deb containing
libc6-i686, pre-dependency problem:
 libc6-i686 pre-depends on libc6 (= 2.9-4ubuntu3)
  libc6 is installed, but is version 2.8~20080505-0ubuntu9.
dpkg: error processing
/var/cache/apt/archives/libc6-i686_2.9-4ubuntu3_i386.deb (--unpack):
 pre-dependency problem - not installing libc6-i686

I've just tried aptitude however and the upgrade is working now.

N

Martin Pitt (pitti)
affects: langpack-locales (Ubuntu Jaunty) → glibc (Ubuntu Jaunty)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glibc - 2.9-4ubuntu6

---------------
glibc (2.9-4ubuntu6) jaunty; urgency=low

  * sysdeps/depflags.pl: Drop Conflicts: belocs-locales-bin, just keep the
    Replaces:. Not having "locale" available during some points in the upgrade
    can break the upgrade entirely. This will stop belocs-locales-bin from
    being properly removed during upgrade, but we can still add a Conflicts:
    to it to the next LTS version. All of its useful files get overridden
    anyway. (LP: #330048)

 -- Martin Pitt <email address hidden> Wed, 08 Apr 2009 22:53:01 -0700

Changed in glibc (Ubuntu Jaunty):
status: In Progress → Fix Released
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.