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

Bug#1071519: apt: "--solver 3.0" does not want to upgrade some packages



Control: retitle -1 --solver 3.0 fails to select candidate for -t, --mark-auto request

On Mon, May 20, 2024 at 02:37:29PM +0200, Gábor Gombás wrote:
> Package: apt
> Version: 2.9.3
> Severity: normal
> 
> Hi,
> 
> Well, it's alpha, but still - using "--solver 3.0", I cannot upgrade some packages to the version in sid:
> 
> # apt policy iproute2
> iproute2:
>   Installed: 6.8.0-1
>   Candidate: 6.8.0-1
>   Version table:
>      6.9.0-1 102
>         102 http://ftp.hu.debian.org/debian sid/main amd64 Packages
>         102 http://ftp.at.debian.org/debian sid/main amd64 Packages
>  *** 6.8.0-1 103
>         103 http://ftp.hu.debian.org/debian trixie/main amd64 Packages
>         103 http://ftp.at.debian.org/debian trixie/main amd64 Packages
>         100 /var/lib/dpkg/status
>      6.1.0-3 990
>         990 http://ftp.hu.debian.org/debian bookworm/main amd64 Packages
>         990 http://ftp.at.debian.org/debian bookworm/main amd64 Packages
> # apt install -t unstable --mark-auto --solver 3.0 iproute2
> Summary:                        
>   Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 56
> 
> Without "--solver 3.0", it works:
> 
> # apt install -t unstable --mark-auto iproute2
> Upgrading:                      
>   iproute2
> 
> Summary:
>   Upgrading: 1, Installing: 0, Removing: 0, Not Upgrading: 55
>   Download size: 1,064 kB
>   Space needed: 4,096 B / 99.1 GB available
> 
> Get:1 http://ftp.hu.debian.org/debian sid/main amd64 iproute2 amd64 6.9.0-1 [1,064 kB]
> Fetched 1,064 kB in 0s (15.7 MB/s) 
> Reading changelogs... Done
> apt-listchanges: Do you want to continue? [Y/n] n
> apt-listchanges: Aborting

It's not quite clear to me what goes on there, but this may get lost in
translation between the old solver and the new one.

If you can do so, please use -o Dir::Log::Solver=<absolute path to file.edsp>
to specify a file to dump the solver request to, and then compress and
attach it to the bug report (it might need --solver internal if you
default to 3.0, I need to check and eventually fix solver logging for
3.0 still).

It is possible that this is one of the weird cases where it would crash
with -o Debug::APT::Solver=1 (as that enables more assertions). I'm
currently in the process of getting the test suite to work, adjusting
the tests that can work in the first step, to then have a solid base to
check for regressions when making further changes.

It could also be that the reason is the --mark-auto. This marks the
request to install that specific version as automatic presumably, and
you are in an install request, so the solver will first try to satsify
dependencies, where it will see the installed iproute2 as the preferred
option (since it's not upgrading, it minimizes upgrades), and then later
it will try to install the chosen iproute2 but it's not possible anymore
so it backtracks a level and just skips the request since it is
optional. I think this can be fixed however, that's a problem of
translating the selection state to the solver problem (i.e. this package
is marked auto now; but we actually have requested it manually so it
should be executed).

It also turns out we sometimes lose unsatisfiable items when
backtracking. We did not lose the item here presumably, otherwise
iproute2 would have been removed, but not sure.

In any case, attaching an EDSP file is best so we can reproduce it;
running with -o Debug::APT::Solver={1,2,3} (depending on how much output is
needed) could also give you a good insight to the point you can just
tell me.

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en


Reply to: