[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#747261: apt: Please add support for cross-architecture conflicts



On Mon, May 12, 2014 at 09:03:50PM +0200, David Kalnischkies wrote:
> Version: 0.9.7.2
> Control: notfound -1 1.0.3
> 
> Hi,

Hi,

> On Tue, May 06, 2014 at 11:22:00PM +0200, Aurelien Jarno wrote:
> > Could you please therefore add support for cross-architecture conflicts?
> 
> This is already supported – even in apt/wheezy – so I wonder how you
> come to the conclusion that it is ignored. It is commit cef094c2ec8
> if you want to have a look and/or don't trust me, but until further
> notice I will close the bug as resolved because of this.
> 
> If you can demonstrate that it doesn't work I am all ears of course.

I did some tests, but after your answer I was not fully sure of them.
Now it seems we have everything in the archive for a demo (done on an
amd64 system).

| # apt-get --version
| apt 1.0.3 for amd64 compiled on May  5 2014 16:31:07
| Supported modules:
| *Ver: Standard .deb
| *Pkg:  Debian dpkg interface (Priority 30)
|  Pkg:  Debian APT solver interface (Priority -1000)
|  S.L: 'deb' Standard Debian binary tree
|  S.L: 'deb-src' Standard Debian source tree
|  Idx: Debian Source Index
|  Idx: Debian Package Index
|  Idx: Debian Translation Index
|  Idx: Debian dpkg status file
|  Idx: EDSP scenario file
| # dpkg --add-architecture powerpc
| # dpkg --add-architecture mips
| # apt-get update

[ snip ]
 
| # apt-cache show libc6:mips
| Package: libc6
| Source: eglibc
| Version: 2.18-6
| Installed-Size: 9430
| Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
| Architecture: mips
| Provides: glibc-2.18-1
| Depends: libgcc1
| Suggests: glibc-doc, debconf | debconf-2.0, locales
| Conflicts: libc6:hppa, libc6:m68k, libc6:mipsel, libc6:powerpc, libc6:s390, prelink (<= 0.0.20090311-1), tzdata (<< 2007k-1), tzdata-etch
| Breaks: hurd (<< 1:0.5.git20140203-1), locales (<< 2.18), locales-all (<< 2.18), nscd (<< 2.18)

[ snip ]

| # apt-cache show libc6:powerpc
| Package: libc6
| Source: eglibc
| Version: 2.18-6
| Installed-Size: 9536
| Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
| Architecture: powerpc
| Replaces: libc6-powerpc
| Provides: glibc-2.18-1
| Depends: libgcc1
| Suggests: glibc-doc, debconf | debconf-2.0, locales
| Conflicts: libc6:hppa, libc6:m68k, libc6:mips, libc6:mipsel, libc6:s390, prelink (<= 0.0.20090311-1), tzdata (<< 2007k-1), tzdata-etch
| Breaks: hurd (<< 1:0.5.git20140203-1), locales (<< 2.18), locales-all (<< 2.18), nscd (<< 2.18)

[ snip ]

| # apt-get install libc6:mips libc6:powerpc
| Reading package lists... Done
| Building dependency tree       
| Reading state information... Done
| The following extra packages will be installed:
|   libgcc1:mips libgcc1:powerpc
| Suggested packages:
|   glibc-doc:powerpc glibc-doc:mips
| The following NEW packages will be installed:
|   libc6:powerpc libc6:mips libgcc1:mips libgcc1:powerpc
| 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
| Need to get 0 B/9012 kB of archives.
| After this operation, 19.8 MB of additional disk space will be used.
| Do you want to continue? [Y/n] 
| Preconfiguring packages ...
| Selecting previously unselected package libc6:mips.
| (Reading database ... 162272 files and directories currently installed.)
| Preparing to unpack .../archives/libc6_2.18-6_mips.deb ...
| Unpacking libc6:mips (2.18-6) ...
| Selecting previously unselected package libgcc1:mips.
| Preparing to unpack .../libgcc1_1%3a4.9.0-3_mips.deb ...
| Unpacking libgcc1:mips (1:4.9.0-3) ...
| Selecting previously unselected package libc6:powerpc.
| Preparing to unpack .../libc6_2.18-6_powerpc.deb ...
| Unpacking libc6:powerpc (2.18-6) ...
| dpkg: error processing archive /var/cache/apt/archives/libc6_2.18-6_powerpc.deb (--unpack):
|  trying to overwrite shared '/lib/ld.so.1', which is different from other instances of package libc6:powerpc
| Selecting previously unselected package libgcc1:powerpc.
| Preparing to unpack .../libgcc1_1%3a4.9.0-3_powerpc.deb ...
| Unpacking libgcc1:powerpc (1:4.9.0-3) ...
| Errors were encountered while processing:
|  /var/cache/apt/archives/libc6_2.18-6_powerpc.deb
| E: Sub-process /usr/bin/dpkg returned an error code (1)
| #

Of course it also shows that dpkg also do not support it, but having apt
catching that case would already catches most of the problems.


> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! BEWARE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> 
> Just that APT is supporting it doesn't make it magically supported by
> everyone or even provides even the slightest hint that anyone will
> try to support it, too (MultiArch itself being the best example).
> 
> So I have no idea at the moment what the status quo is in all the other
> software dealing with dependencies! Attached is a small apt testcase with
> which I have checked that dpkg supports it, but I have only run it on sid.
> (if you want to run it yourself, build apt and run the script in
>  /path/to/apt-source-tree/test/integration/ )
> Not even the slightest idea what lintian/dak/buildds/… will make of it.
> 
> 
> Note also that to the best of my knowledge this is documented/specified
> nowhere. The MultiArchSpec [1] mentions it only as future work area.
> APT supports it mainly because it was ridiculously easy to do it as the
> heavy lifting is actually needed to support the non-specific conflicts.
> (I am reasonably sure I had support for it in 2010 already, but broke it
>  while refactoring and just reintroduced it in 2012 with a test)

Indeed. On the other hand while I understand cross-(Build-)Depends are
not something easy to implement for all software, I don't think how we
can reasonably support multiarch without cross-Conflicts. We tried with
Wheezy, and users have shown it doesn't work.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net


Reply to: