#770345 apt: package Provides are not treated as providing the package for all architectures

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Johannes Schauer
Date:
2015-02-04 09:51:45 UTC
Severity:
normal
#770345#5
Date:
2014-11-20 16:10:28 UTC
From:
To:
Hi,

I was just able to reproduce the problem spotted in #770301. Apt allows
to install libbabl-dev for two different architectures and only errors
out because dpkg (correctly) detects the conflict introduced by the
Provides field.

Some relevant logs:

sudo apt-get install libbabl-dev:amd64 libbabl-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libbabl-0.1-0:i386
The following NEW packages will be installed:
  libbabl-0.1-0:i386 libbabl-dev libbabl-dev:i386
0 upgraded, 3 newly installed, 0 to remove and 1719 not upgraded.
Need to get 168 kB of archives.
After this operation, 430 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ftp.debian.org/debian/ jessie/main libbabl-0.1-0 i386 0.1.10-2 [99.0 kB]
Get:2 http://ftp.debian.org/debian/ jessie/main libbabl-dev amd64 0.1.10-2 [34.3 kB]
Get:3 http://ftp.debian.org/debian/ jessie/main libbabl-dev i386 0.1.10-2 [34.2 kB]
[...]
Selecting previously unselected package libbabl-0.1-0:i386.
(Reading database ... 272691 files and directories currently installed.)
Preparing to unpack .../libbabl-0.1-0_0.1.10-2_i386.deb ...
Unpacking libbabl-0.1-0:i386 (0.1.10-2) ...
Selecting previously unselected package libbabl-dev:amd64.
Preparing to unpack .../libbabl-dev_0.1.10-2_amd64.deb ...
Unpacking libbabl-dev:amd64 (0.1.10-2) ...
Selecting previously unselected package libbabl-dev:i386.
Preparing to unpack .../libbabl-dev_0.1.10-2_i386.deb ...
Unpacking libbabl-dev:i386 (0.1.10-2) ...
[...]
E: Sub-process /usr/bin/dpkg returned an error code (1)
[100] josch@hoothoot> sudo dpkg --configure --pending
dpkg: dependency problems prevent configuration of libbabl-dev:amd64:
 libbabl-dev:i386 (0.1.10-2) breaks libbabl-0.0-0-dev and is unpacked but not configured.
  libbabl-dev:amd64 (0.1.10-2) provides libbabl-0.0-0-dev.

dpkg: error processing package libbabl-dev:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libbabl-dev:i386:
 libbabl-dev:amd64 (0.1.10-2) breaks libbabl-0.0-0-dev and is unpacked but not configured.
  libbabl-dev:i386 (0.1.10-2) provides libbabl-0.0-0-dev.

dpkg: error processing package libbabl-dev:i386 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libbabl-dev:amd64
 libbabl-dev:i386
[1] josch@hoothoot>

Please let apt follow dpkg behaviour.

cheers, josch

#770345#10
Date:
2014-11-20 20:52:07 UTC
From:
To:
will of Multi-Arch inventors if they have a different take on this…
(what follows is my take, which felt so "intuitive/natural" that
I realize only now that the spec isn't specifying any of this…)


libbabl-dev:i386 is not providing the same thing as libbabl-dev:amd64,
think: architecture specific header for example, so what you suggest in
the title would be breaking existing dependencies.

If you want this behaviour (which is probably more common than this -dev
case here) like for e.g. mail-transport-agent, just flag the package as
M-A: foreign.

Also as this -dev package is marked as M-A: same it should be possible
to co-install it with its other architecture siblings.
After all, what is the point of it being flagged M-A: same otherwise?

APT (correctly) detects the conflict introduced by the Provides
field as a self-conflict and hence ignores it here.

You can notice this with an (imaginative) libbabl-alt-dev:i386 package
which isn't installable at the same time as libbabl-dev:amd64 as this is
a "real" conflict (even if it is crossing architecture boundaries).


Best regards

David Kalnischkies