feature to keep old/previous package when upgrading kernel
Two problems:
- when kernel package is upgraded, modprobe will stop working til machine is rebooted, because old kernel modules were deleted.
- it would be nice to keep old kernel around for a while, in case new kernel is broken. For example as
/boot/vmlinuz-lts.old
Possible solution:
We could have a virtual .old
or .previous
package. When flagged packages (linux-lts
would have a flag of some sort) apk would on upgrade transfer ownership of the old package to this virtual package. Files that would be deleted are kept, and files that would be replaced could get a .old
suffix.
The result would be that /lib/modules/<old-version>
are transferred to virtual linux-lts.old
, and /boot/vmlinuz-lts
are kept as /boot/vmlinuz-lts.old
. User can then chose to keep this til next time linux-lts is upgraded or for example clean up .old as last step during bootup. (for example apk del '*.old'
or similar)
This way modprobe
will continue work after an apk upgrade
and user can have a vmlinuz-lts.old fallback in boot loader in case new kernel is broken.
Any package could be flagged with 'keep-old' but I think it mostly makes sense for linux kernels.