On Sat, Nov 02, 2024 at 09:26:37AM GMT, Vladimir K wrote:
> Today it tried to install grub:
> 
>     $ sudo apt full-upgrade --purge -V --fix-broken --auto-remove --solver 3.0
>     Upgrading:                      
>        chrpath (0.17+really0.17-1 => 0.18-1)
>        foot (1.18.1-1 => 1.19.0-1)
>        foot-terminfo (1.18.1-1 => 1.19.0-1)
>        foot-themes (1.18.1-1 => 1.19.0-1)
>        hugin (2024.0~beta1+dfsg-1 => 2024.0~rc1+dfsg-1)
>        hugin-data (2024.0~beta1+dfsg-1 => 2024.0~rc1+dfsg-1)
>        hugin-tools (2024.0~beta1+dfsg-1 => 2024.0~rc1+dfsg-1)
>        libfcft-dev (3.1.8-1.1 => 3.1.9-1)
>        libfcft4t64 (3.1.8-1.1 => 3.1.9-1)
>        libnss-myhostname (256.7-2 => 256.7-3)
>        libpam-systemd (256.7-2 => 256.7-3)
>        libqt6positioning6 (6.7.2-2 => 6.7.2-3)
>        libspeechd2 (0.11.5-5 => 0.11.5-5.1)
>        libsystemd-dev (256.7-2 => 256.7-3)
>        libsystemd-shared (256.7-2 => 256.7-3)
>        libsystemd0 (256.7-2 => 256.7-3)
>        libsystemd0:i386 (256.7-2 => 256.7-3)
>        libudev-dev (256.7-2 => 256.7-3)
>        libudev1 (256.7-2 => 256.7-3)
>        libudev1:i386 (256.7-2 => 256.7-3)
>        libx11-6 (2:1.8.7-1+b2 => 2:1.8.10-1)
>        libx11-6:i386 (2:1.8.7-1+b2 => 2:1.8.10-1)
>        libx11-data (2:1.8.7-1 => 2:1.8.10-1)
>        libx11-dev (2:1.8.7-1+b2 => 2:1.8.10-1)
>        libx11-xcb-dev (2:1.8.7-1+b2 => 2:1.8.10-1)
>        libx11-xcb1 (2:1.8.7-1+b2 => 2:1.8.10-1)
>        libx11-xcb1:i386 (2:1.8.7-1+b2 => 2:1.8.10-1)
>        libxau-dev (1:1.0.9-1+b2 => 1:1.0.11-1)
>        libxau6 (1:1.0.9-1+b2 => 1:1.0.11-1)
>        libxau6:i386 (1:1.0.9-1+b2 => 1:1.0.11-1)
>        libxaw7 (2:1.0.14-1+b3 => 2:1.0.16-1)
>        libxcomposite-dev (1:0.4.5-1+b2 => 1:0.4.6-1)
>        libxcomposite1 (1:0.4.5-1+b2 => 1:0.4.6-1)
>        python3-speechd (0.11.5-5 => 0.11.5-5.1)
>        systemd (256.7-2 => 256.7-3)
>        systemd-boot (256.7-2 => 256.7-3)
>        systemd-boot-efi (256.7-2 => 256.7-3)
>        systemd-sysv (256.7-2 => 256.7-3)
>        systemd-ukify (256.7-2 => 256.7-3)
>        udev (256.7-2 => 256.7-3)
>        wf-recorder (0.5.0-1 => 0.5.0-2)
>     
>     Installing dependencies:
>        grub-efi-amd64-bin:i386 (2.12-5)
>        grub-efi-amd64-unsigned:i386 (2.12-5)
>        grub2-common (2.12-5)
>        mokutil (0.6.0-2+b1)
>        shim-helpers-amd64-signed (1+15.8+1)
>        shim-signed (1.44+15.8-1)
>        shim-signed-common (1.44+15.8-1)
>        shim-unsigned (15.8-1)
>     
>     Not upgrading:
>        libunwind8 (1.7.0~rc2-1 => 1.7.2-1)
>        python3-resolvelib (1.0.1-2 => 1.1.0-1)
>     
>     Summary:
>       Upgrading: 41, Installing: 8, Removing: 0, Not Upgrading: 2
>       Download size: 32,4 MB
>       Space needed: 18,6 MB / 137 GB available
> 
> 
> Pinned those packages -1, upgraded, unpinned, no longer happens.
> 
> Nautilus is still being promoted for installation when unpinned.
> 
> How do I save 3.0 solver dump? -o Dir::Log::Solver=/tmp/solver.edsp does not
> work with 3.0.
> 

You need to pass --solver internal again. It just dumps the solver input,
so the solver chosen does not matter.

Essentially what seems to happen is a bug in the Recommends handling;
it can end up considering currently unsatisfied Recommends as satisfied
(or new) and then try to install new packages for it.

That logic is quite tricky to get right. Basically if you have a

Recommends: foo (>= 1) 

in bar=1 and

Recommends: foo (>= 2)

in bar=2, we need to keep bar=1 installed until foo=2 is available;
as the foo (>= 1) Recommends and foo (>= 2) recommends are considered
equal.

Same if we added something:

    before: Recommends: foo
    after:  Recommends: foo | baz

Now if foo was installed before, foo | baz must remain installed.

3.0 solver checked the *after* state, and it did not check version
numbers so if you had Recommends: foo (= unsatisfiable version) and
foo was installed, it considered the Recommends satisfied, but now
it would try to enqueue a new 

Recommends: foo (= unsatisfiable version) | baz

causing baz to be installed.

The promotion of satisfied Recommends to Depends and satisfied
Suggests to Recommends (such that upgrading does not break currently
satisfied Suggests) is quite a tricky topic to get right - the 
old code was not easily transferable.

I have another instance of this in my local tests that I'm trying
to address while solving another bug about candidate handling.
-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en

Reply via email to