(In reply to Martin Wilck from comment #15) > > If we just care about dkms, we could take weak_modules2 as example. It's run > like this: > > %post (or %posttrans): weak-modules2 --add-kernel > "$kernelrelease"-"$flavor" > %postun: weak-modules2 --remove-kernel "$kernelrelease"-"$flavor" > > These arguments should be sufficient for the DKMS script, too. Or not? It's supposed to get uname_r at least. But for DKMS to work we would either need to call these for both kernel binary and development binary packages (which we don't) or set a flag and call the scripts in posttrans, and even then it will not cover the case when people forget the headers and install them separately (which is fragile on Debian as well).