apt chooses wrong architecture if sources.list contains arch-qualified entries

Bug #1032250 reported by Wookey on 2012-08-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)

Bug Description

If both armel and armhf are given as arch qualifiers in sources.list, then apt tries to install the wrong architecture package:

I ask directly for an amrhf package and apt tries (but fails) to install an armel one:

$ sudo apt-get install zlib1g-dev:armhf
The following packages have unmet dependencies:
 zlib1g-dev:armel : Depends: zlib1g:armel (= 1:1.2.7.dfsg-13) but it is not going to be installed
                    Depends: libc6-dev:armel but it is not going to be installed or

Sources.list looks like this:
deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu quantal main universe
deb [arch=armhf,armel] http://ports.ubuntu.com/ubuntu-ports quantal main universe
deb-src http://archive.ubuntu.com/ubuntu quantal main universe

There are no :armel or :armhf packages installed.

The ordering of the arch qualifiers in sources.list does not matter: this line produces the same output
deb [arch=armel,armhf] http://ports.ubuntu.com/ubuntu-ports quantal main universe

change the line to
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports quantal main universe
and it works as expected.

The apt sources info seems to be overriding the dpkg foreign-architecture info.

David Kalnischkies (donkult) wrote :

Smells like: http://anonscm.debian.org/loggerhead/apt/debian-sid/revision/2237
Am I right? This is in apt >= in debian (wheezy) if you wanna test.

You haven't mentioned a version number, but i guess you are on the "newest" in ubuntu which is
The diff probably does not apply to apt <= 0.9.7 through as the code was moved. I am not sure, but i guess it doesn't effect earlier versions (at least on in the commandline parsing, the architecture wildcards in build-depends are a "problem" non-the-less).

Wookey (wookey) wrote :

This bug does not seem to be present in apt in debian unstable. There it works as expected.
Similarly for apt in debian testing. So this wqould appear to be something in the ubuntu patches.

Wookey (wookey) wrote :

sorry ubuntu version tested was

Wookey (wookey) wrote :

This issue is not present in precise (apt 0.8.16~exp12ubuntu10)

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

Other bug subscribers