Bug#1139149: apt: dist-upgrade keeps files back and no explanation given

Julian Andres Klode <[email protected]> Wed, 17 Jun 2026 00:44:33 +0200
Newsgroups gmane.linux.debian.apt.devel
Message-ID <20260617002430.GA1260299__43401.4022861206$1781650053$gmane$org@debian.org>
--xtk2ocseg6i4ecbe
Content-Type: text/plain; protected-headers=v1; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Subject: Re: Bug#1139149: apt: dist-upgrade keeps files back and no
 explanation given
MIME-Version: 1.0

On Tue, Jun 16, 2026 at 05:56:17PM +0000, Helge Kreutzmann wrote:
> Hello Julian,
> thanks for the explanation and debugging hints.
>=20
> Am Tue, Jun 16, 2026 at 07:02:10PM +0200 schrieb Julian Andres Klode:
> > On Sat, Jun 06, 2026 at 02:30:15PM +0000, Helge Kreutzmann wrote:
> > > root@twentytwo:~# LC_ALL=3DC apt update
> > > Hit:1 http://127.0.0.1:9999/ftp.de.debian.org/debian forky InRelease
> > > 92 packages can be upgraded. Run 'apt list --upgradable' to see them.
> > > root@twentytwo:~# LC_ALL=3DC apt upgrade
> > > Not upgrading:
> > >   cups-filters               libkf5kirigami2-5     libqt5multimediaqu=
ick5    libqt5quickwidgets5   libqt5waylandcompositor5  librust-block-buffe=
r-dev   poppler-utils                      qml-module-qtquick-templates2
> > >   cups-filters-core-drivers  libkf5waylandclient5  libqt5multimediawi=
dgets5  libqt5script5         libqt5webchannel5         librust-crypto-comm=
on-dev  python3-pyqt5                      qml-module-qtquick-window2
> > >   graphviz                   libkf5xmlgui5         libqt5network5t64 =
        libqt5sensors5        libqt5webengine-data      librust-digest-dev =
        qdbus-qt5                          qml-module-qtquick2
> > >   inkscape                   libkpim6itinerary6    libqt5networkauth5=
        libqt5serialport5     libqt5webengine5          librust-getrandom-d=
ev      qml-module-org-kde-kirigami2       qml-module-qtwebengine
> > >   kwayland-integration       libpoppler-glib8t64   libqt5positioning5=
        libqt5sql5-mysql      libqt5webenginecore5      librust-rand-core-d=
ev      qml-module-qtgraphicaleffects      qt5-gtk-platformtheme
> > >   libcurl3t64-gnutls         libpoppler-qt5-1t64   libqt5printsupport=
5t64    libqt5sql5-psql       libqt5webenginewidgets5   librust-sha2-dev   =
        qml-module-qtmultimedia            qt5-image-formats-plugins
> > >   libegl-mesa0               libpoppler-qt6-3t64   libqt5qml5        =
        libqt5sql5-sqlite     libqt5widgets5t64         libselinux1        =
        qml-module-qtqml                   qtspeech5-speechd-plugin
> > >   libgbm1                    libqt5core5t64        libqt5qmlmodels5  =
        libqt5sql5t64         libqt5x11extras5          libsemanage2       =
        qml-module-qtquick-controls        qtwayland5
> > >   libgl1-mesa-dri            libqt5dbus5t64        libqt5qmlworkerscr=
ipt5    libqt5svg5            libqt5xdgiconloader3      mesa-libgallium    =
        qml-module-qtquick-controls2
> > >   libglx-mesa0               libqt5designer5       libqt5quick5      =
        libqt5test5t64        libqt5xml5t64             node-jest-debbundle=
        qml-module-qtquick-dialogs
> > >   libkf5i18nlocaledata5      libqt5gui5t64         libqt5quickcontrol=
s2-5    libqt5texttospeech5   libqt5xmlpatterns5        pdf2djvu           =
        qml-module-qtquick-layouts
> > >   libkf5iconthemes5          libqt5multimedia5     libqt5quicktemplat=
es2-5   libqt5waylandclient5  librust-blobby-dev        pdfgrep            =
        qml-module-qtquick-privatewidgets
