DKMS now handles obsolete modules

Gary_Lerhaupt@Dell.com Gary_Lerhaupt@Dell.com
Wed Nov 5 16:01:00 2003


DKMS 0.44.05 is out (lerhaupt.com/dkms)

With it, I added the DKMS directive array MODULES_CONF_OBSOLETES[#].  This
is a comma-delimited list of modules that your newer module oboletes.  If a
corresponding entry in the MODULES_CONF_ALIAS_TYPE[#] is set and any of
these entries are found in /etc/modules.conf, the obsolete references are
replaced with the new module references during install of your module.

Likewise, during uninstall, this also helps DKMS.  If an original_module
name of the newer module was found in your kernel, then the new module name
in modules.conf will persist.  However, if no original module exists in your
kernel, but an obsolete module does, DKMS will first put this obsolete
module reference in modules.conf before remaking your initrd.  If neither an
original module or an obsolete module exists, it just removes the reference
all together.

If DKMS puts back the reference to the obsolete one, then after making the
initrd it will then put it back to the new reference.  This is so
/etc/modules.conf remains generally consistent while your module is still
added to the DKMS tree.  Generally, I am of the opinion that there should be
one modules.conf file per kernel since each kernel has or could have
different module configurations.  Since this is not a reality now, DKMS has
to try to do what is best and most consistent.  So with the new OBSOLETES
array, it allows for an automatic remaking of an initrd with an obsolete
reference but then makes sure to switch back /etc/modules.conf to the newer
reference because, after all, this is what is in your DKMS tree.

When you finally remove the module from your DKMS tree, only then will it
permanently remove the new reference from your tree (unless your kernel has
an original module by that name).

If you made it this far, you are likely confused, but I assure you that
after much deliberation, this is the right way to go about it.  In a perfect
world, we'd have a 1:1 ration between modules.conf files and kernels.

Gary Lerhaupt
Dell Linux Development