update-alternatives parsing failure under non-English locales

Bug #1293596 reported by Matthias Lohr
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
postgresql-common (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This problem occured due an upgrade from 12.04LTS to 14.04LTS.

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: postgresql-client-9.3 9.3.3-1bzr2
ProcVersionSignature: Ubuntu 3.2.0-60.91-generic 3.2.55
Uname: Linux 3.2.0-60-generic x86_64
ApportVersion: 2.13.3-0ubuntu1
Architecture: amd64
Date: Mon Mar 17 14:58:14 2014
DuplicateSignature: package:postgresql-client-9.3:9.3.3-1bzr2:ErrorMessage: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück
ErrorMessage: ErrorMessage: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück
InstallationDate: Installed on 2012-12-27 (444 days ago)
InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Release amd64 (20120424.1)
SourcePackage: postgresql-9.3
Title: package postgresql-client-9.3 9.3.3-1bzr2 failed to install/upgrade: ErrorMessage: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück
UpgradeStatus: Upgraded to trusty on 2014-03-17 (0 days ago)

Revision history for this message
Matthias Lohr (mlohr) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in postgresql-9.3 (Ubuntu):
status: New → Confirmed
Revision history for this message
Alexander Schlarb (alexander255) wrote :

The reason this is happening is because the function `_link_manpages` in the file `/usr/share/postgresql-common/maintscripts-functions` searches for the string "auto mode" in the output of the command `update-alternatives --display postmaster.1.gz 2> /dev/null` however (since both mine and his system are using the german locale the string that is printed by `update-alternatives` is actually "Auto-Modus".

I can't test this anymore (applied the workaround given below already), but the solution would probably be to change the problematic command to `env LANGUAGE=C update-alternatives --display postmaster.1.gz 2> /dev/null`.

WORKAROUND:
 * Run this command: sudo update-alternatives --remove postmaster.1.gz /usr/share/postgresql/9.1/man/man1/postmaster.1.gz
 * Retry the upgrade using: sudo aptitude safe-upgrade

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

Thanks! Fixed in bzr.

affects: postgresql-9.3 (Ubuntu) → postgresql-common (Ubuntu)
Changed in postgresql-common (Ubuntu):
status: Confirmed → Triaged
status: Triaged → Fix Committed
summary: - package postgresql-client-9.3 9.3.3-1bzr2 failed to install/upgrade:
- ErrorMessage: Unterprozess installiertes post-installation-Skript gab
- den Fehlerwert 2 zurück
+ update-alternatives parsing failure under non-English locales
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package postgresql-common - 160

---------------
postgresql-common (160) unstable; urgency=medium

  [ Martin Pitt ]
  * supported-versions: Set 9.4 as default for Ubuntu 14.10.
  * debian/maintscripts-functions: Call update-alternatives under C locale to
    fix parsing for non-English locales. (LP: #1293596)
  * pg_createcluster: Fix test if specified owner/group ID is numeric. Thanks
    Sven Berkvens-Matthijsse! (LP: #1329227)

  [ Christoph Berg ]
  * Use dh-systemd to enable postgresql.service on install. (Closes: #757612)
  * Set Multi-Arch: foreign in postgresql-common, postgresql-client-common,
    postgresql-client, and postgresql-doc, and document this in
    doc/dependencies.{dia,png}. (Closes: #757520)
  * Update examples in README.Debian for 9.4. (Closes: #756007)
  * Install README.systemd.

 -- Christoph Berg <email address hidden> Mon, 11 Aug 2014 15:39:39 +0200

Changed in postgresql-common (Ubuntu):
status: Fix Committed → 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.