> > >=20
> > > Summary:
> > >   Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 92
> > > root@twentytwo:~# LC_ALL=3DC apt dist-upgrade
> > > Not upgrading:
> > >   cups-filters               libkf5kirigami2-5     libqt5multimediaqu=
ick5    libqt5quickwidgets5   libqt5waylandcompositor5  librust-block-buffe=
r-dev   poppler-utils                      qml-module-qtquick-templates2
> > >   cups-filters-core-drivers  libkf5waylandclient5  libqt5multimediawi=
dgets5  libqt5script5         libqt5webchannel5         librust-crypto-comm=
on-dev  python3-pyqt5                      qml-module-qtquick-window2
> > >   graphviz                   libkf5xmlgui5         libqt5network5t64 =
        libqt5sensors5        libqt5webengine-data      librust-digest-dev =
        qdbus-qt5                          qml-module-qtquick2
> > >   inkscape                   libkpim6itinerary6    libqt5networkauth5=
        libqt5serialport5     libqt5webengine5          librust-getrandom-d=
ev      qml-module-org-kde-kirigami2       qml-module-qtwebengine
> > >   kwayland-integration       libpoppler-glib8t64   libqt5positioning5=
        libqt5sql5-mysql      libqt5webenginecore5      librust-rand-core-d=
ev      qml-module-qtgraphicaleffects      qt5-gtk-platformtheme
> > >   libcurl3t64-gnutls         libpoppler-qt5-1t64   libqt5printsupport=
5t64    libqt5sql5-psql       libqt5webenginewidgets5   librust-sha2-dev   =
        qml-module-qtmultimedia            qt5-image-formats-plugins
> > >   libegl-mesa0               libpoppler-qt6-3t64   libqt5qml5        =
        libqt5sql5-sqlite     libqt5widgets5t64         libselinux1        =
        qml-module-qtqml                   qtspeech5-speechd-plugin
> > >   libgbm1                    libqt5core5t64        libqt5qmlmodels5  =
        libqt5sql5t64         libqt5x11extras5          libsemanage2       =
        qml-module-qtquick-controls        qtwayland5
> > >   libgl1-mesa-dri            libqt5dbus5t64        libqt5qmlworkerscr=
ipt5    libqt5svg5            libqt5xdgiconloader3      mesa-libgallium    =
        qml-module-qtquick-controls2
> > >   libglx-mesa0               libqt5designer5       libqt5quick5      =
        libqt5test5t64        libqt5xml5t64             node-jest-debbundle=
        qml-module-qtquick-dialogs
> > >   libkf5i18nlocaledata5      libqt5gui5t64         libqt5quickcontrol=
s2-5    libqt5texttospeech5   libqt5xmlpatterns5        pdf2djvu           =
        qml-module-qtquick-layouts
> > >   libkf5iconthemes5          libqt5multimedia5     libqt5quicktemplat=
es2-5   libqt5waylandclient5  librust-blobby-dev        pdfgrep            =
        qml-module-qtquick-privatewidgets
