<div dir="ltr">you might have given the answer with nvidia-legacy script. I do not remember douninst.sh being documented. Need to check that .<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 27 Oct 2021 at 19:09, Erich Ritz via SlackBuilds-users <<a href="mailto:slackbuilds-users@slackbuilds.org">slackbuilds-users@slackbuilds.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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" target="_blank">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" target="_blank">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><div></div></div><div><br></div>_______________________________________________<br>
SlackBuilds-users mailing list<br>
<a href="mailto:SlackBuilds-users@slackbuilds.org" target="_blank">SlackBuilds-users@slackbuilds.org</a><br>
<a href="https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users" rel="noreferrer" target="_blank">https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a><br>
Archives - <a href="https://lists.slackbuilds.org/pipermail/slackbuilds-users/" rel="noreferrer" target="_blank">https://lists.slackbuilds.org/pipermail/slackbuilds-users/</a><br>
FAQ - <a href="https://slackbuilds.org/faq/" rel="noreferrer" target="_blank">https://slackbuilds.org/faq/</a><br>
<br>
</blockquote></div>