Could not install libglib2.0

Bug #854622 reported by Michael Nelson
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
glib2.0 (Ubuntu)
Fix Released
High
Unassigned
Oneiric
Fix Released
High
Unassigned
update-manager (Ubuntu)
Invalid
High
Unassigned
Oneiric
Invalid
High
Unassigned

Bug Description

While upgrading another laptop, during the process I got a dialog saying:

http://paste.ubuntu.com/693682/

After the upgrade finished I saw in the update manager terminal window: Exception during pm.DoInstall(): E:Sub-process /usr/bin/dpkg returned an error code (1), and it did automatically prompt me to create a bug, but I had to reboot to finish the upgrade get a network connection.

After the reboot, it appears to be installed according to apt-cache: http://paste.ubuntu.com/693684/

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: update-manager 1:0.152.18
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
Date: Tue Sep 20 12:35:04 2011
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100224.1)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: update-manager
UpgradeStatus: Upgraded to oneiric on 2011-09-20 (0 days ago)

Revision history for this message
Michael Nelson (michael.nelson) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Similar to bug 835625

For reference: bug 827950, #839909 and #839744 shows the same error with libglib2.0

Revision history for this message
Michael Vogt (mvo) wrote :

Fwiw, I tried to reproduce this issue using apt-clone and the system state file, but it did not work out, I could not hit this failure condition.

Revision history for this message
Michael Nelson (michael.nelson) wrote : Re: [Bug 854622] Re: Could not install libglib2.0

On Wed, Sep 21, 2011 at 2:31 PM, Michael Vogt <email address hidden> wrote:
> Fwiw, I tried to reproduce this issue using apt-clone and the system
> state file, but it did not work out, I could not hit this failure
> condition.

Thanks Michael. Here's the output of trying to update:
http://paste.ubuntu.com/694444/

Revision history for this message
Michael Vogt (mvo) wrote :

Some info, glib was upgraded on amd64 (native arch):
libglib2.0-0:amd64 (2.28.6-0ubuntu1, 2.29.92-0ubuntu1),

and a new install on i386:
libglib2.0-0:i386 (2.29.92-0ubuntu1, automatic)

When michael runs md5sum -c /var/lib/dpkg/info/libglib2.0-0.debsums the changelogs.Debian.gz fails to verify.

The terminal log has (in order):
...
Preparing to replace libglib2.0-0 2.28.6-0ubuntu1 (using .../libglib2.0-0_2.29.92-0ubuntu1_amd64.deb) ...

Unpacking replacement libglib2.0-0 ...
...
Selecting previously deselected package libglib2.0-0:i386.

Unpacking libglib2.0-0:i386 (from .../libglib2.0-0_2.29.92-0ubuntu1_i386.deb) ...

dpkg: error processing /var/cache/apt/archives/libglib2.0-0_2.29.92-0ubuntu1_i386.deb (--unpack):

 './usr/share/doc/libglib2.0-0/changelog.Debian.gz' is different from the same file on the system

dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Revision history for this message
Michael Nelson (michael.nelson) wrote :
Revision history for this message
Michael Nelson (michael.nelson) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for this additional file. This is interessting data. The md5sum of it is:
ce002095400b45d6a0a93bb03f065edf changelog.Debian.gz

But your .md5sum file expects:
680a0ae504d012f2e27adbc2def2c707 usr/share/doc/libglib2.0-0/changelog.Debian.gz

With a changelog from my system:
$ md5sum good-changelog.Debian.gz
680a0ae504d012f2e27adbc2def2c707 good-changelog.Debian.gz
$ diff -u changelog.Debian.gz good-changelog.Debian.gz
Binary files changelog.Debian.gz and good-changelog.Debian.gz differ

$ diff -u changelog.Debian good-changelog.Debian
--- changelog.Debian 2011-09-23 10:13:20.911525000 +0200
+++ good-changelog.Debian 2011-09-23 10:17:08.091858000 +0200
@@ -102,4 +102,4 @@

  -- Sebastien Bacher <email address hidden> Thu, 21 Jul 2011 11:24:19 +0200

-# For older changelog entries, run 'apt-get changelog libglib2.0-data'
+# For older changelog entries, run 'apt-get changelog libglib2.0-0'

