<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/debian/apt.auto-removal.sh, 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-01-04T09:46:48Z</updated>
<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>auto-removal: Ignore running kernel if attempting a reproducible build</title>
<updated>2017-03-13T15:31:38Z</updated>
<author>
<name>Chris Lamb</name>
<email>lamby@debian.org</email>
</author>
<published>2017-03-13T10:02:49Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=a9b56a0101628ac04aad0d4e50363b9c18566832'/>
<id>urn:sha1:a9b56a0101628ac04aad0d4e50363b9c18566832</id>
<content type='text'>
If one is attempting to create a reproducible ISO image we do not want to
include the build system's kernel version, not only due to it breaking
reproducibility, but it could be somewhat misleading and/or the
wrong thing to put in this file anyway.

Closes: #857632
</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>debian/apt.auto-removal.sh: Adjust -dbg exclusion for multi-arch</title>
<updated>2015-12-14T13:14:04Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2015-12-14T13:12:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d94233d865fd3e418ec4d9100741a1c4ba628533'/>
<id>urn:sha1:d94233d865fd3e418ec4d9100741a1c4ba628533</id>
<content type='text'>
Allow an optional colon followed by anything at the end.
</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>include debug information in the autoremove-kernels file</title>
<updated>2015-09-14T13:22:18Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-09-10T08:03:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8597ee543a7d1d61450542c61512295f9da4fec4'/>
<id>urn:sha1:8597ee543a7d1d61450542c61512295f9da4fec4</id>
<content type='text'>
Figuring out after the fact what went wrong in the kernel hook is kinda
hart, also as the bugreports are usually very lacking on the details
front. Collecting the internal variables in the debug output we attach
to the generated file might help shine some light on the matter.
It's at least not going to hurt…
</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>
<entry>
<title>tighten filtering of kernel images in apt.auto-removal</title>
<updated>2014-12-23T10:43:16Z</updated>
<author>
<name>James McCoy</name>
<email>jamessan@debian.org</email>
</author>
<published>2014-12-10T15:16:02Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e5ef23145f0dc6523a5c5321a21407c955777ad2'/>
<id>urn:sha1:e5ef23145f0dc6523a5c5321a21407c955777ad2</id>
<content type='text'>
The current filtering matches the names of the image metapackages on the
i386 architecture:

$ dpkg-query -l | awk '/^ii[ ]+(linux|kfreebsd|gnumach)-image-[0-9]/ &amp;&amp; $2 !~ /-dbg$/ { print $2 }'
linux-image-3.16.0-4-586
linux-image-586

This results in an extra image package being removed from
APT::NeverAutoRemove, losing the intended effect of keeping the {current,
previous, latest} set of images installed.

Requiring a “.” in the package name tightens the matched package names
to those that are installing a specific version of the image, thus
eliding the meta-packages.

Closes: 772732
</content>
</entry>
<entry>
<title>only consider versioned kernel packages in autoremove</title>
<updated>2014-03-21T10:47:56Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2014-03-21T10:47:56Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=a17482f89b636a52aacc57776bfc8041cf4da508'/>
<id>urn:sha1:a17482f89b636a52aacc57776bfc8041cf4da508</id>
<content type='text'>
Metapackages like "linux-image-amd64" are otherwise matched by our
extraction as well, which later on can't be successfully compared via
dpkg --compare-versions as the 'amd64' bit isn't a version number.
(Luckily none of our architectures starts with a digit.)

This was broken by me in 0.9.16 as I moved a shell-glob matcher to a
regex-based one which has slightly different semantics regarding '*'.

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