[Slackbuilds-users] douninst.sh in SBo packages

Jheengut Pritvi z.coldplayer at gmail.com
Wed Oct 27 18:53:31 UTC 2021


you might have given the answer with  nvidia-legacy script. I do not
remember douninst.sh being documented.  Need to check that .

On Wed, 27 Oct 2021 at 19:09, Erich Ritz via SlackBuilds-users <
slackbuilds-users at slackbuilds.org> wrote:

> Hello list,
>
> (This question pertains to -current, not 14.2).
>
> I want to ask about allowable/preferred behavior in doinst.sh and
> douninst.sh.
>
> 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.
>
> 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.
>
> Solution: Lucky for me another user described a simple solution:
> https://www.linuxquestions.org/questions/slackware-14/how-can-removepkg-be-triggered-to-remove-stuff-placed-by-a-doinst-sh-4175672073/page4.html#post6109767.
> 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.
>
> Here is the patch to system76-io-dkms that implements this behavior:
> https://gitlab.com/ErichRitz/slackbuilds/-/commit/9c48fe02ac32c382fdac871373054865642440f0
>
> 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.
>
> Erich
>
> _______________________________________________
> SlackBuilds-users mailing list
> SlackBuilds-users at slackbuilds.org
> https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - https://slackbuilds.org/faq/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20211027/11367dac/attachment-0001.htm>


More information about the SlackBuilds-users mailing list