<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/solver3.h, branch 2.9.35</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.9.35</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.9.35'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2025-03-20T21:22:17Z</updated>
<entry>
<title>solver3: Handle previously satisfied Suggests last</title>
<updated>2025-03-20T21:22:17Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-03-20T19:47:28Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=83bad834c63604035c251f24ee9ea99dac1a1369'/>
<id>urn:sha1:83bad834c63604035c251f24ee9ea99dac1a1369</id>
<content type='text'>
In #2103556 we can see that avahi-daemon Suggests avahi-autoipd,
which is previously satisfied by dhcpcd-base due to a Provides;
that Provides has now been dropped; and solver3 keeps the update
back.

As in LP: #2102720 this is a Suggests and it seems wrong for the
Suggests to actually influence dependency choices and be able to
hold back updates.

Instead, satisfy previously satisfied Suggests at the end. For the
particular case in this bug report, this results in avahi-autoipd,
the real package, to be installed to keep the Suggests working
which needs further consideration whether that is the right choice
(we can argue either way), but in any case this is a better solution.

This in turn breaks the conkeror test which is a somewhat awkward
unrealistic test these days as it has no automatically installed
packages; because previously something must have had a Suggests
on say libdatrie1 or something that was processed first.

This would be fine before 5daf6dbfd272be2f8e3c59d4bab4be8c119b7aa1
but as of that commit we no longer rewrite

    conkeror Depends xulrunner-1.9 | xulrunner-1.9.1

into

    conkeror Depends xulrunner-1.9.1 | xulrunner-1.9

Because xulrunner-1.9 is manually installed. Mark xulrunner-1.9
as automatically installed to fix the test case.

The resulting behavior seems correct: If you manually want
xulrunner-1.9 specifically we should not replace it with
xulrunner-1.9.1; but if it's automatically installed we should.

LP: #2103556
</content>
</entry>
<entry>
<title>apt-pkg/solver3.h: avoid static_assert(false)</title>
<updated>2025-03-14T08:29:23Z</updated>
<author>
<name>Johannes Schauer Marin Rodrigues</name>
<email>josch@mister-muffin.de</email>
</author>
<published>2025-03-12T22:55:05Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8be7a10b43804fc4ebef712892e45bba26647d1f'/>
<id>urn:sha1:8be7a10b43804fc4ebef712892e45bba26647d1f</id>
<content type='text'>
With older compilers (g++ and clang from Bookworm), static_assert(false)
will result in:

/home/josch/git/apt/build/include/apt-pkg/solver3.h:52:24: error: static assertion failed: Cannot construct map for key type
   52 |          static_assert(false, "Cannot construct map for key type");
      |                        ^~~~~

This commit implements the terrible but more valid workaround according to:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2593r0.html

Original solution from here:
https://stackoverflow.com/questions/14637356/static-assert-fails-compilation-even-though-template-function-is-called-nowhere/14637534#14637534

That way, apt will compile with compilers in Bookworm again.
</content>
</entry>
<entry>
<title>solver3: Fix Recommends/Suggests vs Enhances confusion</title>
<updated>2025-03-12T17:52:16Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-03-12T17:34:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=a4ce187b40f3bbd110a7cc35f9a5af5a8b7b0c9e'/>
<id>urn:sha1:a4ce187b40f3bbd110a7cc35f9a5af5a8b7b0c9e</id>
<content type='text'>
We accidentally considered an Enhances a reason to keep
a package installed, which of course it is not, fix the
determination of "existing soft dependency" to only include
soft dependencies that should keep a package installed in
the autoremover to solve the issue.

This also fixes edsp/mantic-upgrade-rel-to-2024-05-29.edsp
to not install llvm-13-dev for clang-13 which is an installed
package with no upgrade.

Also ensure we stop after the first match; the DependsList()
is ordered by decreasing priority and we don't want to override
Recommends by Suggests in case a package declares both...

LP: #2101800
</content>
</entry>
<entry>
<title>solver3: Do not prefer new installs over manually installed obsoletes</title>
<updated>2025-03-09T13:53:53Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-03-09T13:52:53Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5daf6dbfd272be2f8e3c59d4bab4be8c119b7aa1'/>
<id>urn:sha1:5daf6dbfd272be2f8e3c59d4bab4be8c119b7aa1</id>
<content type='text'>
Only move obsolete packages last that are automatically installed,
as we don't want to remove manually installed obsolete packages.

Add some missing const annotations to the operator[] arguments as
well that were needed.

LP: #2100247
</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: Support pretty printing clauses</title>
<updated>2025-03-06T19:07:00Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-03-06T19:07:00Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=142d6499b51451d57fc050c71ffcfb8338e02b7e'/>
<id>urn:sha1:142d6499b51451d57fc050c71ffcfb8338e02b7e</id>
<content type='text'>
This will print the underlying dependency which is nicer to
read.
</content>
</entry>
<entry>
<title>solver3: cleanup operators for Var</title>
<updated>2025-03-06T19:06:40Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-03-04T21:23:47Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7d5fe59c19edf06cbee3e0b34d71032322907ae6'/>
<id>urn:sha1:7d5fe59c19edf06cbee3e0b34d71032322907ae6</id>
<content type='text'>
Particularly, use single line and implement operator!=
</content>
</entry>
<entry>
<title>solver3: refactor: Return inserted Clause in AddWork()</title>
<updated>2025-03-06T19:06:40Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-02-20T11:21:42Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7194a6b39c2aa6f1006630975a1bf4ffc3c9daf2'/>
<id>urn:sha1:7194a6b39c2aa6f1006630975a1bf4ffc3c9daf2</id>
<content type='text'>
This avoids relying on the inserted clause being at the back
of the clauses vector.
</content>
</entry>
<entry>
<title>solver3: Simplify Var pointer tagging</title>
<updated>2025-03-06T19:06:40Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-02-19T11:30:51Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=56c14eab8f399497295bb74d551dc49a4a763486'/>
<id>urn:sha1:56c14eab8f399497295bb74d551dc49a4a763486</id>
<content type='text'>
Use an integer and tag the lowest bit manually. This makes it
much easier to next convert this into a literal.

Add some constexpr and remove an unnecessary assertion on
CastPkg().
</content>
</entry>
<entry>
<title>Add missing #include &lt;memory&gt;</title>
<updated>2025-02-15T15:54:38Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-02-15T15:50:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=2614ff646e812e2d9515e6f0e7be076e97c9ec1a'/>
<id>urn:sha1:2614ff646e812e2d9515e6f0e7be076e97c9ec1a</id>
<content type='text'>
</content>
</entry>
</feed>
