<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/algorithms.cc, branch 2.7.9</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.7.9</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.7.9'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2023-07-05T08:57:26Z</updated>
<entry>
<title>dist-upgrade: Revert phased updates using keeps only</title>
<updated>2023-07-05T08:57:26Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2023-07-03T09:13:00Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=89dd48bdea93849246fc33b447d6d7ad52bb1c4b'/>
<id>urn:sha1:89dd48bdea93849246fc33b447d6d7ad52bb1c4b</id>
<content type='text'>
In the bug, mutter was kept back due to phasing and the new gnome-shell
depended on that, and was therefore kept back as well, however,
gnome-shell-common was not broken, and apt decided to continue upgrading
it by removing gnome-shell and the ubuntu desktop meta packages.

This is potentially a regression of LP#1990586 where we added keep
back calls to the start of the dist-upgrade to ensure that we do not
mark stuff for upgrade in the first place that depends on phasing
updates, however it was generally allowed by the resolver to also
do those removals.

To fix this, we need to resolve the update normally and then use
ResolveByKeepInternal to keep back any changes broken by held back
packages.

However, doing so breaks test-bug-591882-conkeror because ResolveByKeep
keeps back packages for broken Recommends as well, which is not
something we generally want to do in a dist-upgrade after we already
decided to upgrade it.

To circumvent that issue, extend the pkgProblemResolver to allow
a package to be policy broken, and mark all packages that already
were already going to be policy broken to be allowed to be that,
such that we don't try to undo their installs.

LP: #2025462
</content>
</entry>
<entry>
<title>Keep "or group" when installing package to satisfy it</title>
<updated>2023-05-02T11:59:45Z</updated>
<author>
<name>Jacob Kauffmann</name>
<email>jacob@system76.com</email>
</author>
<published>2023-05-02T11:59:45Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5f9552801139e6ea8d84db20692561b79cda6d00'/>
<id>urn:sha1:5f9552801139e6ea8d84db20692561b79cda6d00</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Check state of dependency, not dependee in dependency keep back</title>
<updated>2022-09-28T14:32:44Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2022-09-26T10:33:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f93a5aa2daa92255c75865b6f92dddb4b072ff33'/>
<id>urn:sha1:f93a5aa2daa92255c75865b6f92dddb4b072ff33</id>
<content type='text'>
When iterating over I's dependencies (which are called Pkg), we
accidentally checked if I was Protected() instead of Pkg when deciding
whether Pkg can be kept back.

LP: #1990684
</content>
</entry>
<entry>
<title>Only protect two kernels, not last installed one</title>
<updated>2022-04-07T11:19:52Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2022-04-06T11:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=824651ded0bcf8603e9b508860b8fe5a68fc53ff'/>
<id>urn:sha1:824651ded0bcf8603e9b508860b8fe5a68fc53ff</id>
<content type='text'>
The kernel autoremoval algorithm was written to accomodate
for Ubuntu's boot partition sizing, which was written to
accomodate 3 kernels - 2 installed ones + a new one being
unpacked.

It seems that when the algorithm was designed, it was overlooked
that it actually kept 3 kernels.

LP: #1968154
</content>
</entry>
<entry>
<title>kernels: Avoid std::regex for escaping '.' and '+'</title>
<updated>2021-02-12T16:13:57Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-02-12T16:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5bfc150688ea748595b6535eb1dc5d777baf16e4'/>
<id>urn:sha1:5bfc150688ea748595b6535eb1dc5d777baf16e4</id>
<content type='text'>
std::regex pulls in about 50 weak symbols which is complete and
utter madness, especially because we version all our symbols, so no
other library could ever reuse them.

Avoid using the regular expression here all together, loop using
string::find_first_of() and insert backslashes with strng::insert().
</content>
</entry>
<entry>
<title>kernels: Fix std::out_of_range if no kernels to protect</title>
<updated>2021-01-11T10:37:11Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-01-11T10:37:11Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=edb63b14225c783c673dcac0cc3c60aae076e45c'/>
<id>urn:sha1:edb63b14225c783c673dcac0cc3c60aae076e45c</id>
<content type='text'>
In case we did not find any kernels to protect, the regular expression
will be empty, and trying to substr(1) it will fail.
</content>
</entry>
<entry>
<title>kernels: remove spurious || false</title>
<updated>2021-01-08T17:03:08Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-01-08T17:03:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=24984ac47b0172400e575ad44ed60bb22543298b'/>
<id>urn:sha1:24984ac47b0172400e575ad44ed60bb22543298b</id>
<content type='text'>
Gbp-Dch: ignore
</content>
</entry>
<entry>
<title>Only keep up to 3 (not 4) kernels</title>
<updated>2021-01-04T09:54:42Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-12-17T14:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=38c49b8adeadf54f147140b3a5db7693e9b9b50f'/>
<id>urn:sha1:38c49b8adeadf54f147140b3a5db7693e9b9b50f</id>
<content type='text'>
This fixes a problem on Ubuntu systems where the /boot partition
has been sized to manage 3 kernels, but does not really work with 4
kernels which was causing problems all over the place.
</content>
</entry>
<entry>
<title>Determine autoremovable kernels at run-time</title>
<updated>2021-01-04T09:46:48Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-12-17T12:24:56Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=04085f46dea9a95dd86123ac00187a63cc4ba2c0'/>
<id>urn:sha1:04085f46dea9a95dd86123ac00187a63cc4ba2c0</id>
<content type='text'>
Our kernel autoremoval helper script protects the currently booted
kernel, but it only runs whenever we install or remove a kernel,
causing it to protect the kernel that was booted at that point in time,
which is not necessarily the same kernel as the one that is running
right now.

Reimplement the logic in C++ such that we can calculate it at run-time:
Provide a function to produce a regular expression that matches all
kernels that need protecting, and by changing the default root set
function in the DepCache to make use of that expression.

Note that the code groups the kernels by versions as before, and then
marks all kernel packages with the same version.

This optimized version inserts a virtual package $kernel into the cache
when building it to avoid having to iterate over all packages in the
cache to find the installed ones, significantly improving performance at
a minor cost when building the cache.

LP: #1615381
</content>
</entry>
<entry>
<title>Add dependency points in the resolver also to providers</title>
<updated>2020-07-02T16:57:11Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-06-19T16:49:11Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=1f910d94add8f20ebfa5999a7795e678a4af0826'/>
<id>urn:sha1:1f910d94add8f20ebfa5999a7795e678a4af0826</id>
<content type='text'>
We were traditionally adding points for some dependency types to the
real package, but we should also do it for providers of that package to
help the resolver especially if the real package is for some reason not
tagged for removal yet/anymore.

While at it we ensure that the points are only attributed once for each
package as especially with versioned provides a package can nowadays
provide another many times and would hence acquire a lot of points.
</content>
</entry>
</feed>
