apt-upgrade-kernel for ALTLinux

Written by evseev@altlinux.ru.
Script is last changed at 03 May 2005.
Page is last changed at 03 May 2005.

This is a simple helper that upgrades Linux kernel on APT-based system
(ALTLinux is such one)
with all kernel-related stuff: modules and low-level utils
strictly related to concrete kernel version and flavour (std-up/std-smp/...).

Rationale

First, multiple kernels can be installed on single system at same time.
Due this, APT does not perform automated kernel upgrade
via apt-get install or apt-get upgrade.
See «AllowDuplicated» section in /etc/apt/apt.conf.

Second, kernel drivers are packaged and distributed independently
from kernel core. When we install new kernel, APT does not try
to install appropriated driver modules automatically even
if their earlier versions are installed for current kernel.

Third, because having multiple choices,
we should select explicit version when install kernel or driver, for example:

How it works

enumerates via APT all kernels available to install, looks for newest;

enumerates via APT all packages depending from newest kernel;

enumerates via RPM all packages depending from currently installed kernel
and removes all records from previous enumeration if they are not present here;

displays resulting list in format needed by apt-get install.

Helper can be executed under non-root account and does not perform any system modification
so that you can manually check promoted changes before applying them.

Related stuff

update_kernel_modules by Vitaly Lipatov is a more early attempt to solve problem.
I like it but my own stuff I like a bit more :-)))

remove-kernel is another stupid helper written by me
that removes kernel (or any other RPM package) with all packages depending from it.
It may be used for cleaning previous kernel after new kernel is installed.