<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/test/integration/test-multiarch-allowed, 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-05T21:20:24Z</updated>
<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>Adjust test cases to treat 3.0 as default APT_SOLVER if not set</title>
<updated>2025-10-26T07:28:08Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2025-10-26T07:24:39Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5e8e69cdd6b512480f3208298725e1e44c80f06e'/>
<id>urn:sha1:5e8e69cdd6b512480f3208298725e1e44c80f06e</id>
<content type='text'>
Not needed so far because we export a default 3.0 APT_SOLVER, but
quite useful if we stop doing so (next commit).
</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>solver3: Reject reverse conflicts on install</title>
<updated>2025-02-14T18:04:56Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-02-05T21:06:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=9b8aaaa7abbf36d937dbf7160caa2d9c7c92871f'/>
<id>urn:sha1:9b8aaaa7abbf36d937dbf7160caa2d9c7c92871f</id>
<content type='text'>
We forgot this in the previous iteration. This makes the reasoning
in the test cases much nicer and apt-test's mantic-to-noble-jak.edsp
now finishes rather than running into the timeout (potentially forever).
</content>
</entry>
<entry>
<title>solver3: Reject reverse dependencies natively</title>
<updated>2025-02-14T18:04:56Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-02-05T20:31:53Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=b8918cb89ada945d92c720446177f1ef5185b5a5'/>
<id>urn:sha1:b8918cb89ada945d92c720446177f1ef5185b5a5</id>
<content type='text'>
Instead of utilizing the reverse depends functionality of the cache
and marking all possible reverse dependencies for removal, mark them
ourselves by keeping track of reverse-implication-clauses.

Notably, this improves the reverse dependency rejection substantially:
The previous RejectReverseDependencies() function did not handle
Provides.

For this to work correctly right now, we need to discover optional
clauses too when queuing them. This is somewhat suboptimal as we
technically we don't care if they become unsat, we just waste time
tracking them.

The tests get a bit awkward, but oh well, we use what we can
use.
</content>
</entry>
<entry>
<title>solver3: Defer version selection where possible</title>
<updated>2025-02-14T18:04:56Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-02-05T19:11:35Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f870bd44522d195199987b0e073d495eed060495'/>
<id>urn:sha1:f870bd44522d195199987b0e073d495eed060495</id>
<content type='text'>
If a dependency can be satisfied by all versions of a package,
add the package to the clause instead of the version object.

This works only if there are no providers for the package: Providers
are quite hard to enumerate over and make sure that all versions of
a package satisfy the provider dependency.

Implement arbitrary selection between packages and versions for
the CompareProviders class: We pick the best version for each package
and then pit them against each other.
</content>
</entry>
<entry>
<title>solver3: Use a propagation queue</title>
<updated>2025-01-30T13:50:15Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-11-02T12:55:39Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3523efb15d48ce3c6f9212f50dfc892497ba9dcb'/>
<id>urn:sha1:3523efb15d48ce3c6f9212f50dfc892497ba9dcb</id>
<content type='text'>
Instead of directly propagating in a recursive fashion,
queue propagations in a queue and work on them in a loop
per the miniSAT paper.

We call Propagate() only at the end of the FromDepCache()
function and then in the Solve loop. Delaying the initial
propagation means that we get a stronger reasoning:

Assume you have x-&gt;a-&gt;b-&gt;c, y-&gt;c and you install x,y:
- Previously we traversed: x, y, x-&gt;a, a-&gt;b, b-&gt;c, (y-&gt;c)
- but now we traverse:     x, y, x-&gt;a, y-&gt;c, a-&gt;b, (b-&gt;c)
Notably c now has the implication y-&gt;c instead of x-&gt;a-&gt;b-&gt;c.

Inside the solver we need to call Propagate in a loop:
Propagating facts can fail and we then backtrack. If backtracking
is succesful, we have gained a new fact to propagate.
</content>
</entry>
<entry>
<title>test: Support the 3.0 solver in most existing test cases</title>
<updated>2024-05-24T15:01:35Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-05-19T18:04:47Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=b5997949909ee9d5e9981c8311aea97c7b2620fd'/>
<id>urn:sha1:b5997949909ee9d5e9981c8311aea97c7b2620fd</id>
<content type='text'>
Highlights:

- test-bug-618848-always-respect-user-requests: (Do not) Support 3.0 solver

  A manually installed package is never removed just because we request
  the removal of its dependency in solver3.

- test-bug-657695-resolver-breaks-on-virtuals: Support 3.0 solver

  For manually installed packages, solver 3.0 would require some
  new xserver-xorg-video-driver to Conflict+Replace+Provides the
  old one (once the logic is implemented), but that does seem
  reasonable.

- test-bug-720597-build-dep-purge: Support 3.0 solver

  This needs a simple aptmark auto because pkga is removed by the
  build-dep. But further adjustments are necessary because it weirdly
  tested for no autoremovable packages before installing pkgc.

- test-bug-960705-*: Support 3.0 solver

  Bit awkward to deal with; notably the protect to conflict doesn't
  actually work anymore and that is a feature these days.
</content>
</entry>
<entry>
<title>Respect users pkg order on `apt install` for resolving</title>
<updated>2022-09-02T21:37:58Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-09-02T09:07:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e1f332324f81b589561a9d9bce8a55d4895f26ec'/>
<id>urn:sha1:e1f332324f81b589561a9d9bce8a55d4895f26ec</id>
<content type='text'>
The command line is evaluated in two steps: First all packages given
are marked for install and as a second step the resolver is started on
all of them in turn to get their dependencies installed.

This is done so a user can provide a non-default choice on the command
line and have it respected regardless of where on the command line it
appears.

On the other hand, the order in which dependencies are resolved can
matter, so instead of using a "random" order, we now do this in the
order given on the command line, so if you e.g. have a meta package
pulling in non-default choices and mention it first the choices are
respected predictably instead of depending on first appearance of the
package name while creating the binary cache.

I might have "broken" this more than a decade ago while introducing the
reworked command line parsing for Multi-Arch, which also brought in the
split into the two steps mentioned above which was the far more
impactful 'respect user choice' change. This one should hardly matter in
practice, but as the tests show, order can have surprising side effects.
</content>
</entry>
</feed>
