dpkg regression --force-depends

Bug #767634 reported by Damien Laporte
56
This bug affects 15 people
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Fix Released
Medium
Steve Langasek
Natty
Fix Released
Medium
Steve Langasek

Bug Description

SRU justification:
Regression in dpkg introduced by multiarch. It is not impossible to force the installation of foreign-arch packages in natty if their dependencies are not installed.

TEST CASE:
1. Download http://people.canonical.com/~vorlon/force-arch-does-not-work_1.0_amd64.deb or http://people.canonical.com/~vorlon/force-arch-does-not-work_1.0_i386.deb (whichever one does *not* match the arch being tested on)
2. Try to install the package with 'dpkg -i'. Verify that it fails.
3. Try to install the package with 'dpkg --force-architecture -i'. Verify that it fails.
4. Try to install the package with 'dpkg --force-architecture --force-depends -i'. Verify that it fails.
5. Upgrade to dpkg 1.16.0~ubuntu7.1.
6. Try to install the package with 'dpkg -i'. Verify that it fails.
7. Try to install the package with 'dpkg --force-architecture -i'. Verify that it fails.
8. Try to install the package with 'dpkg --force-architecture --force-depends -i'. Verify that it succeeds.
9. remove the package with 'dpkg --purge force-arch-does-not-work:i386' (or :amd64).

Binary package hint: dpkg

I want to install a printer driver which is made with i386 architecture on a amd64 system.

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

This action worked perfectly with ubuntu 10.10 64 bits.

Revision history for this message
Raphaël Hertzog (hertzog) wrote :

I can confirm the problem. The patch attached should fix this.

Thank you for your report.

Changed in dpkg (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Raphaël Hertzog (hertzog) wrote :

Of course you still need --force-depends to get it to work.

Steve Langasek (vorlon)
Changed in dpkg (Ubuntu):
assignee: nobody → Steve Langasek (vorlon)
tags: added: patch
Revision history for this message
Damien Laporte (damien-laporte189) wrote :

Raphaël Hertzog wrote on 2011-04-22: #2
Of course you still need --force-depends to get it to work.

I didn't use this option with 10.10. I only used --force-architecture.
 So you suggest to write "foreign-architecture i386" in /etc/dpkg/dpkg.cfg and to use sudo dpkg -i --force-depends rebuilt_common.deb ?

Revision history for this message
Raphaël Hertzog (hertzog) wrote : Re: [Bug 767634] Re: dpkg regression --force-depends

On Sun, 24 Apr 2011, Damien Laporte wrote:
> Raphaël Hertzog wrote on 2011-04-22: #2
> Of course you still need --force-depends to get it to work.
>
> I didn't use this option with 10.10. I only used --force-architecture.
> So you suggest to write "foreign-architecture i386" in /etc/dpkg/dpkg.cfg and to use sudo dpkg -i --force-depends rebuilt_common.deb ?

--force-* option should never be used in general, so the real fix is to
use multiarch, so yes put foreign-architecture i386 and either fix the dependent
package to set Multi-Arch: foreign if they are allowed fo fullfil foreign
dependencies or install the package of the corresponding architecture
to properly satisfy dependencies.

Unfortunately it's too late for natty to make any such changes.

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)

Revision history for this message
Damien Laporte (damien-laporte189) wrote :

But will your patch be incorporated in natty ?

Revision history for this message
Raphaël Hertzog (hertzog) wrote :

On Mon, 25 Apr 2011, Damien Laporte wrote:
> But will your patch be incorporated in natty ?

I don't know, I don't have upload rights so it's not my
choice at all. Steve ?

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)

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

On Mon, Apr 25, 2011 at 07:57:57AM -0000, Raphaël Hertzog wrote:
> On Mon, 25 Apr 2011, Damien Laporte wrote:
> > But will your patch be incorporated in natty ?

> I don't know, I don't have upload rights so it's not my
> choice at all. Steve ?

It will have to be done as an SRU rather than in natty proper, but I'll
prepare an upload, yes.

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

Steve Langasek (vorlon)
Changed in dpkg (Ubuntu Natty):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Steve Langasek (vorlon)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
dpkg (1.16.0~ubuntu8) oneiric; urgency=low

  * src/packages.c: fix use of --force-depends so that it works again for
    foreign arch packages. Thanks to Raphaël Hertzog for the fix.
    LP: #767634.
 -- Steve Langasek <email address hidden> Fri, 29 Apr 2011 19:07:24 -0700

