#996115 apt upgrade --no-download --fix-missing --auto-remove: "E: Internal error, InstallPackages was called with broken packages!"

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Jakub Wilk
Date:
2021-10-23 17:39:03 UTC
Severity:
normal
Tags:
#996115#3
Date:
2021-10-11 12:35:39 UTC
From:
To:
I was in the middle of "apt upgrade" downloading packages, stopped it,
and decided to upgrade stuff that is already downloaded. It didn't go
well:

   # apt upgrade --no-download --fix-missing --auto-remove
   Reading package lists... Done
   Building dependency tree... Done
   Reading state information... Done
   Calculating upgrade... Done
   The following packages will be REMOVED:
      gobjc-10* (10.3.0-11)
      libcbor0* (0.5.0+dfsg-2)
   The following packages have been kept back:
      bzr (2.7.0+bzr6622-15 => 2.7.0+bzr6622+brz)
      cpp (4:10.2.1-1 => 4:11.2.0-2)
      d-shlibs (0.101 => 0.102)
      docutils-common (0.16+dfsg-2 => 0.16+dfsg-4)
      g++ (4:10.2.1-1 => 4:11.2.0-2)
      gcc (4:10.2.1-1 => 4:11.2.0-2)
      gobjc (4:10.2.1-1 => 4:11.2.0-2)
      libaio1 (0.3.112-10 => 0.3.112-11)
      libaio1:amd64 (0.3.112-10 => 0.3.112-11)
      libdeflate-dev (1.7-2 => 1.8-1)
      libdeflate0 (1.7-2 => 1.8-1)
      libdeflate0:amd64 (1.7-2 => 1.8-1)
      libfido2-1 (1.8.0-1 => 1.8.0-1+b1)
      libglibmm-2.4-1v5 (2.66.1-1 => 2.66.2-1)
      libjs-sphinxdoc (4.2.0-3 => 4.2.0-4)
      libuser (1:0.63~dfsg-2 => 1:0.63~dfsg-3)
      libuser1 (1:0.63~dfsg-2 => 1:0.63~dfsg-3)
      libwireshark-data (3.4.8-1 => 3.4.9-1)
      libwireshark14 (3.4.8-1 => 3.4.9-1)
      libwiretap11 (3.4.8-1 => 3.4.9-1)
      libwsutil12 (3.4.8-1 => 3.4.9-1)
      libwww-perl (6.53-1 => 6.57-1)
      libzint2.10 (2.10.0-1 => 2.10.0-1+b1)
      mksh (59c-11 => 59c-12)
      mkvtoolnix (61.0.0-1 => 62.0.0-1)
      neomutt (20180716+dfsg.1-1+deb10u2 => 20201127+dfsg.1-1.2+b1)
      python3-astroid (2.8.1-1 => 2.8.2-1)
      python3-bcrypt (3.1.7-4 => 3.2.0-1)
      python3-click (7.1.2-1 => 8.0.2-1)
      python3-docutils (0.16+dfsg-2 => 0.16+dfsg-4)
      python3-kiwisolver (1.3.1-2 => 1.3.2-1)
      python3-logilab-common (1.4.3-1 => 1.8.1-1)
      python3-regex (0.1.20201113-2 => 0.1.20211008-1)
      python3-sphinx (4.2.0-3 => 4.2.0-4)
      python3-urwid (2.1.2-1 => 2.1.2-2)
      sphinx-common (4.2.0-3 => 4.2.0-4)
      sphinx-doc (4.2.0-3 => 4.2.0-4)
      tshark (3.4.8-1 => 3.4.9-1)
      wireshark-common (3.4.8-1 => 3.4.9-1)
      zint (2.10.0-1 => 2.10.0-1+b1)
   0 upgraded, 0 newly installed, 2 to remove and 40 not upgraded.
   The following packages have unmet dependencies:
    gobjc : Depends: gobjc-10 (>= 10.2.1-3~) but it is not going to be installed
    libfido2-1 : Depends: libcbor0 (>= 0.5.0) but it is not going to be installed
   E: Internal error, InstallPackages was called with broken packages!

#996115#8
Date:
2021-10-11 15:49:53 UTC
From:
To:
Control: tag -1 moreinfo

I don't know where this ends up, but we definitely need more logs, see
README.md for debugging instructions.

If this fails in the resolver, doing --solver dump with
APT_EDSP_DUMP_FILENAME set to a nice filename and attaching that file
would be super helpful.

#996115#15
Date:
2021-10-11 15:49:53 UTC
From:
To:
Control: tag -1 moreinfo

I don't know where this ends up, but we definitely need more logs, see
README.md for debugging instructions.

If this fails in the resolver, doing --solver dump with
APT_EDSP_DUMP_FILENAME set to a nice filename and attaching that file
would be super helpful.

#996115#18
Date:
2021-10-11 17:04:18 UTC
From:
To:
This is how to reproduce this in a bullseye chroot:

   apt install --no-install-recommends -y gcc libfido2-1
   echo 'deb http://ftp.debian.org/debian unstable main' >> /etc/apt/sources.list
   apt update
   apt install -yd libfido2-1
   apt upgrade --no-download --fix-missing --auto-remove

#996115#23
Date:
2021-10-13 09:42:52 UTC
From:
To:
I tried this both in a debian:bullseye docker image and a
images:debian/bullseye lxd container, and it works in both. Not
interested in running debootstrap and dealing with chroots.

#996115#26
Date:
2021-10-13 09:59:43 UTC
From:
To:
* Julian Andres Klode <jak@debian.org>, 2021-10-13, 11:42:

Huh. I can reproduce the bug in debian:bullseye docker.

#996115#29
Date:
2021-10-23 17:37:38 UTC
From:
To:
* Jakub Wilk <jwilk@jwilk.net>, 2021-10-13, 11:59:

I added a few debugging options and run it again.
I've attached the dockerfile I used for testing and the build output.