So it appears like the libglib2.0-data changelog smuggled itself into the packages.

Revision history for this message
Michael Vogt (mvo) wrote :

Unpack order again:
...
Preparing to replace libglib2.0-bin 2.28.6-0ubuntu1 (using .../libglib2.0-bin_2.29.92-0ubuntu1_amd64.deb) ...

Unpacking replacement libglib2.0-bin ...

Preparing to replace bamfdaemon 0.2.90-0ubuntu3 (using .../bamfdaemon_0.2.98-0ubuntu2_amd64.deb) ...

Unpacking replacement bamfdaemon ...

Preparing to replace libglib2.0-0 2.28.6-0ubuntu1 (using .../libglib2.0-0_2.29.92-0ubuntu1_amd64.deb) ...

Unpacking replacement libglib2.0-0 ...

Preparing to replace libglib2.0-data 2.28.6-0ubuntu1 (using .../libglib2.0-data_2.29.92-0ubuntu1_all.deb) ...

Unpacking replacement libglib2.0-data ...
...
Selecting previously deselected package libglib2.0-0:i386.

Unpacking libglib2.0-0:i386 (from .../libglib2.0-0_2.29.92-0ubuntu1_i386.deb) ...

dpkg: error processing /var/cache/apt/archives/libglib2.0-0_2.29.92-0ubuntu1_i386.deb (--unpack):

 './usr/share/doc/libglib2.0-0/changelog.Debian.gz' is different from the same file on the system

dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

So libglib2.0-data was unpacked last and apparently replaced usr/share/doc/libglib2.0-0/changelog.Debian.gz.

This appears to be a more general problem, on my regular oneiric I get:
$ (cd / ; md5sum -c /var/lib/dpkg/info/libglib2.0-data.md5sums )
usr/share/doc/libglib2.0-data/changelog.Debian.gz: FAILED
$ zcat /usr/share/doc/libglib2.0-data/changelog.Debian.gz|tail -1
# For older changelog entries, run 'apt-get changelog libglib2.0-0'
Note the libglib2.0-0 vs libglib2.0-data.

Revision history for this message
Michael Vogt (mvo) wrote :

Note that I can not reproduce this in a chroot when installing libglib2.0-0 and 2.0-data oneiric nor when upgrading such a chroot from natty.