Changed in dpkg (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Jean (dalu36) wrote :

Hi, I'm facing the same too (and I am certainly not the only one)
You say the bug is fixed and released. But, my system being up to date, my dpkg version is still 1.16.0~ubuntu7. Is there anything I should do to integrate the fix as, since I upgrade to 11.04, I cannot use my printer.
Or should I downgrade to 10.10 and wait until the release of oneiric ?

Revision history for this message
Raphaël Hertzog (hertzog) wrote :

Jean, you can pick the fixed package in oneiric (11.10) or simply wait until Steve prepares an update for Natty (11.04).

Revision history for this message
panga (pangabada) wrote :

Hi Raphaël,

I tried to pick the fixed package in oneiric like you adviced Jean because I have the same issue on my 11.04, but after getting the 64 bits deb of fixed dpkg, it refuses to launch because of broke dependances. Any advice ?

Revision history for this message
Justin Nelson (plattypus1) wrote :

It seems that most affected by this bug are trying to install the Canon Pixma-series drivers. I've got mine working, and here's how I did it:

1. Add the line
deb http://us.archive.ubuntu.com/ubuntu oneiric main
to your /etc/apt/sources.list

2. Run
sudo apt-get update
DO NOT APT-GET UPGRADE. I don't know what it'll do, but you may end up reverting a good chunk of your system's packages manually.

3. Run
Code:
sudo apt-get install dpkg
4. Go into Synaptic (System-Administration-Synaptic Package Manager), search for dpkg. Select dpkg.

5. Under "Package," choose "Lock Version."

6. Remove or comment out the oneiric line from your /etc/apt/sources.list

7. Run
sudo apt-get update
again.

8. In the install.sh script from the Canon drivers, change
dpkg -iG
to
dpkg -iG --force-all

Unpleasant side-effect: dpkg will detect those packages as broken, so update-manager tosses up errors once in a while. I'm willing to live with that if I can print.

Revision history for this message
Justin Nelson (plattypus1) wrote :

Actually, don't do what I just said above. While it does work, it also really, really broke APT. Don't do it!

Revision history for this message
Chris Sadler (chris-g-sadler) wrote :

Hey Guys,
I've got a solution that's worked for me.. its a bit of hack but it's worked on my system and I don't think it will cause any instability for other packages, please let me know if any concerns. It's a modification of a method I saw on a fedora forum at some point...
The process I went through is as follows:

1) download Canon drivers from usual web site (.deb files)
2) extract tar to get the individual .deb packages (common and printer specific)
3) Rework the deb file so it thinks its a amd64 package
    a) go into the extracted directory, in my case /var/tmp/cnijfilter-mx860series-3.10-1-i386-deb/packages
    b) sudo dpkg-deb --extract cnijfilter-common_3.10-1_i386.deb ./tryit-common
        # this extracts the file system from the deb to the tryit-common folder
    c) change into the tryit-common folder
    d) sudo dpkg-deb --control ../cnijfilter-common_3.10-1_i386.deb
       # this extracts the control structure for the .deb file
    e ) sudo gedit DEBIAN/control
      # change the line that says Architecture : i386 to say Architecture : amd64, then save and exit
    f) cd..
        # change back into the packages directory
   g) sudo dpkg-deb --build tryit-common/
This last command should create a .deb file called try-common.deb - you can use any name for this...
the deb should then install without problems using the standard
sudo dpkg -i tryit-common.deb

Repeat the above process with the printer specific deb file... in my case the mx860 driver...
They both installed on my up to date natty intel 64 Acer aspire 5742g and the printer worked perfectely...
I've attached the drivers I created... i hope they're usefull...
Looking forward to the release of the fix in Natty though, so i don't have to hack around in terminal anymore...

Cheers,
Chris

Revision history for this message
Chris Sadler (chris-g-sadler) wrote :

and the mx860 specific one...

Revision history for this message
Todd Allen (corrytonapple) wrote :

Has the fix been released yet Steve? I assume though if it was, you would have posted here about it....

Steve Langasek (vorlon)
description: updated
Revision history for this message
Chris Halse Rogers (raof) wrote :

Approve, please accept into natty-proposed.

Changed in dpkg (Ubuntu Natty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Accepted dpkg into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

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

Could some one of the users who've subscribed to this bug please test the dpkg package in natty-proposed, and confirm whether it fixes your issue?

Revision history for this message
aplccorp (ohad-barel-launchpad) wrote :

Hello.

I had exactly the same problem that is described in this report.
After installing the dpkg package having the "proposed" deposit activated, everything worked perfectly, and I was able to install my Canon MP550 on my Ubuntu 11.04 AMD64

Many thanks!
APLC

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

thanks very much for confirming!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * src/packages.c: fix use of --force-depends so that it works again for
    foreign arch packages. Thanks to Raphaël Hertzog for the fix.
    LP: #767634.
  * regenerate lib/dpkg/trigdeferred.c from lib/dpkg/trigdeferred.l in
    the source, to ensure we don't end up with breakage from an out-of-date
    intermediate file as happened in oneiric.

  [ Guillem Jover ]
  * d84b36a81088721b340e52664aa2c3379fea2a9a: be less strict in the face of
    unknown Priority: fields in /var/lib/dpkg/status, so dpkg doesn't fail
    to run on systems whose contents were previously permitted.
    LP: #773022.
 -- Steve Langasek <email address hidden> Sat, 25 Jun 2011 13:49:46 -0500

Changed in dpkg (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Avery (docaltmed) wrote :

I'm having this problem in 11.10. Shouldn't the version of dpkg on my system have this bug fixed?

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: [Bug 767634] Re: dpkg regression --force-depends

Excerpts from Avery's message of Tue Nov 22 23:59:31 UTC 2011:
> I'm having this problem in 11.10. Shouldn't the version of dpkg on my
> system have this bug fixed?
>

Yes it should be working in 11.10. Can you file a new bug, mentioning
this bug # in it, against dpkg? Also come back to this bug and mention
the new bug #, so we can investigate.

Please report it with

apport-bug dpkg

Thanks!

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.