[Aptitude-devel] Problem solver documentation and confusion

Matthijs Kooijman matthijs at stdin.nl
Wed Aug 31 09:23:14 BST 2016


(Please keep me CC'd, I'm not subscribed to the list)

Hi folks,

I previously mentioned this on the IRC channel, but Axel asked me to put
my question in an e-mail, so here it is. I've been running into some
problems with the aptitude problem resolver. Most recently it would not
seem to find a solution for doing a full-upgrade on my system, but
regularly I find that it first offers to remove a lot of packages, and
only later offers the better solution of just upgrading a few packages.

In an attempt to see if I could diagnose and perhaps improve this
behaviour, I dove into the documenation. However, it seems that the user
manual [1] mostly talks about using the interface, but is missing a
general introduction on how the resolver works to generate solutions,
introducing concepts like cost, score, and (even without details)
would help reasoning about what the resolver is doing and why. The
manual does talk about cost [2] and customizing things with hints [3],
but without the general introduction it is hard to understand how these
mechanisms fit in the whole. Also, while searching for solutions the UI
shows a count of open/closed/conflict/deferred, which are also not
explained in the manual.

One particular confusion is that the configuration reference [4] shows
various options that influence the "Score" of package versions, but none
of the other documentation talks about this score, so I'm puzzled as to
how it is used. It would seem sensible to use the score as part of the
cost,  but it seems that none of the "basic cost components" listed [2]
would refer to this score. Perhaps the cost is used to evaluate a
complete solution and the score is used to direct the search by scoring
individual steps?

I tried turning on debug info through Aptitude::CmdLine::Resolver-Debug
and Aptitude::CmdLine::Resolver-Dump, mostly discovering that I did not
know enough about the process to understand the output (also, it seems
to me that Resolver-Debug is *very* verbose, and that a less verbose
output showing only considered solutions and their cost/score might be
useful).

Is there perhaps some "internal" documentation about the resolver that I
missed? I tried looking through the source code (in particular
problemresolver.h [5]), which has some overview of the concepts
involved, but does not seem to document the process itself.

Gr.

Matthijs

[1]: https://www.debian.org/doc/manuals/aptitude/ch02s03.en.html
[2]: https://www.debian.org/doc/manuals/aptitude/ch02s03s04.en.html
[3]: https://www.debian.org/doc/manuals/aptitude/ch02s03s05.en.html
[4]: https://www.debian.org/doc/manuals/aptitude/ch02s05s05.en.html
[5]: https://anonscm.debian.org/cgit/aptitude/aptitude.git/tree/src/generic/problemresolver/problemresolver.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20160831/4b65d90c/attachment.sig>


More information about the Aptitude-devel mailing list