xbps-triggers: add texmf-dist regeneration trigger

This commit is contained in:
fosslinux 2020-07-05 11:39:30 +10:00 committed by Daniel Kolesa
parent 92fd1c57cc
commit 102841754a
5 changed files with 82 additions and 42 deletions

View File

@ -64,6 +64,7 @@ packages for XBPS, the `Void Linux` native packaging system.
* [pycompile](#triggers_pycompile)
* [register-shell](#triggers_register_shell)
* [system-accounts](#triggers_system_accounts)
* [texmf-dist](#triggers_texmf_dist)
* [update-desktopdb](#triggers_update_desktopdb)
* [x11-fonts](#triggers_x11_fonts)
* [xml-catalog](#triggers_xml_catalog)
@ -1907,6 +1908,20 @@ Example: `transmission unprivileged user - for uninstalled package transmission`
This trigger can only be used by using the `system_accounts` variable.
<a id="triggers_texmf_dist"></a>
#### texmf-dist
The texmf-dist trigger is responsible for regenerating TeXLive's texmf databases.
During both installation and removal, it regenerates both the texhash and format
databases using `texhash` and `fmtutil-sys`, to add or remove any new hashes or
formats.
It runs on every package that changes /usr/share/texmf-dist. This is likely overkill,
but it is much cleaner rather than checking each format directory and each directory
that is hashed. In addition, it is very likely any package touching /usr/share/texmf-dist
requires one of these triggers anyway.
<a id="triggers_update_desktopdb"></a>
#### update-desktopdb

View File

@ -4,8 +4,8 @@ dvips/base/crop.pro texlive
dvips/base/finclude.pro texlive
dvips/base/hps.pro texlive
dvips/base/special.pro texlive
dvips/base/tex.pro texlive
dvips/base/texc.pro texlive
dvips/base/tex.pro texlive
dvips/base/texps.pro texlive
dvips/gsftopk/render.ps texlive
dvips/xdvi/config.xdvi texlive
@ -23,7 +23,6 @@ scripts/adhocfilelist/adhocfilelist.sh texlive
scripts/arara/arara.sh texlive
scripts/attachfile2/pdfatfi.pl texlive
scripts/authorindex/authorindex texlive
scripts/authorindex/authorindex texlive
scripts/bib2gls/bib2gls.sh texlive
scripts/bib2gls/convertgls2bib.sh texlive
scripts/bibexport/bibexport.sh texlive
@ -37,11 +36,11 @@ scripts/cjk-gs-integrate/cjk-gs-integrate.pl texlive
scripts/clojure-pamphlet/pamphletangler texlive
scripts/cluttex/cluttex.lua texlive
scripts/context/perl/mptopdf.pl texlive
scripts/context/stubs/unix/context texlive
scripts/context/stubs/unix/contextjit texlive
scripts/context/stubs/unix/context texlive
scripts/context/stubs/unix/luatools texlive
scripts/context/stubs/unix/mtxrun texlive
scripts/context/stubs/unix/mtxrunjit texlive
scripts/context/stubs/unix/mtxrun texlive
scripts/context/stubs/unix/texexec texlive
scripts/context/stubs/unix/texmfstart texlive
scripts/convbkmk/convbkmk.rb texlive-langjapanese
@ -51,9 +50,9 @@ scripts/crossrefware/bibmradd.pl texlive
scripts/crossrefware/biburl2doi.pl texlive
scripts/crossrefware/bibzbladd.pl texlive
scripts/crossrefware/ltx2crossrefxml.pl texlive
scripts/ctan-o-mat/ctan-o-mat.pl texlive
scripts/ctanbib/ctanbib texlive
scripts/ctanify/ctanify texlive
scripts/ctan-o-mat/ctan-o-mat.pl texlive
scripts/ctanupload/ctanupload.pl texlive
scripts/de-macro/de-macro texlive
scripts/diadia/diadia.lua texlive-humanities
@ -61,11 +60,10 @@ scripts/dosepsbin/dosepsbin.pl texlive
scripts/dtxgen/dtxgen texlive
scripts/dviasm/dviasm.py texlive
scripts/dviinfox/dviinfox.pl texlive
scripts/epspdf/epspdf.tlu texlive
scripts/epspdf/epspdftk.tcl texlive
scripts/epspdf/epspdf.tlu texlive
scripts/epstopdf/epstopdf.pl texlive
scripts/exceltex/exceltex texlive
scripts/exceltex/exceltex texlive
scripts/fig4latex/fig4latex texlive-pictures
scripts/findhyph/findhyph texlive
scripts/fontools/afm2afm texlive
@ -73,10 +71,8 @@ scripts/fontools/autoinst texlive
scripts/fontools/ot2kpx texlive
scripts/fragmaster/fragmaster.pl texlive
scripts/getmap/getmapdl.lua texlive
scripts/glossaries/makeglossaries texlive
scripts/glossaries/makeglossaries texlive
scripts/glossaries/makeglossaries-lite.lua texlive
scripts/glossaries/makeglossaries-lite.lua texlive
scripts/glossaries/makeglossaries texlive
scripts/installfont/installfont-tl texlive
scripts/jfmutil/jfmutil.pl texlive
scripts/ketcindy/ketcindy.pl texlive
@ -84,17 +80,17 @@ scripts/kotex-utils/jamo-normalize.pl texlive-langkorean
scripts/kotex-utils/komkindex.pl texlive-langkorean
scripts/kotex-utils/ttf2kotexfont.pl texlive-langkorean
scripts/l3build/l3build.lua texlive-latexextra
scripts/latex-git-log/latex-git-log texlive
scripts/latex-papersize/latex-papersize.py texlive
scripts/latex2man/latex2man texlive
scripts/latex2nemeth/latex2nemeth texlive
scripts/latexdiff/latexdiff-vc.pl texlive
scripts/latexdiff/latexdiff.pl texlive
scripts/latexdiff/latexdiff-vc.pl texlive
scripts/latexdiff/latexrevise.pl texlive
scripts/latexfileversion/latexfileversion texlive
scripts/latex-git-log/latex-git-log texlive
scripts/latexindent/latexindent.pl texlive
scripts/latexmk/latexmk.pl texlive
scripts/latexpand/latexpand texlive
scripts/latex-papersize/latex-papersize.py texlive
scripts/lilyglyphs/lily-glyph-commands.py texlive-music
scripts/lilyglyphs/lily-image-commands.py texlive-music
scripts/lilyglyphs/lily-rebuild-pdfs.py texlive-music
@ -104,23 +100,18 @@ scripts/ltxfileinfo/ltxfileinfo texlive
scripts/ltximg/ltximg.pl texlive
scripts/luaotfload/luaotfload-tool.lua texlive
scripts/lwarp/lwarpmk.lua texlive
scripts/m-tx/m-tx.lua texlive-music
scripts/make4ht/make4ht texlive
scripts/makedtx/makedtx.pl texlive
scripts/makedtx/makedtx.pl texlive
scripts/match_parens/match_parens texlive
scripts/mathspic/mathspic.pl texlive-pictures
scripts/mf2pt1/mf2pt1.pl texlive
scripts/mkgrkindex/mkgrkindex texlive-langgreek
scripts/mkjobtexmf/mkjobtexmf.pl texlive
scripts/mkpic/mkpic texlive-pictures
scripts/m-tx/m-tx.lua texlive-music
scripts/multibibliography/multibibliography.pl texlive
scripts/musixtex/musixflx.lua texlive-music
scripts/musixtex/musixtex.lua texlive-music
scripts/mf2pt1/mf2pt1.pl texlive
scripts/mkjobtexmf/mkjobtexmf.pl texlive
scripts/multibibliography/multibibliography.pl texlive
scripts/pax/pdfannotextractor.pl texlive
scripts/pax/pdfannotextractor.pl texlive
scripts/pdfbook2/pdfbook2 texlive
scripts/pdfcrop/pdfcrop.pl texlive
@ -130,7 +121,6 @@ scripts/pdftex-quiet/pdftex-quiet texlive
scripts/pdfxup/pdfxup texlive
scripts/pedigree-perl/pedigree.pl texlive-pstricks
scripts/perltex/perltex.pl texlive
scripts/perltex/perltex.pl texlive
scripts/petri-nets/pn2pdf texlive
scripts/pfarrei/a5toa4.tlu texlive
scripts/pfarrei/pfarrei.tlu texlive
@ -138,20 +128,16 @@ scripts/pkfix-helper/pkfix-helper texlive
scripts/pkfix/pkfix.pl texlive
scripts/pmxchords/pmxchords.lua texlive-music
scripts/ps2eps/ps2eps.pl texlive
scripts/pst-pdf/ps4pdf texlive-pstricks
scripts/pst2pdf/pst2pdf.pl texlive-pstricks
scripts/pst-pdf/ps4pdf texlive-pstricks
scripts/psutils/extractres.pl texlive
scripts/psutils/includeres.pl texlive
scripts/psutils/psjoin.pl texlive
scripts/ptex2pdf/ptex2pdf.lua texlive
scripts/ptex-fontmaps/kanji-config-updmap.pl texlive-langjapanese
scripts/ptex-fontmaps/kanji-config-updmap-sys.sh texlive-langjapanese
scripts/ptex-fontmaps/kanji-config-updmap-user.sh texlive-langjapanese
scripts/ptex-fontmaps/kanji-config-updmap.pl texlive-langjapanese
scripts/ptex-fontmaps/kanji-fontmap-creator.pl texlive-langjapanese
scripts/ptex2pdf/ptex2pdf.lua texlive
scripts/ps2eps/ps2eps.pl texlive
scripts/psutils/extractres.pl texlive
scripts/psutils/includeres.pl texlive
scripts/psutils/psjoin.pl texlive
scripts/purifyeps/purifyeps texlive
scripts/pygmentex/pygmentex.py texlive-latexextra
scripts/pythontex/depythontex.py texlive
@ -159,11 +145,9 @@ scripts/pythontex/pythontex.py texlive
scripts/rubik/rubikrotation.pl texlive-games
scripts/simpdftex/simpdftex texlive
scripts/splitindex/splitindex.pl texlive
scripts/splitindex/splitindex.pl texlive
scripts/srcredact/srcredact.pl texlive
scripts/sty2dtx/sty2dtx.pl texlive
scripts/svn-multi/svn-multi.pl texlive
scripts/svn-multi/svn-multi.pl texlive
scripts/tex4ebook/tex4ebook texlive
scripts/texcount/texcount.pl texlive
scripts/texdef/texdef.pl texlive
@ -172,7 +156,6 @@ scripts/texdirflatten/texdirflatten texlive
scripts/texdoc/texdoc.tlu texlive
scripts/texdoctk/texdoctk.pl texlive
scripts/texfot/texfot.pl texlive
scripts/texlive/tlmgr.pl texlive
scripts/texlive-extra/allcm.sh texlive
scripts/texlive-extra/allneeded.sh texlive
scripts/texlive-extra/dvi2fax.sh texlive
@ -186,21 +169,22 @@ scripts/texlive-extra/pslatex.sh texlive
scripts/texlive-extra/rubibtex.sh texlive-langcyrillic
scripts/texlive-extra/rumakeindex.sh texlive-langcyrillic
scripts/texlive-extra/texconfig-dialog.sh texlive
scripts/texlive-extra/texconfig-sys.sh texlive
scripts/texlive-extra/texconfig.sh texlive
scripts/texlive-extra/texconfig-sys.sh texlive
scripts/texlive-extra/texlinks.sh texlive
scripts/texlive/fmtutil.pl texlive
scripts/texlive/fmtutil-sys.sh texlive
scripts/texlive/fmtutil-user.sh texlive
scripts/texlive/fmtutil.pl texlive
scripts/texlive/mktexlsr texlive
scripts/texlive/mktexmf texlive
scripts/texlive/mktexpk texlive
scripts/texlive/mktextfm texlive
scripts/texliveonfly/texliveonfly.py texlive
scripts/texlive/rungs.tlu texlive
scripts/texlive/tlmgr.pl texlive
scripts/texlive/updmap.pl texlive
scripts/texlive/updmap-sys.sh texlive
scripts/texlive/updmap-user.sh texlive
scripts/texlive/updmap.pl texlive
scripts/texliveonfly/texliveonfly.py texlive
scripts/texloganalyser/texloganalyser texlive
scripts/texosquery/texosquery-jre5.sh texlive
scripts/texosquery/texosquery-jre8.sh texlive
@ -212,18 +196,14 @@ scripts/typeoutfileinfo/typeoutfileinfo.sh texlive
scripts/ulqda/ulqda.pl texlive-science
scripts/urlbst/urlbst texlive
scripts/vpe/vpe.pl texlive
scripts/vpe/vpe.pl texlive
scripts/webquiz/webquiz.py texlive
scripts/webquiz/webquiz.py texlive
scripts/wordcount/wordcount.sh texlive
scripts/wordcount/wordcount.sh texlive
scripts/xindex/xindex.lua texlive
scripts/yplan/yplan texlive
scripts/yplan/yplan texlive
texconfig/tcfmgr texlive
texconfig/tcfmgr.map texlive
texconfig/tcfmgr texlive
web2c/fmtutil.cnf texlive
web2c/texmf.cnf texlive
xdvi/XDvi texlive
xdvi/pixmap/toolbar.xpm texlive
xdvi/pixmap/toolbar2.xpm texlive
xdvi/pixmap/toolbar.xpm texlive
xdvi/XDvi texlive

View File

@ -150,6 +150,12 @@ _EOF
_add_trigger hwdb.d-dir
fi
#
# Handle texmf database changes
#
if [ -d "${PKGDESTDIR}/usr/share/texmf-dist" ] ; then
_add_trigger texmf-dist
fi
#
# (Un)Register a shell in /etc/shells.
#
if [ -n "${register_shell}" ]; then

View File

@ -0,0 +1,39 @@
#!/bin/sh
#
# Updates texmf-dist hashes and format library.
#
# Arguments: $ACTION = [run/targets]
# $TARGET = [post-install/post-remove]
# $PKGNAME
# $VERSION
# $UPDATE = [yes/no]
#
ACTION="$1"
TARGET="$2"
PKGNAME="$3"
VERSION="$4"
UPDATE="$5"
texhash=usr/bin/texhash
fmtutil=usr/bin/fmtutil-sys
case "$ACTION" in
targets)
echo "post-install post-remove"
;;
run)
if [ -x ${texhash} ]; then
echo "Updating texmf-dist hashes..."
${texhash} 2>&1 >/dev/null || true # silence strange errors
fi
if [ -x ${fmtutil} ]; then
echo "Updating texmf-dist formats..."
${fmtutil} --all >/dev/null || true
fi
;;
*)
exit 1
;;
esac
exit 0

View File

@ -1,6 +1,6 @@
# Template file for 'xbps-triggers'
pkgname=xbps-triggers
version=0.114
version=0.115
revision=1
archs=noarch
bootstrap=yes