dpkg: confused about installation status of Multi-Arch: foreign packages configured in the current run?

Bug #756381 reported by Steve Langasek on 2011-04-10
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: dpkg

Received this error on an upgrade in natty:

Setting up libx11-data (2:1.4.2-1ubuntu3) ...
Setting up libx11-6 (2:1.4.2-1ubuntu3) ...
Setting up libx11-dev (2:1.4.2-1ubuntu3) ...
dpkg: dependency problems prevent configuration of libx11-6:i386:
 libx11-6:i386 depends on libx11-data.
dpkg: error processing libx11-6:i386 (--configure):
 dependency problems - leaving unconfigured
Setting up libx11-xcb1 (2:1.4.2-1ubuntu3) ...
dpkg: dependency problems prevent configuration of libx11-xcb1:i386:
 libx11-xcb1:i386 depends on libx11-6; however:
  Package libx11-6:i386 is not configured yet.
dpkg: error processing libx11-xcb1:i386 (--configure):
 dependency problems - leaving unconfigured

While I've seen other errors which were attributable to apt trying to configure packages out of order, this seems to be a clear case of dpkg not knowing that libx11-data is installed (or not recognizing that it's multi-arch: foreign and satisfies the dependency of libx11-6:i386).

I don't have detailed logs of how dpkg was invoked, but it seems like it should be easy to reproduce.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: dpkg 1.16.0~ubuntu6
ProcVersionSignature: Ubuntu 2.6.38-8.41-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Sun Apr 10 01:53:19 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: dpkg
UpgradeStatus: Upgraded to natty on 2011-03-24 (16 days ago)

Related branches

Steve Langasek (vorlon) wrote :
tags: added: multiarch
Raphaël Hertzog (hertzog) wrote :

Thanks for the report. Indeed it was easy to reproduce, a bit less easy to fix even though it's a one line patch.

The problem was that when the configuration is not immediately possible, clientdata->istobe is reset to itb_installnew and in some places I use that information to decide whether I want to look at "available" or "installed" in terms of package information. But that assumption only holds true during early installation (i.e. unpack) and not during configuration.

So in the end, I might do some further refactoring to get rid of that not-so-good assumption.

tags: added: patch
Steve Langasek (vorlon) on 2011-04-14
Changed in dpkg (Ubuntu):
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dpkg - 1.16.0~ubuntu7

---------------
dpkg (1.16.0~ubuntu7) natty; urgency=low

  * src/packages.c: fix the check for whether our dependencies are
    installed, so that it works correctly for multi-arch: foreign packages
    configured during the current dpkg run. Thanks to Raphaël Hertzog
    <email address hidden> for the fix. LP: #756381.

  [ Raphaël Hertzog ]
  * fddba30d74856e2d5c3f287343569fc259729bc0: Fix regression in dpkg 1.16.0
    affecting dpkg R. Closes: #620636.
 -- Steve Langasek <email address hidden> Thu, 14 Apr 2011 11:28:51 -0700

Changed in dpkg (Ubuntu):
status: Fix Committed → Fix Released

It doesn't work for me yet. With sudo dpkg -i --force-architecture rebuilt_common.deb, I obtain the following result:

dpkg : avertissement : problème contourné par utilisation de --force :
 l'architecture du paquet (i386) ne correspond pas à celle du système (amd64)
(Lecture de la base de données... 94096 fichiers et répertoires déjà installés.)
Préparation du remplacement de cnijfilter-common:i386 2.90-1 (en utilisant rebuilt_common.deb) ...
Dépaquetage de la mise à jour de cnijfilter-common:i386 ...
dpkg : des problèmes de dépendances empêchent la configuration de cnijfilter-common:i386 :
 cnijfilter-common:i386 dépend de libc6 (>= 2.3.4-1).
 cnijfilter-common:i386 dépend de libcups2 (>= 1.2.1).
 cnijfilter-common:i386 dépend de libpopt0 (>= 1.7).
