[arch-dev-public] out of tree modules and alpm-hooks

Sébastien Luttringer seblu at seblu.net
Fri Feb 19 15:12:21 UTC 2016

On ven., 2016-02-19 at 08:12 +0100, Maxime Gauduin wrote:
> On Fri, Feb 19, 2016 at 2:27 AM, Sébastien Luttringer <seblu at seblu.net>
> wrote:
> What about when you remove a dkms package? Would be nice to remove the
> build modules as well.
This is done by post install scriplet[1] of each dkms module package (e.g it
calls "dkms remove vhosthost/${1%-*} --all").

Name and version of the dkms modules to remove is not easy to guess in a global
hook. Also note that a dkms module can build several kernel modules.

That's also why registering (dkms add) of the modules is done by install

Only the build/install of registered modules are done by the hook in order to
schedule them properly.

> With these hooks [1] designed for kernel transaction, we will have complete
> support of oot modules in pacman.
I didn't tried them but I don't get how this can works when you install/update
a dkms module. 

Your dkms-install hook is triggered by files installation in /usr/lib/modules,
but dkms packages didn't do that at all. They write these files in
/usr/src/$foo and register the dkms module with dkms add.

Files are copied in /usr/lib/modules when you run "dkms install" (so not under
the watch of alpm), so it make no sense to call dkms install again when file
are here.

[1] https://projects.archlinux.org/svntogit/packages.git/tree/trunk/nvidia-dkms

Sébastien "Seblu" Luttringer
https://seblu.net | Twitter: @seblu42
GPG: 0x2072D77A

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: This is a digitally signed message part
URL: <https://lists.archlinux.org/pipermail/arch-dev-public/attachments/20160219/005e8e14/attachment.asc>

More information about the arch-dev-public mailing list