Bug#418983: dh_installtex: format generation mis-conception
Hi Frank, hi all!
On Fre, 13 Apr 2007, Frank Küster wrote:
> > fmtutil-sys --all --cnffile /etc/texmf/fmt.d/NNfoobar.cnf
>
> for locally built formats themselves. Also, we could use the first
> approach (--cnffile /etc/texmf/fmt.d/NNfoobar.cnf) for a quick fix, and
> the other one more time for consideration, implementation and testing.
Here is a proposed diff (attached, and inline with comments):
Basic idea: - use the already collected data in
@listfiles
(lines written to /var/lib/tex-common/fmtutil.cnf/$package)
in the postinst-tex snippet:
Index: postinst-tex
===================================================================
--- postinst-tex (revision 2699)
+++ postinst-tex (working copy)
Just call fmtutil with "$@" so that I can give more arguments
@@ -59,8 +59,8 @@
{
tempfile=$(mktemp -p /tmp fmtutil.XXXXXXXX)
- printf "Building format(s) $1 $(basename "$2"). This may take some time... "
- if fmtutil-sys "$1" "$2" > $tempfile 2>&1 ; then
+ printf "Building format(s) $@. This may take some time... "
+ if fmtutil-sys "$@" > $tempfile 2>&1 ; then
rm -f $tempfile
echo "done."
else
call dhit_build_format with --all --cnffile ... for the data in
@listlines which is substituted into #FORMATSFILES#
@@ -90,8 +90,8 @@
dhit_build_format --all
fi
if [ "$i" = format ] ; then
- for fmt in #FORMATS# ; do
- dhit_build_format --byfmt $fmt
+ for fmt in #FORMATSFILES# ; do
+ dhit_build_format --all --cnffile "/etc/texmf/fmt.d/$fmt.cnf"
done
fi
if [ "$i" = language ] ; then
Index: dh_installtex
===================================================================
--- dh_installtex (revision 2699)
+++ dh_installtex (working copy)
Simple, only replace in postinst #FORMATSFILES# with @listlines.
@@ -601,7 +601,7 @@
autoscript($package, "postinst", "postinst-texlsr", "s|#TEXMFTREES#|@foo|");
autoscript($package, "postrm", "postrm-texlsr", "s|#TEXMFTREES#|@foo|");
if ($dothefullstuff) {
- autoscript($package, "postinst", "postinst-tex", "s|#FORMATS#|@fmtdata|; s|#WHATTODO#|@whattodo|");
+ autoscript($package, "postinst", "postinst-tex", "s|#FORMATSFILES#|@listlines|; s|#WHATTODO#|@whattodo|");
autoscript($package, "postrm", "postrm-tex", "s|#FORMATS#|@postrmfmtdata|; s|#WHATTODO#|@whattodo|");
}
}
Points to be noted:
- postrm still only removes the predefined formats, not additional ones.
This would need a run-time/install-remove-time parsing.. later
- not tested
Comments?
Best wishes
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at> Università di Siena
Debian Developer <preining@debian.org> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
FORD Six pints of bitter. And quickly please, the
world's about to end.
BARMAN Oh yes, sir? Nice weather for it.
--- Douglas Adams, The Hitchhikers Guide to the Galaxy
Reply to: