Skip to content

Only flash fully "installed" kernels

In Ubuntu, we've recently run into a rather sticky issue (LP: #2007827) in which, during a run of apt upgrade, flash-kernel was attempting to flash a kernel version that was still awaiting generation of its corresponding initrd (specifically, the kernel package was still in the triggers-pending state). This came on the back of a fix to another (much older) issue (LP: #1667742) to prevent flash-kernel from "missing" runs when both it and the kernel are upgraded in a single run of apt.

I'm not 100% certain that this is relevant to Debian, but I have a suspicion it might be based on a reading of Debian bug #781742, so I'm forwarding this merge request on the off-chance it's useful.

There are three commits here which each appear to fix separate issues but I think they're all at least somewhat related as I think the recent issue (flashing not-fully-installed kernels) only occurred after the earlier issue (missing flash-kernel invocations) was fixed. The middle commit is only semi-related but prevents a repeated (redundant) run of handle_dtb (which I typically see during kernel upgrades) and also prevents the nonsensical case of running flash-kernel --force without specifying a kernel version.

Do let me know if this would be better split into separate requests (I'm happy to split/rebase as wanted), or if any further information / context is wanted!

Merge request reports

Loading