[Debconf-devel] Bug#908001: Removal of currently running kernel is prevented by "Failed to substitute package name in title: ..."

Ben Hutchings ben at decadent.org.uk
Wed Sep 5 19:02:38 BST 2018

Control: retitle -1 debconf: Fails to populate template cache during package removal
Control: reassign -1 src:debconf
Control: affects -1 linux-base

On Wed, 2018-09-05 at 03:00 +0200, Lars Kruse wrote:
> Package: linux-base
> Version: 4.5
> Severity: normal
> Dear Maintainer,
> I recently encountered the following situation while trying to remove the
> package of a currently running kernel:
> root at router-foo:~# apt purge linux-image-4.9.0-6-amd64
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following packages will be REMOVED:
>   linux-image-4.9.0-6-amd64*
> 0 upgraded, 0 newly installed, 1 to remove and 24 not upgraded.
> After this operation, 193 MB disk space will be freed.
> Do you want to continue? [Y/n]
> (Reading database ... 50646 files and directories currently installed.)
> Removing linux-image-4.9.0-6-amd64 (4.9.88-1+deb9u1) ...
> Failed to substitute package name in title: 10 at /usr/bin/linux-check-removal
> line 102, <STDIN> line 1. dpkg: error processing package
> linux-image-4.9.0-6-amd64 (--remove): subprocess installed pre-removal script
> returned error exit status 255 Errors were encountered while processing:
>  linux-image-4.9.0-6-amd64
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> The only specific detail of the problematic environment is probably the
> fact, that /var/cache is stored on a tmpfs and thus is regularly
> discarded on every reboot.

This is an unusual configuration, but apparently valid (according to
the FHS).

Currently debconf only populates the cache during package installation
and in dpkg-reconfigure.  This means that asking any questions during
package removal has the same problem.  I verified that the same failure
occurs when attempting to remove an old kernel package that has a
similar prompt using its own template.

I think debconf should populate the cache from package template files
on-demand, using the first part of the template name as the package


Ben Hutchings
I'm always amazed by the number of people who take up solipsism because
they heard someone else explain it. - E*Borg on alt.fan.pratchett

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/debconf-devel/attachments/20180905/641c629a/attachment.sig>

More information about the Debconf-devel mailing list