On 2025-03-21 10:33:15 +0100, Julian Andres Klode wrote:
I'm afraid there's nobody left who understands the aptitude solver,
could reason whether the behavior is correct given the constraints
or suggest a different setting for SolutionCost that is not prone
to this problem.
[...]
Perhaps the root cause was not experimental after all, because now
that the experimental version has gone (which is a simpler situation),
aptitude still doesn't want to install the testing/unstable version
as an immediate solution, even with the default SolutionCost.
Confirming that the experimental version has gone:
disset:~> apt-show-versions -a libtree-sitter0.22
No stable version
No stable-updates version
libtree-sitter0.22:amd64 0.22.6-6+b1 testing ftp.debian.org libtree-sitter0.22:amd64 0.22.6-6+b1 unstable ftp.debian.org
No experimental version
libtree-sitter0.22:amd64 not installed
First, the test with the command line...
To make things clear, the following is fine (though
libtree-sitter0.22 will be marked as manually installed,
which I do not want):
disset:~> aptitude install -s emacs-gtk libtree-sitter0.22
The following NEW packages will be installed:
libtree-sitter0.22
The following packages will be REMOVED:
libtree-sitter0{a}
The following packages will be upgraded:
emacs emacs-bin-common emacs-common emacs-el emacs-gtk
5 packages upgraded, 1 newly installed, 1 to remove and 2 not upgraded.
Need to get 43.3 MB of archives. After unpacking 3072 B will be freed.
and "aptitude upgrade -s" proposes the same thing, except that libtree-sitter0.22 will be marked as automatically installed (libtree-sitter0.22{a}), which is better. However, if one just
wants to upgrade some packages, "aptitude upgrade" is not a
solution in general.
But if I just ask for emacs-gtk, aptitude does not want to
install libtree-sitter0.22 immediately as a dependency:
disset:~> aptitude install -s emacs-gtk
The following packages will be REMOVED:
libtree-sitter0{u}
The following packages will be upgraded:
emacs emacs-bin-common emacs-common emacs-el emacs-gtk{b}
5 packages upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
Need to get 43.2 MB of archives. After unpacking 223 kB will be freed.
The following packages have unmet dependencies:
emacs-gtk : Depends: libtree-sitter0.22 (>= 0.22.4) but it is not going to be installed
The following actions will resolve these dependencies:
Install the following packages:
1) libtree-sitter0.22 [0.22.6-6+b1 (testing, unstable)]
Why this "but it is not going to be installed" instead of just
proposing the usual installation of the dependency???
Note that this is the same with the default SolutionCost:
aptitude install -s \
-o Aptitude::ProblemResolver::SolutionCost="safety, priority" emacs-gtk
Accepting the solution is OK:
The following NEW packages will be installed:
libtree-sitter0.22{a}
The following packages will be REMOVED:
libtree-sitter0{u}
The following packages will be upgraded:
emacs emacs-bin-common emacs-common emacs-el emacs-gtk
5 packages upgraded, 1 newly installed, 1 to remove and 2 not upgraded.
Now, with the TUI, this is similar when I type '+' over "emacs-gtk":
Some dependencies of emacs-gtk (broken, 1:30.1+1-4) are not satisfied: ▒
▒
* emacs-gtk (upgrade, 1:30.1+1-4 -> 1:30.1+1-5) depends on libtree-sitter0.22▒
(>= 0.22.4) ▒
and the proposed action:
--\ Install the following packages:
libtree-sitter0.22 [0.22.6-6+b1 (testing, unstable)]
gives
aptitude 0.8.13 @ disset Disk: -3072 B DL: 43.3 MB
--\ Packages to be upgraded (5)
iu emacs 1:30.1+1-4 1:30.1+1-5
iuA emacs-bin-common 1:30.1+1-4 1:30.1+1-5
iuA emacs-common 1:30.1+1-4 1:30.1+1-5
iuA emacs-el 1:30.1+1-4 1:30.1+1-5
iu emacs-gtk -4096 B 1:30.1+1-4 1:30.1+1-5
--\ Packages being automatically installed to satisfy dependencies (1)
piA libtree-sitter0. +220 kB <none> 0.22.6-6+b1
--\ Packages being removed because they are no longer used (1)
idA libtree-sitter0 -219 kB 0.22.6-4 0.22.6-4
which is OK, but the correct upgrade solution should have been
selected immediately. Ditto with the default SolutionCost.
And if I type '+' over "main" (for the 5 emacs* packages) instead of "emacs-gtk", aptitude finds the expected solution only at step 7 with
the "safety, removals" SolutionCost, and at step 6 with the default
"safety, priority" SolutionCost. This is strange because this should
have been simpler than just selecting emacs-gtk for upgrade.
FYI, with apt:
disset:~> apt install -s emacs-gtk
[...]
Upgrading:
emacs emacs-bin-common emacs-common emacs-el emacs-gtk
Installing dependencies:
libtree-sitter0.22
REMOVING:
libtree-sitter0
Summary:
Upgrading: 5, Installing: 1, Removing: 1, Not Upgrading: 2
Inst emacs-el [1:30.1+1-4] (1:30.1+1-5 Debian:testing, Debian:unstable [all]) []
Inst emacs-common [1:30.1+1-4] (1:30.1+1-5 Debian:testing, Debian:unstable [all]) [emacs-gtk:amd64 emacs-bin-common:amd64 ]
Inst emacs-gtk [1:30.1+1-4] (1:30.1+1-5 Debian:testing, Debian:unstable [amd64]) [emacs-bin-common:amd64 ]
Inst emacs-bin-common [1:30.1+1-4] (1:30.1+1-5 Debian:testing, Debian:unstable [amd64]) []
Remv libtree-sitter0 [0.22.6-4] []
Inst libtree-sitter0.22 (0.22.6-6+b1 Debian:testing, Debian:unstable [amd64]) Inst emacs [1:30.1+1-4] (1:30.1+1-5 Debian:testing, Debian:unstable [all])
Conf emacs-el (1:30.1+1-5 Debian:testing, Debian:unstable [all])
Conf emacs-common (1:30.1+1-5 Debian:testing, Debian:unstable [all])
Conf emacs-gtk (1:30.1+1-5 Debian:testing, Debian:unstable [amd64])
Conf emacs-bin-common (1:30.1+1-5 Debian:testing, Debian:unstable [amd64])
Conf libtree-sitter0.22 (0.22.6-6+b1 Debian:testing, Debian:unstable [amd64]) Conf emacs (1:30.1+1-5 Debian:testing, Debian:unstable [all])
--
Vincent Lefèvre <
vincent@vinc17.net> - Web: <
https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <
https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)