apt-get dselect-upgrade prefers multiarch over native

Bug #879324 reported by Christian Hilberg
102
This bug affects 20 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

'apt-get dselect-upgrade' prefers multiarch over native (i386 over amd64 in my case) for *some* packages for "precise".

How to reproduce:

I've set up an amd64 precise chroot on an amd64 host from a mirror lagging behind with it's sync some time, then added some repos to the sources.list, updated, set some package to be installed via 'dpkg --set-selections' and start an installation process via 'apt-get dselect-upgrade'. Note that this behaviour does not show when using 'apt-get install' straight.

Details for reproducing:

-------------------------------------------

me@host:~$ sudo /usr/sbin/debootstrap --arch=amd64 --variant=buildd precise precise_amd64_chroot http://mirror.cpsc.ucalgary.ca/mirror/ubuntu.com/packages/

me@host:~$ dpkg -l '*:i386'
No packages found matching *:i386.

me@host:~$ sudo chroot precise_amd64_chroot

# cat /etc/apt/sources.list
deb http://mirror.cpsc.ucalgary.ca/mirror/ubuntu.com/packages/ precise main

[now editing the sources.list]

# cat /etc/apt/sources.list
deb http://mirror.cpsc.ucalgary.ca/mirror/ubuntu.com/packages/ precise main restricted universe multiverse

# apt-get update
[...]

# echo "joe install" | dpkg --set-selections

# apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

# apt-get dselect-upgrade
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  gcc-4.6-base:i386 joe:i386 libc6:i386 libgcc1:i386 libtinfo5:i386
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 4402 kB of archives.
After this operation, 12.1 MB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

# apt-cache policy joe
joe:
  Installed: (none)
  Candidate: 3.7-2.3
  Version table:
     3.7-2.3 0
        500 http://mirror.cpsc.ucalgary.ca/mirror/ubuntu.com/packages/ precise/universe amd64 Packages

[now changing 'foreign-architecture i386' to '#foreign-architecture i386' in /etc/dpkg/dpkg.cfg.d/multiarch]

# apt-get dselect-upgrade
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  joe
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 481 kB of archives.
After this operation, 1340 kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

# apt-cache policy joe
joe:
  Installed: (none)
  Candidate: 3.7-2.3
  Version table:
     3.7-2.3 0
        500 http://mirror.cpsc.ucalgary.ca/mirror/ubuntu.com/packages/ precise/universe amd64 Packages

-------------------------------------------

Note how 'apt-cache policy' does show 'amd64' as installation candidate in both cases. When actually confirming the installation via 'apt-get dselect-upgrade', it *does* install the i386 packages, as it threatened it would. Removing i386 from the multiarch entries solves the issue for me, in that case only the amd64 package is installed.

Kind regards,
Christian

Revision history for this message
Christian Hilberg (hilberg) wrote :

One more bit of information:

mounting /proc and /sys from the host into the chroot (as one should do for using the chroot) actually does not make a difference for me.

Revision history for this message
Christian Hilberg (hilberg) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks. This looks like enough information to start working on it, although I suspect that somebody will need to set up a test archive with deliberately skewed packages across architectures in order to make this truly reproducible.

