-
When flash-kernel runs as part of a kernel installation, that kernel may not be in the fully "installed" state. If it's a newly installed kernel, it may also be in "triggers-pending" in which case, while the symlinks for vmlinuz-$ver and initrd.img-$ver exist, the initrd itself does not yet exist (because the initramfs-tools trigger has not yet run, so the initrd symlink is "dead"). In this case, depending on the "method" selected for the board, the f-k run may crash (aborting apt), or may continue but flash a non-functional boot setup. In the latter case, this usually corrects itself with a later run of f-k but it still potentially leaves the system in an unbootable state for some portion of an apt run (which is not ideal). This commit adds a check on the status of the package which owns the kernel version requested to be installed. If it is not fully "installed", it defers the f-k run (under the assumption it will become installed at some point in the apt run). This can be overridden with "--force". Tests are included for the new function. Related issues: LP: #2007827, LP: #1861292, Debian bug #781742
When flash-kernel runs as part of a kernel installation, that kernel may not be in the fully "installed" state. If it's a newly installed kernel, it may also be in "triggers-pending" in which case, while the symlinks for vmlinuz-$ver and initrd.img-$ver exist, the initrd itself does not yet exist (because the initramfs-tools trigger has not yet run, so the initrd symlink is "dead"). In this case, depending on the "method" selected for the board, the f-k run may crash (aborting apt), or may continue but flash a non-functional boot setup. In the latter case, this usually corrects itself with a later run of f-k but it still potentially leaves the system in an unbootable state for some portion of an apt run (which is not ideal). This commit adds a check on the status of the package which owns the kernel version requested to be installed. If it is not fully "installed", it defers the f-k run (under the assumption it will become installed at some point in the apt run). This can be overridden with "--force". Tests are included for the new function. Related issues: LP: #2007827, LP: #1861292, Debian bug #781742
functions 32.36 KiB