> > >=20
> > > Summary:
> > >   Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 92
> >=20
> > You'll want to specify -o Debug::APT::Solver=3D3 (or 2, or 1) to see the
> > reasoning as it goes along. In particular, you will easily find lines
> > with Reject: or Install: for the specific versions, say:
>=20
> In the meantime I already installd cups-filters (just with "apt
> install"), but most of the others are still there (and the set grows).
>=20
> Let's take graphviz as an example now. I performe the "dist-upgrade"
> with the "Solver=3D3". The entire output is 11 M (if you want, I can
> provide this), but then grepping for graphviz yields:

If you can run an

apt dist-upgrade -o Dir::Log::Solver=3D/path/to/some/file.zst --solver inte=
rnal

(not sure I fixed it to not require --solver internal)

That dumps the problem into a minimal reproducer, compressed with zstd,
so I can have a look at it and (if ok) add it to my regression test cases:

https://salsa.debian.org/apt-team/apt-tests


>=20
[...]
> [1662] Reject:graphviz:amd64=3D14.1.2-1+b1 (libgvc6:amd64 -> libgvc6:amd6=
4=3D2.42.4-3 -> not libgvplugin-gd8:amd64)
> Propagate not libgvplugin-pango8:amd64 to graphviz:amd64=3D14.1.2-1+b1 ->=
  | libgvplugin-pango8:amd64
> Propagate not graphviz:amd64=3D14.1.2-1+b1 to graphviz:amd64 ->  | graphv=
iz:amd64=3D14.1.2-1+b1 | graphviz:amd64=3D2.42.4-3
> [1662] Install:graphviz:amd64=3D2.42.4-3 (gimp:amd64 -> graphviz:amd64)
>=20
> However, I cannot really parse the =E2=80=9EReject=E2=80=9C line.

Seems libgvc6 is manually installed, and=20

libgvplugin-gd8 has a Breaks libgvc6 (<< 8.1.0-1~),
meanwhile the last libgvc6 is 2.42.4-3 which is only
available in stable.

The solver will usually consider them obsolete and try to avoid
them, but if it's manually installed, that overrides the "obsolete"
reason as people frequently build local only packages and don't
want the solver to go remove them...

However, the solver is arguably too eager here. When I made it strongly
protect manually installed packages I did not consider obsoletes, it
stands to reason obsolete manuals should have less protection.*

* There are three ways the solver protects manuals:

(1) Before resolving anything it primes the solver by pushing
    "assumptions" that all of them remain installed.

    In upgrade land, since upgrades are always optional, that
    causes upgrades to be kept back if they were to remove
    anything

(2) In the order of solving, it tries to keep manually
    installed packages first; that is, there is a work
    queue of "install this package", and the manuals
    come first.

(3) In the order of dependencies, it will move=20

    - installed packages to the start
    - obsolete packages to the end

    And then it resolves left-to-right.

It stands to reason that for obsolete manuals we should
likely remove protection 1 and 2. Enough "peer pressure"
=66rom other dependency paths would then hopefully lead
to them being removed.

(Hopefully I say, because guaranteeing a correct result
for upgrades is not feasible, because it's not well-defined;
there are incredibly complex nuances in behavior expectations;
for example, it's not better to upgrade 2 packages than 1 if
you break a Recommends; so you cannot prioritize upgrading
all packages)

To go step by step:
> [1662] Reject:graphviz:amd64=3D14.1.2-1+b1

This version (the new one) was rejected.

The reason for that chain is in parenthesis:

> (libgvc6:amd64=20

libgvc6 was (likely manually) installed

> -> libgvc6:amd64=3D2.42.4-3

this in turn selected that particular version of it
[I think there only is one, but it is what it is :)]

> -> not libgvplugin-gd8:amd64

Due to installing that version of libgvc6 we could not install
libgvplugin-gd8 [due to the Breaks if you recall]

(And that is essentially the end of the reasoning trail for
"why Reject:graphviz:amd64=3D14.1.2-1+b1", graphviz depends
 on libgvplugin-gd8)
--=20
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en

--xtk2ocseg6i4ecbe
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEET7WIqEwt3nmnTHeHb6RY3R2wP3EFAmox0c4ACgkQb6RY3R2w
P3EfCw//S1Wle/3/K5ed/jCrUBotuA2c0eyUcQoBobpk86lXB9TnDkbp/gsNg+oY
a15Z7K8fUrAOfWAOB7VG6ltwbthXFFW8Us72ZwgYK9EGXggEhdC+df/vOuG4zto0
K+85HRGEUMMEhFApN2Y1ZPhbCz8xRWULKOJNj9Vn4FYJmJOb9Ss3AkZCUMx/8OFb
au5q4XyT2TjsewGd+5p046ggtQ2RxEh+Mt3kKcB9ZP5+8WXZKOYDdwPyleaHI1ZE
rp1g6KW7VoHuyXnM5d1tUnMKMp0AXZiw7aMbQfm7orH8ut9AFgN+9A4PUIVB2b+/
kJ9xs/vcDf/M8ERIeKf5h8RHHf/+ZFWZ3b+AXc4S9Qx0SPsOmLbDhsipTtiNSFoP
TrPR3PguCK6W+2ugJCU1FQRwexelV6VnW4SCtpMy40DT75ia34qXc2HbESk1RdEO
HMEDLuznKVxPjAWwXuf8l/sLIOWGxvfoldQzclkUsHdK2QLYLRGOKa7UO786Iskh
T/p9+2jkM0sXIIaK4j4vj/D1lX3lx5wLUJZP/Tg+nDvLaoRIb5FUT/rZ1l4Rn54z
dZAC301s8MX6Dj5L7NCtGPvqipXj6+UowS0Tozde7FouhXP2an/yhtwT0tPJBu4N
xihp2a0DvEUcjMEvE9DYzWCxhm5dJoJxo7aEh+0EMNoY+ewlPv4=
=uZ06
-----END PGP SIGNATURE-----

--xtk2ocseg6i4ecbe--