package samba-common 2:3.4.0-3ubuntu5.1 failed to install/upgrade: exit status 10 - failed to open /var/lib/dpkg/info/ucf.templates: No such file or directory

Bug #492257 reported by Keith Gaughan
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
debconf (Ubuntu)
Invalid
Undecided
Unassigned
dpkg (Ubuntu)
Invalid
Undecided
Unassigned
ucf (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: samba

Description: Ubuntu 9.10
Release: 9.10

samba-common:
  Installed: 2:3.4.0-3ubuntu5.1
  Candidate: 2:3.4.0-3ubuntu5.1
  Version table:
 *** 2:3.4.0-3ubuntu5.1 0
        500 http://ie.archive.ubuntu.com karmic-updates/main Packages
        100 /var/lib/dpkg/status
     2:3.4.0-3ubuntu5 0
        500 http://ie.archive.ubuntu.com karmic/main Packages

ProblemType: Package
Architecture: amd64
Date: Fri Dec 4 10:57:32 2009
DistroRelease: Ubuntu 9.10
ErrorMessage: subprocess installed post-installation script returned error exit status 10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
NonfreeKernelModules: nvidia
Package: samba-common 2:3.4.0-3ubuntu5.1
PackageArchitecture: all
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: samba
Title: package samba-common 2:3.4.0-3ubuntu5.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 10
Uname: Linux 2.6.31-14-generic x86_64

Revision history for this message
Keith Gaughan (kmgaughan) wrote :
Revision history for this message
Chuck Short (zulcss) wrote :

This looks like a dpkg bug to me.

Regards
chuck

affects: samba (Ubuntu) → dpkg (Ubuntu)
Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

I have probably the same problem in Lucid:

Setting up samba-common (2:3.4.3-2ubuntu2) ...
dpkg: error processing samba-common (--configure):
 subprocess installed post-installation script returned error exit status 10

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

The same error is reported for
samba-common, apt-listchanges, text-common:

Setting up apt-listchanges (2.84) ...
dpkg: error processing apt-listchanges (--configure):
 subprocess installed post-installation script returned error exit status 10
dpkg: error processing tex-common (--configure):
 subprocess installed post-installation script returned error exit status 10

This starts to break some updates, but not all.
How do I debug this problem?

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

Moving away the corresponding files in /var/lib/dpkg/info/ repaired the update.

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

Addition to last comment:
Moving away the files did not solve the problem because the problem reappeared after removing and installing
theses packages again.

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

It seems to be a debconf problem.

The following exists with exit code 10:
LANG=C DEBCONF_DEBUG=developer sudo debconf /var/lib/dpkg/info/grub-pc.postinst configure
LANG=C sudo debconf --frontend=readline /var/lib/dpkg/info/grub-pc.postinst configure

But this one succeeds (notice the additional "sh"):
LANG=C sudo debconf --frontend=readline sh /var/lib/dpkg/info/grub-pc.postinst configure

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

I followd the execution of debconf recursively.

The following
/usr/share/debconf/frontend sh -x /usr/bin/ucf --three-way --debconf-ok /var/run/samba/upgrades/smb.conf /etc/samba/smb.conf
failed in
+ db_x_loadtemplatefile /var/lib/dpkg/info/ucf.templates ucf
+ _db_cmd X_LOADTEMPLATEFILE /var/lib/dpkg/info/ucf.templates ucf
+ IFS= printf %s\n X_LOADTEMPLATEFILE /var/lib/dpkg/info/ucf.templates ucf
+ IFS=
 read -r _db_internal_line
+ RET=10 failed to open /var/lib/dpkg/info/ucf.templates: No such file or directory
+ return 10

/var/lib/dpkg/info/ucf.templates was missing

But it does not belong to the files I moved away:
LANG=C ls ~/dpkg_bug/ucf.*
ls: cannot access /home/xxx/dpkg_bug/ucf.*: No such file or directory

A reinstall of ucf fixed this for me.

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

bug 505405 seems to be a duplicate of this bug.

summary: - package samba-common 2:3.4.0-3ubuntu5.1 failed to install/upgrade:
- subprocess installed post-installation script returned error exit status
- 10
+ package samba-common 2:3.4.0-3ubuntu5.1 failed to install/upgrade: exit
+ status 10 - failed to open /var/lib/dpkg/info/ucf.templates: No such
+ file or directory
Revision history for this message
Steve Langasek (vorlon) wrote :

This is not a dpkg bug.

The error returned from the postinst script is a generic debconf error code. Stefan, in your case it was caused by a corrupt dpkg info directory, but there's nothing to say whether or not this is the bug Keith experienced.

Keith, what happens if you try to run ucf by hand like Stefan did?

Changed in dpkg (Ubuntu):
status: New → Invalid
Revision history for this message
dino99 (9d9) wrote :

That version is no more maintained

Changed in ucf (Ubuntu):
status: New → Invalid
Changed in debconf (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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