<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/algorithms.cc, branch 2.3.4</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.3.4</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.3.4'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2021-02-12T16:13:57Z</updated>
<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>
<entry>
<title>Allow 20 instead of 10 loops for pkgProblemResolver</title>
<updated>2020-06-03T10:55:02Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-06-03T10:55:02Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=771ddb195586c638cbfc635fa6726733532bcfd0'/>
<id>urn:sha1:771ddb195586c638cbfc635fa6726733532bcfd0</id>
<content type='text'>
Especially if a lot packages have to be removed due to not to explicitly
expressed conflicts the problem resolver can take a few turns to remove
them all. Allowing it to try a little longer if needed seems beneficial
as the worst which can happen is that we now take two times as long to
present an error message to the user.
</content>
</entry>
<entry>
<title>Consider if a fix is successful before claiming it is</title>
<updated>2020-06-02T11:14:30Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-06-02T10:47:12Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8218c642342e431d7e69831bd1a6741b40345bf1'/>
<id>urn:sha1:8218c642342e431d7e69831bd1a6741b40345bf1</id>
<content type='text'>
For protected packages the "Fixing" done via KillList in the
ProblemResolver will usually not happen as the state change is not
allowed, so the debug message is just confusing and the resolver is
needlessly looping here (which might push it over the edge), so if we
didn't do our thing successfully here we short-circuit a bit to help the
next iteration come to a solution.
</content>
</entry>
<entry>
<title>Consider protected packages for removal if they are marked as such</title>
<updated>2020-05-29T10:46:59Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-29T10:46:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=33e19f1fe1655e2d6883ff8d30226fb7db02dd45'/>
<id>urn:sha1:33e19f1fe1655e2d6883ff8d30226fb7db02dd45</id>
<content type='text'>
The pkgProblemResolver incorrectly skips protected packages while
considering packages for removal, which was always wrong but is now a
lot more visible as (potentially) far more packages are considered
protected in their state.

Note that the testcase shows that we need more changes to make this
proper.
</content>
</entry>
<entry>
<title>Allow pkgDepCache to be asked to check internal consistency</title>
<updated>2020-05-24T19:02:35Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-23T14:22:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=2ba86f95bfad4ec00a3b99b311d05c158162b25c'/>
<id>urn:sha1:2ba86f95bfad4ec00a3b99b311d05c158162b25c</id>
<content type='text'>
For speed reasons pkgDepCache initializes its state once and then has a
battery of update calls you have to invoke in the right order to update
the various states – all in the name of speed. In debug and/or
simulation mode we can sacrifice this speed for a bit of extra checking
though to verify that we haven't made some critical mistake like #961266.
</content>
</entry>
</feed>
