<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/test/integration/test-kernel-helper-autoremove, branch 2.9.1</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.9.1</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.9.1'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2022-04-07T11:19:52Z</updated>
<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>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>Widen regular expressions for versioned kernel packages</title>
<updated>2020-01-30T15:58:23Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2019-04-15T07:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=4f9c58d25ff52fbb69cd3439fc1484bea47e1566'/>
<id>urn:sha1:4f9c58d25ff52fbb69cd3439fc1484bea47e1566</id>
<content type='text'>
Since we append a concrete kernel version to each pattern, and then
anchor the pattern, let's just pick any package starting with a
kernel name (linux-, kfreebsd-, gnumach-), and not worry about
linux-headers, linux-tools, etc specifically, as they'll be caught
by the generic pattern.

LP: #1607845
</content>
</entry>
<entry>
<title>support COLUMNS environment variable in apt tools</title>
<updated>2017-11-19T17:26:19Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-11-18T02:48:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3f8664036e63d2a2d58120ab6c1e8a0a09937c71'/>
<id>urn:sha1:3f8664036e63d2a2d58120ab6c1e8a0a09937c71</id>
<content type='text'>
apt usually gets the width of the window from the terminal or failing
that has a default value, but especially for testing it can be handy
to control the size as you can't be sure that variable sized content
will always be linebreaked as expected in the testcases.
</content>
</entry>
<entry>
<title>Lower-case uname -r output in kernel autoremove helper</title>
<updated>2016-08-26T20:24:24Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-08-24T14:28:47Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=15134a8e5458fc634482386f1fd2acbccc3ac892'/>
<id>urn:sha1:15134a8e5458fc634482386f1fd2acbccc3ac892</id>
<content type='text'>
This is needed on FreeBSD which has versions like 11.0-RC1,
otherwise the tests would fail.
</content>
</entry>
<entry>
<title>Add kernels with "+" in the package name to APT::NeverAutoRemove</title>
<updated>2016-07-08T06:44:05Z</updated>
<author>
<name>Andrew Patterson</name>
<email>andrew.patterson@hpe.com</email>
</author>
<published>2016-07-06T19:40:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=130176bcb6ce65c98d5692196c55cc18b4c210e0'/>
<id>urn:sha1:130176bcb6ce65c98d5692196c55cc18b4c210e0</id>
<content type='text'>
Escape "+" in kernel package names when generating APT::NeverAutoRemove
list so it is not treated as a regular expression meta-character.

[Changed by David Kalnischkies: let test actually test the change]

Closes: #830159
</content>
</entry>
<entry>
<title>tests: support spaces in path and TMPDIR</title>
<updated>2015-12-19T22:04:34Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-12-15T16:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3abb6a6a1e485b3bc899b64b0a1b7dc2db25a9c2'/>
<id>urn:sha1:3abb6a6a1e485b3bc899b64b0a1b7dc2db25a9c2</id>
<content type='text'>
This doesn't allow all tests to run cleanly, but it at least allows to
write tests which could run successfully in such environments.

Git-Dch: Ignore
</content>
</entry>
<entry>
<title>suggest 'apt autoremove' to get right of unneeded packages</title>
<updated>2015-11-04T17:04:01Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-10-16T10:54:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=73fe49f9b4748eddb5a2dad4f0abb51a8f63564c'/>
<id>urn:sha1:73fe49f9b4748eddb5a2dad4f0abb51a8f63564c</id>
<content type='text'>
The bugreport is more conservative in asking for a conditional, but
given that this is a message intended to be read by users to be run by
users we should suggest using a command intended to be used by users.

And while we are at, add sudo to the message – conditional of course.

Closes: 801571
</content>
</entry>
<entry>
<title>tests: try to support spaces in TMPDIR</title>
<updated>2015-09-14T13:22:19Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-09-14T00:26:13Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=63c7141275c8c5c0f6e60f5242785e50cabaf2a0'/>
<id>urn:sha1:63c7141275c8c5c0f6e60f5242785e50cabaf2a0</id>
<content type='text'>
Not all tests work yet, most notable the cdrom tests, but those require
changes in libapt itself to have a proper fix and what we have fixed so
far is good enough progress for now.

Git-Dch: Ignore
</content>
</entry>
<entry>
<title>select kernels to protect from autoremove based on Debian version</title>
<updated>2015-09-14T13:22:18Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-09-08T10:49:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3196dae8e92407b3aa8e12779a8ed7db998ebdc4'/>
<id>urn:sha1:3196dae8e92407b3aa8e12779a8ed7db998ebdc4</id>
<content type='text'>
This is basically a rewrite of the script with the general idea of
finding the Debian version of the installed kernels – as multiple
flavours will have the same Debian version – select the two newest of
them and translate them back to versions found in package names.

This way we avoid e.g. kernel and kernel-rt to use up the protected
slots even through they are basically the same kernel (just a different
flavour) so it is likely that if kernel doesn't work for some reason,
kernel-rt will not either.

This also deals with foreign kernel packages, kernels on hold and partly
installed kernels (in case multiple kernels are installed in the same
apt run) in a hopefully sensible way.

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