<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/test/integration/test-release-candidate-switching, branch main</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=main</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2026-01-31T16:30:20Z</updated>
<entry>
<title>solver3: Use classical watchers for propagation</title>
<updated>2026-01-31T16:30:20Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2025-12-29T17:47:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=1fbb857b6b2cbddcea9e8b03aa0c766c72e91f34'/>
<id>urn:sha1:1fbb857b6b2cbddcea9e8b03aa0c766c72e91f34</id>
<content type='text'>
Instead of tracking dependencies and reverse dependencies,
install classical watchers. This vastly streamlines the
propagation code and allows us to easily switch to literals
in the next step.

This implementation watches _all_ solutions rather than using
the modern 2-watched literals scheme or the intermediate
head/tail watchers.

Ultimately a more effective watcher scheme would be interesting
but not a significant priority seeing as most of the solver runtime
is spent not in propagation but in problem translation.

decision trees
--------------
The new watchers produce slightly different decision trees, sometimes
subtly changing solutions. Notably in various observed examples in
Ubuntu 25.04, courier was installed as an MTA instead of postfix:

The old decision tree was:

    apcupsd:amd64 -&gt; mailutils:amd64=1:3.18-1 -&gt; mailutils:amd64 -&gt; postfix:amd64=3.9.1-10ubuntu1

The new decision tree is:

    lsb:amd64 -&gt; lsb-core:amd64 -&gt; courier-mta:amd64=1.3.13-1

The difference here being that lsb-core declares a mail-transport-agent
dependency whereas mailutils depends on `default-mta | mail-transport-agency`;
but both are effectively subject to selection at similar time.

Further work is needed to optimize selection. A notable choice may also
be to deal with broken packages like lsb-core that declare dependencies
solely on a virtual package by reconstructing the default provider for
that package utilizing default-* dependencies or similar notions.

Likewise in the test suite, explanations are different in some
uninstallable cases.

backtracking
~~~~~~~~~~~~
The following major changes were observed in the 25.04 test suite:

-tmp/regression-remove/07f0a068-36c2-11f0-b7c1-fa163e171f02:18
+tmp/regression-remove/07f0a068-36c2-11f0-b7c1-fa163e171f02:3

-tmp/regression-remove/32078f70-3734-11f0-a75a-fa163ec8ca8c:64
+tmp/regression-remove/32078f70-3734-11f0-a75a-fa163ec8ca8c:19

Other test cases showed little deviation, +/- 1, generally
the same amount of backtracking.

performance
~~~~~~~~~~~
Running Ubuntu's regression test suite resulted in no significant
performance difference being observable.

Before: 290s user time; 16.66% solver
After:  299s user time; 17.36% solver

Tests where run with make -j 8 and solver performance extracted

    perf report --symbol-filter=ResolveExternal --stdio
</content>
</entry>
<entry>
<title>solver3: Rename decision to assignment</title>
<updated>2026-01-05T21:20:24Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2025-12-28T15:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=21d099878ed8c34f3b13747bcec380e0402e57a3'/>
<id>urn:sha1:21d099878ed8c34f3b13747bcec380e0402e57a3</id>
<content type='text'>
The previous use of decision here conflicted with the use
of decision level and the general notion of having made a
decision, because the assignment might have been propagated
as a matter of fact.
</content>
</entry>
<entry>
<title>solver3: Sort dependency targets against current alternative</title>
<updated>2025-08-26T11:41:35Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2025-07-22T17:58:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=db78e2f8eafb1009bd47e488fc39d8b420f4c749'/>
<id>urn:sha1:db78e2f8eafb1009bd47e488fc39d8b420f4c749</id>
<content type='text'>
Instead of inadvertently sorting dependency targets against
the first alternative in an or group, sort them against the
current alternative as we should.

Otherwise we ended up sorting

    gnome-shell | notification-daemon

With

    Package: notification-daemon

    Package: awesome
    Provides: notification-daemon

into

    gnome-shell | awesome | notification-daemon
                &lt;-we sorted this part wrongly-&gt;

This fixes a minor difference in test-release-candidate-switching
in one case, but not the other where the difference was actually
caused by the loss of install argument ordering information in
the new solver, so just flip the arguments so both solvers produce
the same outcome.
</content>
</entry>
<entry>
<title>Evaluate and fall back to the 3.0 solver</title>
<updated>2025-03-09T12:33:53Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-02-18T12:06:32Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=935a9ab334e55a29363f45e7de6338c47337e806'/>
<id>urn:sha1:935a9ab334e55a29363f45e7de6338c47337e806</id>
<content type='text'>
Always run the 3.0 solver after the internal solver. If the internal
solver failed, and the 3.0 solver did not, use the 3.0 result.