Changed in glib2.0 (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in update-manager (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Martin Pitt (pitti) wrote :

I downloaded the i386 and amd64 binaries from that version from https://launchpad.net/ubuntu/+source/glib2.0/2.29.92-0ubuntu1/+build/2793297 and https://launchpad.net/ubuntu/+source/glib2.0/2.29.92-0ubuntu1/+build/2793299. They both have an identical changelog.Debian.gz, so I'm not sure where the changelog.Debian.gz with the 'apt-get changelog libglib2.0-data' came from in this particular instance. Also, both these two debs and libglib2.0-data's changelog.Debian.gz are proper files, not symlinks.

In theory, such a situation could arise like this:

 (1) The i386 build builds -0 and -data, both get identical changelog.Debian.gz, and the one from libglib2.0-0 gets symlinked to libglib2.0-data.

 (2) After that, libglib2.0-data's changelog gets truncated, and a pointer added to apt-get changelog.

 (3) The amd64 build doesn't build the arch:all libglib2.0-data, and thus libglib2.0-0:amd64's changelog.Debian.gz won't be a symlink. During truncation it would point to "apt-get changelog libglib2.0-0".

However, that can't be the case: pkgbinarymangler does not do symlinks from arch:any to arch:all for this very reason, rendering (1) impossible. Also, changelog stripping happens _first_, and symlinking afterwards, so the symlinking takes care only to symlink identical files, rendering (2) impossible. Thirdly, the packages built by launchpad all have changelog.Debian.gz as proper files, rendering (3) impossible.

In such a situation, could you please give me the output of

  ls -l /usr/share/doc/*glib2.0*/changelog.Debian.gz
  dpkg -S /usr/share/doc/*glib2.0*/changelog.Debian.gz

to see which changelog.Debian.gz gets claimed by which package, and which are symlinks? Michael, did you happen to get the glib packages from a different place than the archive, i. e. can you please give me the output of

  apt-cache policy libglib2.0-0

?

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

I tried to reproduce this by booting a natty live system, manually enabling multiarch (/etc/dpkg/dpkg.cfg.d/multiarch), and upgrading to oneiric's libc6, libglib2.0-*, and then installing libglib2.0-0:i386. These steps all worked fine, and changelog.Debian.gz for all glib2.0 binaries were intact after each step.

Revision history for this message
Michael Nelson (michael.nelson) wrote :

On Tue, Sep 27, 2011 at 11:23 AM, Martin Pitt <email address hidden> wrote:
> In such a situation, could you please give me the output of
>
>  ls -l /usr/share/doc/*glib2.0*/changelog.Debian.gz
>  dpkg -S /usr/share/doc/*glib2.0*/changelog.Debian.gz

$ ls -l /usr/share/doc/*glib2.0*/changelog.Debian.gz
-rw-r--r-- 1 root root 1672 2011-09-19 08:31
/usr/share/doc/libglib2.0-0/changelog.Debian.gz
lrwxrwxrwx 1 root root 35 2011-09-20 10:02
/usr/share/doc/libglib2.0-bin/changelog.Debian.gz ->
../libglib2.0-0/changelog.Debian.gz
-rw-r--r-- 1 root root 2026 2011-07-12 10:55
/usr/share/doc/libglib2.0-cil/changelog.Debian.gz
-rw-r--r-- 1 root root 1672 2011-09-19 08:31
/usr/share/doc/libglib2.0-data/changelog.Debian.gz
-rw-r--r-- 1 root root 1473 2011-07-12 00:51
/usr/share/doc/libtaglib2.0-cil/changelog.Debian.gz

$ dpkg -S /usr/share/doc/*glib2.0*/changelog.Debian.gz
libglib2.0-0: /usr/share/doc/libglib2.0-0/changelog.Debian.gz
libglib2.0-bin: /usr/share/doc/libglib2.0-bin/changelog.Debian.gz
libglib2.0-cil: /usr/share/doc/libglib2.0-cil/changelog.Debian.gz
libglib2.0-data: /usr/share/doc/libglib2.0-data/changelog.Debian.gz
libtaglib2.0-cil: /usr/share/doc/libtaglib2.0-cil/changelog.Debian.gz

>
> to see which changelog.Debian.gz gets claimed by which package, and
> which are symlinks? Michael, did you happen to get the glib packages
> from a different place than the archive,

Not that I'm aware of (see below), but it is possible that I've sudo'd
a symlink at some point - I don't remember doing so, and don't see why
I would have (we do most our dev work in a virtualenv), but I guess
I'm trying to say don't spend too much time on this if it's likely to
be something stupid I've done on my box (which is entirely possible.

> i. e. can you please give me
> the output of
>
>  apt-cache policy libglib2.0-0

$ apt-cache policy libglib2.0-0
libglib2.0-0:
  Installed: 2.29.92-0ubuntu1
  Candidate: 2.29.92-0ubuntu1
  Version table:
 *** 2.29.92-0ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status

Thanks.

Changed in update-manager (Ubuntu Oneiric):
status: Confirmed → Triaged
Changed in glib2.0 (Ubuntu Oneiric):
status: Confirmed → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. This is certainly the inexplicable part:

lrwxrwxrwx 1 root root 35 2011-09-20 10:02 /usr/share/doc/libglib2.0-bin/changelog.Debian.gz -> ../libglib2.0-0/changelog.Debian.gz

but then again that's just -bin, not the actual package which caused trouble. The other dpkg -S /ls -l output looks as expected to me.

tags: added: rls-mgr-o-tracking
Revision history for this message
Steve Langasek (vorlon) wrote :

Please show 'ls -ld /usr/share/doc/libglib2.0*'. I'm pretty sure one of the directories is wrongly symlinked to the other, which means that unpacking libglib2.0-data after libglib2.0-0 *overwrites* the libglib2.0-0 changelog /on the filesystem/.

This is a classic botched symlink->directory migration in a package.

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

Steve Langasek [2011-09-30 1:39 -0000]:
> This is a classic botched symlink->directory migration in a package.

For sure, but neither the natty nor the recent oneiric versions
actually shipped any symlinks, and I'm fairly sure we didn't introduce
them at any time during oneiric.

Revision history for this message
Steve Langasek (vorlon) wrote :

> and I'm fairly sure we didn't introduce
> them at any time during oneiric.

No, we introduced *multiarch* in oneiric, so now the system cares a lot more about file integrity.

So glib2.0 needs to clean up its historic mis-migration.

Changed in update-manager (Ubuntu Oneiric):
status: Triaged → Invalid
Revision history for this message
Martin Pitt (pitti) wrote :

Steve Langasek [2011-09-30 5:37 -0000]:
> So glib2.0 needs to clean up its historic mis-migration.

Hmm, the preinst files do

if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt-nl 2.27.5-2; then
    rm -f /usr/share/doc/libglib2.0-dev
fi

I. e. correctly use lt-nl (thus don't fire on fresh installs), and
also shouldn't affect natty upgrades, and don't create any symlinks.
Given that this was reproduced using a natty install and oneiric
upgrade, I don't see how this would introduce this bug. But maybe I'm
missing something here?

debian/* doesn't use "ln" anywhere, and there is just one *.links for
gtk-doc.

The natty package is identical in all those regards.

Right now I'm really stumped how this symlink ever actually got
created. It's like black magic :(

Thanks for any hint,

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Michael Nelson (michael.nelson) wrote :

On Fri, Sep 30, 2011 at 3:39 AM, Steve Langasek
<email address hidden> wrote:
> Please show 'ls -ld /usr/share/doc/libglib2.0*'.  I'm pretty sure one of
> the directories is wrongly symlinked to the other, which means that
> unpacking libglib2.0-data after libglib2.0-0 *overwrites* the
> libglib2.0-0 changelog /on the filesystem/.

$ ls -ld /usr/share/doc/libglib2.0*
drwxr-xr-x 2 root root 4096 2011-09-21 15:18 /usr/share/doc/libglib2.0-0
drwxr-xr-x 2 root root 4096 2011-09-20 10:02 /usr/share/doc/libglib2.0-bin
drwxr-xr-x 2 root root 4096 2011-09-20 10:18 /usr/share/doc/libglib2.0-cil
lrwxrwxrwx 1 root root 12 2010-02-28 08:38
/usr/share/doc/libglib2.0-data -> libglib2.0-0

Revision history for this message
Michael Nelson (michael.nelson) wrote :

On Tue, Sep 27, 2011 at 12:51 PM, Michael Nelson
<email address hidden> wrote:
>
> Not that I'm aware of (see below), but it is possible that I've sudo'd
> a symlink at some point - I don't remember doing so, and don't see why
> I would have (we do most our dev work in a virtualenv), but I guess
> I'm trying to say don't spend too much time on this if it's likely to
> be something stupid I've done on my box (which is entirely possible.

Hi Martin, if no one else is seeing this, and you can't reproduce it,
it is entirely possible that I'd added a symlink at some point to test
something and failed to remove it. If that looks likely from the
current state, then I'm happy to remove whichever symlink is incorrect
and update my system again :) Sorry for possibly having wasted your
time :/

Revision history for this message
Michael Vogt (mvo) wrote :

Hey Michael.

I see this as well and we got some dupes, I think this is something real. Feel free to clean it up manually of course to get your box working again, but I think this bug is very real.

Michael Vogt (mvo)
Changed in glib2.0 (Ubuntu Oneiric):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glib2.0 - 2.30.0-0ubuntu3

---------------
glib2.0 (2.30.0-0ubuntu3) oneiric; urgency=low

  * debian/libglib2.0-data.preinst:
    - fix upgrade issue caused by a leftover symlink (LP: #854622)
 -- Michael Vogt <email address hidden> Fri, 30 Sep 2011 21:21:42 +0200

Changed in glib2.0 (Ubuntu Oneiric):
status: In Progress → Fix Released
Revision history for this message
El Microvio (el-microvio) wrote :

Problem with the "user accounts" and libglib2.0 libraries in version 0.3-ubuntu4 - after update oneiric. ADM Architecture. The libraries are not left libglib2.0 reinstall. I think the bug should be reopened because the problem is back with version 0.3 ubuntu4.

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.