The kernel linux-image-extras-* package intentionally calls postinst scripts even when it is rmeoved. This is required because after its removal you have still have the kernel installed though in a very slimmed down form; one which is valid for booting in a VM for instance. The postrm for the linux-image-* package will call the required postrm when and if the whole kernel is removed. We have to call all of the postinst (not just update-initramfs as we cannot know what else needs to care that the initramfs has changed; typically the bootloader which is informed of the kernel change via the /etc/kernel/* hooks. Without this the initramfs can get built without the contents of the -extras package, bootloaders can consume _that_ version and you have an unbootable system even though you subsequently installed linux-image-extra-*.
All of the scripts in the /etc/kernel/* hook directories need to be careful to view the world in the context of the installed system and idempotent against rerunning as they are part of postinst/postrm which has this requirement. If they are breaking in the face of this occuring the hooks are broken and we need to fix them. It sounds like apt-auto-remove was incorrectly calculating the list of kernels in the past, but I understand that is fixed. Is there any other hook known to cause issues. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1501884 Title: linux-image-extra-*-generic postrm script runs install actions To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1501884/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
