Better Solver Algorithms To conclude this section, let’s note that
aptitude
has more elaborate
algorithms compared to
apt
when it comes to resolving difficult situations. When a set of actions
is requested and when these combined actions would lead to an incoherent system,
aptitude
evaluates several possible scenarios and presents them in order of decreasing relevance. However,
these algorithms are not foolproof. Fortunately, there is always the possibility to manually select
the actions to perform. When the currently selected actions lead to contradictions, the upper part
of the screen indicates a number of broken packages (you can directly navigate to those packages
198
Kali Linux Revealed
by pressing b). Then you can manually build a solution. In particular, you can get access to the
different available versions by selecting the package with Enter. If the selection of one of these
versions solves the problem, you should not hesitate to use the function. When the number of
broken packages gets down to zero, you can safely go to the summary screen of pending actions
for a last check before you apply them.
Aptitude’s Log
Like
dpkg
,
aptitude
keeps a trace of executed actions in its logfile (
/var/log/
aptitude
). However, since both commands work at a very different level, you cannot
find the same information in their respective logfiles. While
dpkg
logs all the opera-
tions executed on individual packages step by step,
aptitude
gives a broader view of
high-level operations like a system-wide upgrade.
Beware, this logfile only contains a summary of operations performed by
aptitude
.
If other front-ends (or even
dpkg
itself) are occasionally used, then
aptitude
’s log
will only contain a partial view of the operations, so you can’t rely on it to build a
trustworthy history of the system.
Synaptic
Synaptic is a graphical package manager that features a clean and efficient graphical interface
(shown in Figure
8.2
, “
synaptic
Package Manager
” [page 200]) based on GTK+. Its many ready-to-
use filters give fast access to newly available packages, installed packages, upgradable packages,
obsolete packages, and so on. If you browse through these lists, you can select the operations to
be done on the packages (install, upgrade, remove, purge); these operations are not performed
immediately, but put into a task list. A single click on a button then validates the operations and
they are performed in one go.
199
Chapter 8 — Debian Package Management
|