If 3.0 solver failed or produced a worse result than the internal
solver, write an apport crash dump.

We exclude situations which we now the solver can't handle, i.e.
removals are forbidden and you requested removals, and stuff like
that.
</content>
</entry>
<entry>
<title>solver3: Verbose error messages</title>
<updated>2025-03-08T22:18:05Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-03-06T19:07:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3967b75ae4a10d0d79560dfecb8eb210aad4f4f2'/>
<id>urn:sha1:3967b75ae4a10d0d79560dfecb8eb210aad4f4f2</id>
<content type='text'>
Introduce a new function, LongWhyStr() that returns a longer
reason for why something is being installed (or not).

This does the same path walk as the other function does, but
it renders the clauses at each level, and one per line, so
the whole output is a lot more informative.

It is a separate function to keep the existing debug messages
use the simple single line implication graph

We remove the other special case in AddWork() for empty solutions
to mke use of the general case in Solve() instead, and then adapt
the case in Solve() to the same case as in Enqueue(). This also
happens to fix the bug that when we encountered an empty clause
we just printed the clause had no solution, but not how we got
to install the package with the clause.

Adapt the test suite for the changes which is an annoying amount
of paperwork.
</content>
</entry>
<entry>
<title>solver3: Only enqueue shared dependencies at the package level</title>
<updated>2025-02-14T18:08:45Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-02-05T19:37:12Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=943562a4ed2ddc80b84466d85e821037937f8b5c'/>
<id>urn:sha1:943562a4ed2ddc80b84466d85e821037937f8b5c</id>
<content type='text'>
Dependencies shared by all versions are enqueued at the package
level, so avoid enqueuing duplicates at the version level. This
presumably has no meaningful impact on performance, potentially
a negative performance impact on some workloads as we now need
to find the duplicates again; it can become useful when there
is a lot of backtracking.

More importantly though this improves error messages, because
now we can say that "all versions of foo depend on X", rather
than saying "foo=1 depends on X" and you are left wondering
why we did not select "foo=2".

In this commit though, improved error messages are not implemented,
they depend on redesigning the reason tracking to use clauses.

Also the rationale tracking includes a lot more dependencies of
the form "pkg:arch=version -&gt; pkg:arch" which are annoying. Improved
error messages should fold them into one node.
</content>
</entry>
<entry>
<title>test: Fix 7 test cases for 3.0 solver, annotate others</title>
<updated>2025-02-14T18:08:45Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-02-11T16:02:00Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e86f3d875a48987a026f79aa4e19eeda4ad01b3b'/>
<id>urn:sha1:e86f3d875a48987a026f79aa4e19eeda4ad01b3b</id>
<content type='text'>
Fix the test cases we can fix directly; add annotations where we
know what work is needed, next we'll look at the other bugs.
</content>
</entry>
<entry>
<title>Give our test packages proper size information</title>
<updated>2021-06-10T14:38:09Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2021-06-10T14:38:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=18140e1db1c386a8c6da004956ae8a96152de4d1'/>
<id>urn:sha1:18140e1db1c386a8c6da004956ae8a96152de4d1</id>
<content type='text'>
Temporary hacks should be temporary, especially if they hide bugs. After
fixing one in the previous commit this is just busy work to add download
information to the places which check that output.

Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>don't auto-switch candidate if installed is good enough</title>
<updated>2017-12-13T22:52:07Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-12-12T20:31:35Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=b857d586edeb3639d996a75fccd55ebea370b491'/>
<id>urn:sha1:b857d586edeb3639d996a75fccd55ebea370b491</id>
<content type='text'>
If we perform candidate switching in requests like "apt install foo/bar"
we should first check if the dependencies of foo from release bar are
already satisfied by what is already installed before checking if the
candidate (or switched candidate) would.
</content>
</entry>
<entry>
<title>do not strip epochs from state version strings</title>
<updated>2016-03-16T22:29:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-03-16T21:32:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=a38cec81d349525c447004ef8fe9dc942c8bd9bb'/>
<id>urn:sha1:a38cec81d349525c447004ef8fe9dc942c8bd9bb</id>
<content type='text'>
The epoch stripping in this code is done since day one, but in other
places we show a version epochs are not stripped. If epochs are present
in packages they tend to be an important information which we can't just
drop and especially can't drop "sometimes" as that confuses users and
tools alike – so even if removing code in use for (close to) 18 years
feels wrong, it is probably the right choice for consistency.

Closes: 818162
</content>
</entry>
</feed>
