On Sun, 19 Feb 2023 21:36:56 +0100 Andreas Beckmann <[email protected]> wrote:
> i would therefore ask the dkms maintainers to consider making > 'BUILD_EXCLUSE_KERNEL' a soft-failure (that is ignored in the automatic > case).Not trivial.
ah, my naive assumption was that i could do something like this
```
diff --git a/etc/kernel/postinst.d/dkms b/etc/kernel/postinst.d/dkms
index c0b9cda..b1fc2ff 100755
--- a/etc/kernel/postinst.d/dkms
+++ b/etc/kernel/postinst.d/dkms
@@ -35,7 +35,17 @@ case "${uname_s}" in
esac
if [ -x
/usr/lib/etc/kernel/postinst.d/dkms/etc/kernel/postinst.d/dkms_autoinstaller
]; then
- exec
/usr/lib/etc/kernel/postinst.d/dkms/etc/kernel/postinst.d/dkms_autoinstaller
start "$inst_kern"
+
/usr/lib/etc/kernel/postinst.d/dkms/etc/kernel/postinst.d/dkms_autoinstaller
start "$inst_kern"
+ ret=$? + case $ret in + 9) + # ignore failures due to BUILD_EXCLUDE_... + ret=0 + ;; + *) + ;; + esac + exit $ret fi if ! _check_kernel_dir "$inst_kern" ; then ``` (or something simpler). which looks trivial enough. i haven't tested it though.and on second thought i see that the error-codes are used inconsistently in dkms, and what's worse they are re-used.
"9" is used for: - BUILD_EXCLUSIVE - missing write permissions on tarball - unable to install ... using rpm - missing dkms.conf fileof course, according to errno.h, '9' is EBADF, aka "Bad file number", which makes no sense in any of the cases.
sigh.so i guess a good start would be to convince upstream to issue unique (and hopefully meaningful) status-codes for the various errors...
gdmasr IOhannes
OpenPGP_signature
Description: OpenPGP digital signature