Changed in apt (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Christian Hilberg (hilberg) wrote :

Yep, depends on the archive you're using. I've used the above one since it was lagging behind for long enough to show the effect. Moreover, I've just picked the 'joe' package as an example (since it one affected by the skew).

Revision history for this message
Tuomas Heino (iheino+ub) wrote :

Attempted a reinstallation/cloning of precise as follows:
$ dpkg --get-selections | fgrep -c :i386
237
$ dpkg --get-selections > selections.txt
$ sftp clonehost # ...

$ sudo dpkg --set-selections < selections.txt
$ sudo apt-get -y update
$ sudo apt-get dselect-upgrade

Ended up with bunch of errors and:
$ dpkg -l | fgrep -c :i386
507

Revision history for this message
Chip Salzenberg (chip-pobox) wrote :

I repro'd by choosing "nullmailer" with dselect, then using dselect "I" command.

Revision history for this message
Pirouette Cacahuète (lissyx) wrote :

Hello,

While reinstalling my system on a brand new SSD, I used --set-selections to quickly reinstall all as previously. However, I ran into this issue. I've been able to circumvent by disabling multiarch before calling dpkg --set-selections, then run apt-get dselect-upgrade. Once everything has been reinstalled correctly, I've reenabled multiarch.

For multiarch disabling, just comment the "foreign-architecture i386" line in /etc/dpkg/dpkg.cfg.d/multiarch.

Revision history for this message
up-whatever (up-whatever) wrote :

Same problem here, I wanted to reinstall ubuntu 12.04.1 amd64 on my new SSD and "set-selections" followed by "dselect-upgrade" destroyed the brand new installation. I'll try disabling multiarch now, thanks for that info.

Revision history for this message
Wichert Akkerman (wichert) wrote :
Download full text (5.2 KiB)

I ran into this as well. What I did was pretty simple:

1. install precise on an amd64 server, install a bunch of stuff
2. run dpkg --get-selections there
3. install a second amd64 server with precise
4 run apt-get update on the second server
5. run dpkg --set-selections with the list from the first server on the second server
6. run apt-get dselect-upgrade on the second server

This installed many, many i386 package. Some examples:

  apache2-utils:i386* apache2.2-bin:i386* comerr-dev:i386* cpp-4.6:i386* gcc-4.6-base:i386* haproxy:i386*
  icedtea-6-jre-cacao:i386* icedtea-6-jre-jamvm:i386* icedtea-netx:i386* krb5-multidev:i386* libapr1:i386*
  libaprutil1:i386* libaprutil1-dbd-sqlite3:i386* libaprutil1-ldap:i386* libasn1-8-heimdal:i386* libasound2:i386*
  libasyncns0:i386* libatk-wrapper-java-jni:i386* libatk1.0-0:i386* libaudio2:i386* libavahi-client3:i386*
  libavahi-common-data:i386* libavahi-common3:i386* libboost-filesystem1.46.1:i386*
  libboost-program-options1.46.1:i386* libboost-python1.46.1:i386* libboost-regex1.46.1:i386*
  libboost-regex1.48.0:i386* libboost-system1.46.1:i386* libboost-thread1.46.1:i386* libbsd0:i386* libbz2-1.0:i386*
  libc-ares-dev:i386* libc-ares2:i386* libc6:i386* libc6-dev:i386* libcairo2:i386* libcap2:i386* libcomerr2:i386*
  libcroco3:i386* libcups2:i386* libcurl3-gnutls:i386* libdatrie1:i386* libdb4.8:i386* libdb5.1:i386* libdbi1:i386*
  libdbus-1-3:i386* libdrm-dev:i386* libdrm-intel1:i386* libdrm-nouveau1a:i386* libdrm-radeon1:i386* libdrm2:i386*
  libedit2:i386* libexpat1:i386* libexpat1-dev:i386* libffi6:i386* libflac8:i386* libfontconfig1:i386*
  libfontconfig1-dev:i386* libfreetype6:i386* libfreetype6-dev:i386* libgcc1:i386* libgcrypt11:i386*
  libgd2-noxpm:i386* libgdbm3:i386* libgdk-pixbuf2.0-0:i386* libgettextpo0:i386* libgif4:i386* libgl1-mesa-dev:i386*
  libgl1-mesa-dri:i386* libgl1-mesa-glx:i386* libglapi-mesa:i386* libglib2.0-0:i386* libglibmm-2.4-1c2a:i386*
  libglu1-mesa:i386* libglu1-mesa-dev:i386* libgmp10:i386* libgnutls26:i386* libgomp1:i386* libgpg-error0:i386*
  libgpgme11:i386* libgpm2:i386* libgssapi-krb5-2:i386* libgssapi3-heimdal:i386* libgssrpc4:i386*
  libgstreamer-plugins-base0.10-0:i386* libgstreamer0.10-0:i386* libgtk2.0-0:i386* libhcrypto4-heimdal:i386*
  libheimbase1-heimdal:i386* libheimntlm0-heimdal:i386* libhx509-5-heimdal:i386* libice6:i386* libicu48:i386*
  libidn11:i386* libjasper1:i386* libjpeg-turbo8:i386* libjpeg-turbo8-dev:i386* libjpeg8:i386* libjpeg8-dev:i386*
  libjson0:i386* libk5crypto3:i386* libkadm5clnt-mit8:i386* libkadm5srv-mit8:i386* libkdb5-6:i386* libkeyutils1:i386*
  libkms1:i386* libkrb5-26-heimdal:i386* libkrb5-3:i386* libkrb5-dev:i386* libkrb5support0:i386* liblcms1:i386*
  libldap-2.4-2:i386* libllvm3.0:i386* liblua5.1-0:i386* liblzo2-2:i386* libmng1:i386* libmpc2:i386* libmpfr4:i386*
  libmysqlclient18:i386* libncurses5:i386* libncursesw5:i386* libnspr4:i386* libnss3:i386* libnss3-1d:i386*
  libogg0:i386* libopts25:i386* liborc-0.4-0:i386* libossp-uuid16:i386* libp11-kit0:i386* libpam0g:i386*
  libpango1.0-0:i386* libpciaccess0:i386* libpcre3:i386* libpcrecpp0:i386* libpcsclite1:i386* libpixman-1-0:i386*
  libpkcs11-helper1:i386* libpng12-0:i386*...

Read more...

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.