<div>Hello list,<br></div><div><br></div><div>(This question pertains to -current, not 14.2).<br></div><div><br></div><div>I want to ask about allowable/preferred behavior in doinst.sh and douninst.sh.<br></div><div><br></div><div>Motivation:  I maintain a package (system76-io-dkms) that makes use of dkms.  This allows new kernel modules to be automatically built for new kernel versions without requiring a package rebuild.  Obviously these files won't be tracked by pkgtools, but they are tracked by dkms.  The desire then is that when removing the package (by removepkg) it calls out to dkms to remove all files.<br></div><div><br></div><div>Hurdles in implementation: removepkg removes all package files before calling douninst.sh, so any configuration files owned by the package won't be available by douninst.sh.  This complicates using dkms.<br></div><div><br></div><div>Solution: Lucky for me another user described a simple solution: <a href="https://www.linuxquestions.org/questions/slackware-14/how-can-removepkg-be-triggered-to-remove-stuff-placed-by-a-doinst-sh-4175672073/page4.html#post6109767">https://www.linuxquestions.org/questions/slackware-14/how-can-removepkg-be-triggered-to-remove-stuff-placed-by-a-doinst-sh-4175672073/page4.html#post6109767</a>.  Create a copy of the dkms configuration file in doinst.sh.  This will create a file that is not tracked by pkgtools.  Now in douninst.sh use that file to call out to dkms to remove the remaining modules that may have been automatically built, and finally remove that file.  The end result is that after calling removepkg no more files remain on the filesystem from the package.<br></div><div><br></div><div>Here is the patch to system76-io-dkms that implements this behavior: <a href="https://gitlab.com/ErichRitz/slackbuilds/-/commit/9c48fe02ac32c382fdac871373054865642440f0">https://gitlab.com/ErichRitz/slackbuilds/-/commit/9c48fe02ac32c382fdac871373054865642440f0</a><br></div><div><br></div><div>Question: is this behavior acceptable for SBo?  I would assume so, but so far there is only 1 other package that makes use of douninst.sh (nvidia-legacy390-driver), so I thought it best to ask first.<br></div><div><br></div><div>Erich<br></div><div class="protonmail_signature_block protonmail_signature_block-empty"><div class="protonmail_signature_block-proton protonmail_signature_block-empty"></div></div><div><br></div>