dpkg : erreur de traitement de cnijfilter-common:i386 (--install) :
 problèmes de dépendances - laissé non configuré
Des erreurs ont été rencontrées pendant l'exécution :
 cnijfilter-common:i386

Kubuntu 11.04, installed with April 15 daily build

On Fri, Apr 15, 2011 at 06:46:05PM -0000, Damien Laporte wrote:
> It doesn't work for me yet. With sudo dpkg -i --force-architecture
> rebuilt_common.deb

That's not correct usage. For multiarch, you should be setting
'foreign-architecture i386' in dpkg.cfg; no --force-architecture arguments
should be used.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

I applied your method, but the dependency problem is the same:

sudo dpkg -i rebuilt_common.deb

(Lecture de la base de données... 94296 fichiers et répertoires déjà installés.)
Préparation du remplacement de cnijfilter-common:i386 2.90-1 (en utilisant rebuilt_common.deb) ...
Dépaquetage de la mise à jour de cnijfilter-common:i386 ...
dpkg : des problèmes de dépendances empêchent la configuration de cnijfilter-common:i386 :
 cnijfilter-common:i386 dépend de libc6 (>= 2.3.4-1).
 cnijfilter-common:i386 dépend de libcups2 (>= 1.2.1).
 cnijfilter-common:i386 dépend de libpopt0 (>= 1.7).
dpkg : erreur de traitement de cnijfilter-common:i386 (--install) :
 problèmes de dépendances - laissé non configuré
Des erreurs ont été rencontrées pendant l'exécution :
 cnijfilter-common:i386

So is there another origin for my bug ?

Steve Langasek (vorlon) wrote :

On Sat, Apr 16, 2011 at 08:46:56AM -0000, Damien Laporte wrote:
> I applied your method, but the dependency problem is the same:

> sudo dpkg -i rebuilt_common.deb

> (Lecture de la base de données... 94296 fichiers et répertoires déjà installés.)
> Préparation du remplacement de cnijfilter-common:i386 2.90-1 (en utilisant rebuilt_common.deb) ...
> Dépaquetage de la mise à jour de cnijfilter-common:i386 ...
> dpkg : des problèmes de dépendances empêchent la configuration de cnijfilter-common:i386 :
> cnijfilter-common:i386 dépend de libc6 (>= 2.3.4-1).
> cnijfilter-common:i386 dépend de libcups2 (>= 1.2.1).
> cnijfilter-common:i386 dépend de libpopt0 (>= 1.7).
> dpkg : erreur de traitement de cnijfilter-common:i386 (--install) :
> problèmes de dépendances - laissé non configuré
> Des erreurs ont été rencontrées pendant l'exécution :
> cnijfilter-common:i386

> So is there another origin for my bug ?

You don't seem to have any of the i386 library packages installed on your
system. These are dependencies of cnijfilter-common:i386, so if you're
going to use dpkg (which is not a high-level package management front-end)
to install this package, you must first manually install its dependencies.
E.g.:

  sudo apt-get install libc6:i386 libcups2:i386 libpopt0:i386

However, the libpopt0 package has not yet been converted for multiarch use
in Ubuntu, so this will still fail (it will try to remove a significant
portion of the Ubuntu desktop!). That's not a dpkg bug though, it's simply
a matter of us still being in the process of bootstrapping multiarch support
in the library packages.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world

What surprises me is that I had not this problem on maverick_amd64 whereas I had the same installed packages...

Steve Langasek (vorlon) wrote :

Damien,

Please file a new bug report against dpkg for the issue you're seeing. There appears to be a regression in the handling of --force-depends, making it impossible to force installation of a foreign-arch package without satisfying the dependencies. That's certainly not the preferred way to install packages, but the --force options shouldn't be made to regress.

Ok Steve, it's done : https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/767634
Thanks for your help ;-)

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

Other bug subscribers

Patches