[Slackbuilds-users] sbo-maintainer-tools and .info-files

B. Watson urchlay at slackware.uk
Sat May 27 10:10:45 UTC 2023



On Sat, 27 May 2023, Franzen via SlackBuilds-users wrote:

> Hi,
>
> i have build where sbopkglint complaints:
> --- package has info files, but doinst.sh does not call install-info
> FAILED
>
> There is no info on SBo what the "best practice" is for .info-files in 
> doinst.sh.
> Maybe put some info in the templates?

Yeah, that would be a good idea. Actually there was an example
install-info command in the doinst template until recently...

> https://slackbuilds.org/templates/doinst.sh
> if [ -x /usr/bin/install-info ]; then
>  /usr/bin/install-info --info-dir=usr/info usr/info/PRGNAM.info.gz 2> 
> /dev/null
> fi

Looks OK to me. The previous template used chroot, and that bit of
template got removed last week, but not replaced with anything (yet).
The above looks like a good candidate, unless someone else sees
something wrong with it?

> https://slackbuilds.org/templates/douninst.sh
> if [ -x /usr/bin/install-info ]; then
>  /usr/bin/install-info --remove --info-dir=usr/info usr/info/PRGNAM.info.gz 
> 2> /dev/null
> fi

Won't work. douninst.sh runs after all the files have been removed,
and install-info can't remove the info file if it's deleted (it needs
the file to find out the human-readable name in the info dir).

> Or, does this not work for douninst.sh, and needs to be done this 
> way(re-generate /usr/info/dir)?
> if [ -x /usr/bin/install-info -a -d usr/info ]; then
>  ( cd usr/info
>    rm -f dir
>    for i in *.info*; do /usr/bin/install-info $i dir 2>/dev/null; done
>  )
> fi

I think that's the right way to do it. I use that in a few of my
builds, and it should go in the douninst.sh template.

douninst.sh is new enough that we haven't really given it enough
thought yet. For instance, anything that installs fonts and calls
mkfontscale and/or mkfontfir and/or fc-cache in doinst, should run the
commands again in douninst to clean up afterwards. Avoids seeing old
unusable entries in lists of fonts in applications (e.g. selecting the
font in a terminal, or a word processor).

Other candidates would be update-desktop-database, update-icon-cache,
glib-compile-schemas. Not being a 'desktop' user (I use Windowmaker,
not KDE or XFCE), I'm not sure what happens when a .desktop file or an
icon gets removed from the filesystem but is still in the cache.


More information about the SlackBuilds-users mailing list