[Debian-tex-commits] SVN tex-common commit + diffs: r3876 - in tex-common/branches/full-trigger: debian scripts
Norbert Preining
preining at alioth.debian.org
Tue Apr 14 11:57:36 UTC 2009
Author: preining
Date: 2009-04-14 11:57:36 +0000 (Tue, 14 Apr 2009)
New Revision: 3876
Removed:
tex-common/branches/full-trigger/scripts/postinst-texlsr
tex-common/branches/full-trigger/scripts/postrm-texlsr
Modified:
tex-common/branches/full-trigger/debian/changelog
tex-common/branches/full-trigger/debian/postinst.functions
tex-common/branches/full-trigger/debian/postinst.in
tex-common/branches/full-trigger/debian/triggers
tex-common/branches/full-trigger/scripts/dh_installtex
tex-common/branches/full-trigger/scripts/postinst-tex
tex-common/branches/full-trigger/scripts/postrm-tex
tex-common/branches/full-trigger/scripts/update-texmf-config
tex-common/branches/full-trigger/scripts/update-texmf-config.8
Log:
implement full trigger support for all actions, needs discussion
Modified: tex-common/branches/full-trigger/debian/changelog
===================================================================
--- tex-common/branches/full-trigger/debian/changelog 2009-04-14 11:14:36 UTC (rev 3875)
+++ tex-common/branches/full-trigger/debian/changelog 2009-04-14 11:57:36 UTC (rev 3876)
@@ -1,3 +1,9 @@
+tex-common (1.19) unstable; urgency=low
+
+ * implement full trigger support for all actions including mktexlsr calls.
+
+ -- Norbert Preining <preining at debian.org> Tue, 14 Apr 2009 13:54:57 +0200
+
tex-common (1.18) unstable; urgency=low
* make sure that fmtutil-sys --all and updmap-sys are called on new
Modified: tex-common/branches/full-trigger/debian/postinst.functions
===================================================================
--- tex-common/branches/full-trigger/debian/postinst.functions 2009-04-14 11:14:36 UTC (rev 3875)
+++ tex-common/branches/full-trigger/debian/postinst.functions 2009-04-14 11:57:36 UTC (rev 3876)
@@ -62,26 +62,6 @@
kpsewhich --version >/dev/null 2>&1
}
-dhit_build_format ()
-{
-
- tempfile=$(mktemp -p /tmp fmtutil.XXXXXXXX)
- printf "Building format(s) $*.\n\tThis may take some time... "
- if fmtutil-sys "$@" > $tempfile 2>&1 ; then
- rm -f $tempfile
- echo "done."
- else
- exec >&2
- echo
- echo "fmtutil-sys failed. Output has been stored in"
- echo "$tempfile"
- echo "Please include this file if you report a bug."
- echo
- exit 1
- fi
-}
-
-
#################################################################
## End of function definitions from file postinst.functions
#################################################################
Modified: tex-common/branches/full-trigger/debian/postinst.in
===================================================================
--- tex-common/branches/full-trigger/debian/postinst.in 2009-04-14 11:14:36 UTC (rev 3875)
+++ tex-common/branches/full-trigger/debian/postinst.in 2009-04-14 11:57:36 UTC (rev 3876)
@@ -45,26 +45,39 @@
update-updmap --quiet
update-language
update-fmtutil
- # code from postinst-tex
- if dhit_libkpathsea_configured; then
- # mktexlsr may not be present
- if which mktexlsr >/dev/null; then
- tempfile=$(mktemp -p /tmp mktexlsr.XXXXXXXX)
- printf "Running mktexlsr. This may take some time... "
- if mktexlsr > $tempfile 2>&1 ; then
- rm -f $tempfile
- echo "done."
- else
- exec >&2
- echo
- echo "mktexlsr failed. Output has been stored in"
- echo "$tempfile"
- echo "Please include this file if you report a bug."
- echo
- exit 1
+ #
+ # the following triggers are reacted upon and in that order:
+ # - texmf-lsr: call mktexlsr if present
+ # - texmf-updmap: call updmap-sys
+ # - texmf-format: call fmtutil-sys --all
+ # - texmf-language: if texmf-format hasn't been triggered call
+ # fmtutil-sys --byhyphen ...
+ case " $trigger " in
+ *" texmf-lsr "*)
+ # code from postinst-tex
+ if dhit_libkpathsea_configured; then
+ # mktexlsr may not be present
+ if which mktexlsr >/dev/null; then
+ tempfile=$(mktemp -p /tmp mktexlsr.XXXXXXXX)
+ printf "Running mktexlsr. This may take some time... "
+ if mktexlsr > $tempfile 2>&1 ; then
+ rm -f $tempfile
+ echo "done."
+ else
+ exec >&2
+ echo
+ echo "mktexlsr failed. Output has been stored in"
+ echo "$tempfile"
+ echo "Please include this file if you report a bug."
+ echo
+ exit 1
+ fi
fi
fi
- fi
+ esac
+ # do NOT merge these two cases into one, from dpkg's trigger.txt:
+ # Generally each trigger name should be tested for separately, as the
+ # postinst will often be called for several triggers at once.
case " $trigger " in
*" texmf-updmap "*)
# code from postinst-tex
@@ -95,7 +108,44 @@
# do NOT merge these two cases into one, from dpkg's trigger.txt:
# Generally each trigger name should be tested for separately, as the
# postinst will often be called for several triggers at once.
+ #
+ # if all formats have been rebuild we do not need to call fmtutil
+ # again if hyphenation patterns have been installed
+ all_formats_done=0
case " $trigger " in
+ *" texmf-format "*)
+ # code from postinst-tex
+ if dhit_libkpathsea_configured; then
+ if which fmtutil-sys >/dev/null; then
+ tempfile=$(mktemp -p /tmp fmtutil.XXXXXXXX)
+ printf "Building TeX formats.\n\tThis may take some time... "
+ if fmtutil-sys "$@" > $tempfile 2>&1 ; then
+ rm -f $tempfile
+ echo "done."
+ all_formats_done=1
+ else
+ exec >&2
+ echo
+ echo "fmtutil-sys --all failed. Output has been stored in"
+ echo "$tempfile"
+ echo "Please include this file if you report a bug."
+ echo
+ exit 1
+ fi
+ fi
+ fi
+ ;;
+ esac
+ #
+ # if all formats have been rebuild do not evaluate the texmf-language
+ # trigger, it is useless
+ if [ $all_formats_done = 1 ] ; then
+ return
+ fi
+ # do NOT merge these two cases into one, from dpkg's trigger.txt:
+ # Generally each trigger name should be tested for separately, as the
+ # postinst will often be called for several triggers at once.
+ case " $trigger " in
*" texmf-language "*)
# code from postinst.tex
v=$(kpsewhich -var-value TEXMFSYSVAR)
@@ -265,13 +315,14 @@
# that calls mktexlsr if possible, and update-*
# we set the triggers updmap.d
#
- trigger=texmf-updmap
+ trigger="texmf-lsr texmf-format texmf-updmap"
do_triggers
# now call the equivalent of fmtutil-sys --all explicitely
- if dhit_libkpathsea_configured; then
- dhit_build_format --all
- fi
+ # already done via the trigger above
+ #if dhit_libkpathsea_configured; then
+ # dhit_build_format --all
+ #fi
# create empty dirs in /usr/local/share/
Modified: tex-common/branches/full-trigger/debian/triggers
===================================================================
--- tex-common/branches/full-trigger/debian/triggers 2009-04-14 11:14:36 UTC (rev 3875)
+++ tex-common/branches/full-trigger/debian/triggers 2009-04-14 11:57:36 UTC (rev 3876)
@@ -1,2 +1,4 @@
interest texmf-language
interest texmf-updmap
+interest texmf-format
+interest texmf-lsr
Modified: tex-common/branches/full-trigger/scripts/dh_installtex
===================================================================
--- tex-common/branches/full-trigger/scripts/dh_installtex 2009-04-14 11:14:36 UTC (rev 3875)
+++ tex-common/branches/full-trigger/scripts/dh_installtex 2009-04-14 11:57:36 UTC (rev 3876)
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# dh_installtex --- register Type 1 fonts, languages, or formats with TeX
# Copyright (C) 2006, 2007 Florent Rougon
-# Copyright (C) 2006, 2007, 2008 Norbert Preining
+# Copyright (C) 2006, 2007, 2008, 2009 Norbert Preining
# Copyright (C) 2006, 2007 Frank Küster
#
# This program is free software; you can redistribute it and/or modify
@@ -42,7 +42,6 @@
[B<languagefile=>I<file.cnf>[=I<n>]]
[B<format=>I<format>,I<engine>,I<hyphenfile>,I<rest args>]
[B<formatfile=>I<file.cnf>[=I<n>]]
-[B<texmftrees=>I<tree>[,I<tree>]]
=head1 DESCRIPTION
@@ -68,20 +67,6 @@
dh_installtex
-The ls-R databases are [B<only>] updated for the following
-trees: /usr/share/texmf and /var/lib/texmf. Normal TeX related packages
-following the Debian TeX Policy should only install files into these
-directories and /etc/texmf (which does not need a ls-R DB), so this is
-a sensible choice. If you need to rehash the ls-R database of some other
-trees (e.g., because an old version of your package had files in
-/usr/share/texmf-tetex), please specify these additional trees on the
-command line via the texmftrees option:
-
- dh_installtex texmftrees=tree1,tree2,...
-
-This will update the ls-R databases for /usr/share/texmf, /var/lib/texmf, and
-in addition tree1 and tree2.
-
=head1 COMPLEX USAGE: Registering fonts, hyphenation patterns and formats
If in addition, you have to install map files, hyphenation patterns for
@@ -176,8 +161,7 @@
This option will be used to switch additional options on. The argument
specify a list from flavors to be selected.
At the moment you can select from the following list of flavors:
-B<map:config_for_active_maps>, B<map:config_for_all_maps>,
-B<format:build_all>, and B<format:add_one:I<formatname>>.
+B<map:config_for_active_maps>, and B<map:config_for_all_maps>.
B<map:config_for_active_maps> will create a file I<config.bar> for each active
(i.e. uncommented) map in each of the cfg file generated by one of the
@@ -193,14 +177,6 @@
Default is I<not> to generate any config files.
-B<format:build_all> will add code to the postinst script to create all
-defined formats, and to the postrm script to clean and recreate? FIXME?
-the generated formats.
-
-B<format:add_one:I<formatname>> allows to add the generation of a specific
-format without actually providing it (in a cnf file). This is useful if a
-package adds hyphenation patterns to an existing formats.
-
B<format:no_links>:
Usually, for every format that is specified in a configuration file in
/etc/texmf/fmt.d/, dh_installtex will create a symlink
@@ -236,17 +212,12 @@
#
my $flavor;
my $mapdoconfig = 0; # doconfig depending map/subflavor
-my $doallformats = 0; # depending on flavor format:build_all
-my @addbuildformats = (); # additional formats to be build
my $priority=20; # priority with which files are installed
my $doformatlinks = 1;
my %cmdlineargs;
my %cmdlinefiles;
my %cmdlinefilespriority;
-my @cmdlinetexmftrees;
-my @defaulttexmftrees = qw,/usr/share/texmf /var/lib/texmf,;
-
#
# definitions for the different flavors
#
@@ -392,8 +363,6 @@
$cmdlinefilespriority{$type}{$fn}=$pr;
} elsif (m/^(map|language|format)=(.*)$/) {
push @{$cmdlineargs{$1}}, $2;
- } elsif (m/^texmftrees=(.*)$/) {
- @cmdlinetexmftrees = split /,/, $1;
} else {
error("Unrecognized argument: $_\n");
}
@@ -407,10 +376,6 @@
$mapdoconfig = 1;
} elsif ($fl eq "map:config_for_all_maps") {
$mapdoconfig = 2;
- } elsif ($fl eq "format:build_all") {
- $doallformats = 1;
- } elsif ($fl =~ /^format:add_one:(.*)$/) {
- push @addbuildformats , $1;
} elsif ($fl eq "format:no_links") {
$doformatlinks = 0;
} else {
@@ -426,7 +391,6 @@
# as they vary with package
my $tmp=tmpdir($package);
my %pkgprovidedfilecontents;
- my $dothefullstuff = 0;
my %data;
my @whattodo = ();
my @fmtconffiles;
@@ -473,7 +437,6 @@
# we got something, either a cmd line are for one of the
# config files, or a package (e.g., debian/pkg.maps) file
# do the full maintainer stuff!
- $dothefullstuff = 1;
push @whattodo, $type;
if ($pkgfileoncmdline && ($pkgprovidedfile || ($#cmdlinearguments >= 0))) {
error("This call would create multiple copies of $priority$package.$configfileext{$_}.\nPlease read the man page on how this should be fixed!\n");
@@ -611,57 +574,16 @@
}
} unless ($dh{ONLYSCRIPTS});
- if ($#addbuildformats >= 0) {
- push @fmtdata, @addbuildformats;
- push @postrmfmtdata, @addbuildformats;
- }
- if ($doallformats == 1) {
- # in case we have allformats to do we ignore
- # language and format
- my @newwhat = ();
- push @newwhat, "allformats";
- foreach my $t (@whattodo) {
- if ($t eq "map") {
- push @newwhat, $t;
- }
- }
- @whattodo = @newwhat;
- # also include the full code
- $dothefullstuff = 1;
- }
if (! $dh{NOSCRIPTS}) {
- my %uniq;
- foreach (@cmdlinetexmftrees, @defaulttexmftrees) {
- $uniq{$_} = 1;
- }
- my @foo = keys(%uniq);
- # we should NOT check whether files are actually installed
- # because we have to update the ls-R db for disappearing files, too.
- autoscript($package, "postinst", "postinst-texlsr", "s|#TEXMFTREES#|@foo|");
- if ($dothefullstuff) {
- autoscript($package, "postinst", "postinst-tex", "s|#FORMATSFILES#|@fmtconffiles|; s|#WHATTODO#|@whattodo|");
- }
-
- # postrm stuff
- # we have to take care for the debhelper compat level. With
- # debhelper >= 6 the different parts are reverse ordered.
- if (compat(5)) {
- # for compat level <= 5 do the texlsr stuff now
- autoscript($package, "postrm", "postrm-texlsr", "s|#TEXMFTREES#|@foo|");
- }
- if ($dothefullstuff) {
- # map entries have already been filtered out
- autoscript($package, "postrm", "postrm-tex", "s|#FORMATS#|@postrmfmtdata|; s|#WHATTODO#|@whattodo|");
- }
- if (!compat(5)) {
- # for compat level >> 5 do it now
- autoscript($package, "postrm", "postrm-texlsr", "s|#TEXMFTREES#|@foo|");
- }
+ # call mktexlsr in any case ...
+ push @whattodo, "lsr";
+ autoscript($package, "postinst", "postinst-tex", "s|#WHATTODO#|@whattodo|");
+ autoscript($package, "postrm", "postrm-tex", "s|#WHATTODO#|@whattodo|");
}
# for trigger support
addsubstvar($package, "misc:Depends", "dpkg", ">= 1.14.18");
- addsubstvar($package, "misc:Depends", "tex-common", ">= 1.18");
+ addsubstvar($package, "misc:Depends", "tex-common", ">= 1.19");
}
=head1 SEE ALSO
Modified: tex-common/branches/full-trigger/scripts/postinst-tex
===================================================================
--- tex-common/branches/full-trigger/scripts/postinst-tex 2009-04-14 11:14:36 UTC (rev 3875)
+++ tex-common/branches/full-trigger/scripts/postinst-tex 2009-04-14 11:57:36 UTC (rev 3876)
@@ -1,107 +1,13 @@
##
## postinst-tex
##
-## postinst snippets for registering hyphenation patterns, font maps,
-## and formats
-##
## Authors:
-## Florent Rougon <f.rougon at free.fr>
## Norbert Preining <preining at logic.at>
##
-# Please note that comments in this file are stripped before installation
-# by calling a grep -v '^[ \t]*# '
-# Thus, first lines containing ## are preserved!
-# So please be careful if you add stuff here!
-#
-dhit_create_fontmaps ()
-{
- tempfile=$(mktemp -p /tmp updmap.XXXXXXXX)
- printf "Running updmap-sys. This may take some time... "
- if updmap-sys > $tempfile 2>&1 ; then
- rm -f $tempfile
- echo "done."
- else
- exec >&2
- echo
- echo "updmap-sys failed. Output has been stored in"
- echo "$tempfile"
- echo "Please include this file if you report a bug."
- echo
- echo "Sometimes, not accepting conffile updates in /etc/texmf/updmap.d"
- echo "causes updmap-sys to fail. Please check for files with extension"
- echo ".dpkg-dist or .ucf-dist in this directory"
- echo
- exit 1
- fi
-}
-
-
-dhit_build_hyphen_format_if_format_exists ()
-{
- v=$(kpsewhich -var-value TEXMFSYSVAR)
- c=$(kpsewhich -var-value TEXMFSYSCONFIG)
- TEXMFVAR="$v"
- TEXMFCONFIG="$c"
- export TEXMFVAR TEXMFCONFIG
- fmtcnffile=$(kpsewhich --format='web2c files' fmtutil.cnf)
- # this is slow, and since we hope/assure that all ini files
- # are installed if the format is active, we don't need the
- # extra check fmtutil does when called with catcfg
- # X=$(fmtutil-sys --catcfg | grep "^$1[[:space:]]" || true)
- X=$(grep "^[[:space:]]*$1[[:space:]]" $fmtcnffile || true)
- if [ -n "$X" ] ; then
- dhit_build_format --byhyphen "$2"
- fi
-}
-
-dhit_build_format ()
-{
-
- tempfile=$(mktemp -p /tmp fmtutil.XXXXXXXX)
- printf "Building format(s) $*.\n\tThis may take some time... "
- if fmtutil-sys "$@" > $tempfile 2>&1 ; then
- rm -f $tempfile
- echo "done."
- else
- exec >&2
- echo
- echo "fmtutil-sys failed. Output has been stored in"
- echo "$tempfile"
- echo "Please include this file if you report a bug."
- echo
- exit 1
- fi
-}
-
-
case "$1" in
configure|abort-upgrade|abort-remove|abort-deconfigure)
- # All of the following needs an installed and configured
- # basic TeX system, so check this.
- if dhit_libkpathsea_configured; then
- for i in #WHATTODO# ; do
- if [ "$i" = map ] ; then
- update-texmf-config updmap
- #if which updmap-sys >/dev/null; then
- # dhit_create_fontmaps
- #fi
- fi
- if [ "$i" = allformats ] ; then
- dhit_build_format --all
- fi
- if [ "$i" = format ] ; then
- for fmt in #FORMATSFILES# ; do
- dhit_build_format --all --cnffile "/etc/texmf/fmt.d/$fmt.cnf"
- done
- fi
- if [ "$i" = language ] ; then
- update-texmf-config language
- #dhit_build_hyphen_format_if_format_exists \
- # latex $(kpsewhich language.dat)
- fi
- done
- fi
+ update-texmf-config #WHATTODO#
;;
*)
Deleted: tex-common/branches/full-trigger/scripts/postinst-texlsr
===================================================================
--- tex-common/branches/full-trigger/scripts/postinst-texlsr 2009-04-14 11:14:36 UTC (rev 3875)
+++ tex-common/branches/full-trigger/scripts/postinst-texlsr 2009-04-14 11:57:36 UTC (rev 3876)
@@ -1,70 +0,0 @@
-##
-## postinst-texlsr
-##
-## postinst snippets for calling maketexlsr, update-*
-##
-## Authors:
-## Florent Rougon <f.rougon at free.fr>
-## Norbert Preining <preining at logic.at>
-##
-# Please note that comments in this file are stripped before installation
-# by calling a grep -v '^[ \t]*# '
-# Thus, first lines containing ## are preserved!
-# So please be careful if you add stuff here!
-#
-# Let vim know that we don't want tabs
-# vim:set expandtab: #
-
-
-# Tell if kpsewhich works. If this is the case:
-#
-# 1. kpsewhich is installed and;
-#
-# 2. libkpathsea is configured.
-dhit_libkpathsea_configured ()
-{
- kpsewhich --version >/dev/null 2>&1
-}
-
-dhit_update_lsr_files ()
-{
- tempfile=$(mktemp -p /tmp mktexlsr.XXXXXXXX)
- printf "Running mktexlsr. This may take some time... "
- if mktexlsr #TEXMFTREES# > $tempfile 2>&1 ; then
- rm -f $tempfile
- echo "done."
- else
- exec >&2
- echo
- echo "mktexlsr failed. Output has been stored in"
- echo "$tempfile"
- echo "Please include this file if you report a bug."
- echo
- exit 1
- fi
-}
-
-case "$1" in
- configure|abort-upgrade|abort-remove|abort-deconfigure)
- # These programs are all in tex-common and can be run immediately.
- # In fact it *does* hurt not calling them since we might
- # have formats installed and we call with --all, so not the
- # trigger action is done, but the postinst runs the fmtutil-sys call
- update-updmap --quiet
- update-language
- update-fmtutil
- # All of the following needs an installed and configured
- # basic TeX system, so check this.
- if dhit_libkpathsea_configured; then
- # mktexlsr may not be present
- if which mktexlsr >/dev/null; then
- dhit_update_lsr_files
- fi
- fi
- ;;
-
- *)
- echo "postinst called with unknown argument '$1'" >&2
- exit 1
- ;;
-esac
Modified: tex-common/branches/full-trigger/scripts/postrm-tex
===================================================================
--- tex-common/branches/full-trigger/scripts/postrm-tex 2009-04-14 11:14:36 UTC (rev 3875)
+++ tex-common/branches/full-trigger/scripts/postrm-tex 2009-04-14 11:57:36 UTC (rev 3876)
@@ -4,76 +4,12 @@
## postrm snippets for registering hyphenation patterns, font maps, and formats
##
## Authors:
-## Florent Rougon <f.rougon at free.fr>
## Norbert Preining <preining at logic.at>
##
-# Please note that comments in this file are stripped before installation
-# by calling a grep -v '^[ \t]*# '
-# Thus, first lines containing ## are preserved!
-# So please be careful if you add stuff here!
-#
-dhit_build_format ()
-{
-
- 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
- rm -f $tempfile
- echo " done."
- else
- echo
- echo "fmtutil-sys failed. Output has been stored in"
- echo "$tempfile"
- echo "Please include this file if you report a bug."
- echo
- exit 1
- fi
-}
-
-dhit_build_hyphen_format_if_format_exists ()
-{
- v=$(kpsewhich -var-value TEXMFSYSVAR)
- c=$(kpsewhich -var-value TEXMFSYSCONFIG)
- TEXMFVAR="$v"
- TEXMFCONFIG="$c"
- export TEXMFVAR TEXMFCONFIG
- fmtcnffile=$(kpsewhich --format='web2c files' fmtutil.cnf)
- X=$(grep "^[[:space:]]*$1[[:space:]]" "$fmtcnffile" || true)
- if [ -n "$X" ] ; then
- dhit_build_format --byhyphen "$2"
- fi
-}
-
-
case "$1" in
remove|disappear)
- for i in #WHATTODO# ; do
- if [ "$i" = map ] ; then
- update-texmf-config updmap
- #dhit_libkpathsea_configured && \
- # dhit_check_run_without_errors updmap-sys
- fi
- if [ "$i" = allformats ] ; then
- for fmt in #FORMATS# ; do
- rm -f /var/lib/texmf/web2c/$fmt.*
- done
- dhit_check_run_without_errors fmtutil-sys --all
- fi
- if [ "$i" = format ] ; then
- for fmt in #FORMATS# ; do
- rm -f /var/lib/texmf/web2c/$fmt.*
- done
- fi
- if [ "$i" = language ] ; then
- update-texmf-config language
- #if dhit_libkpathsea_configured && \
- # which fmtutil-sys >/dev/null; then
- # dhit_build_hyphen_format_if_format_exists \
- # latex $(kpsewhich language.dat)
- #fi
- fi
- done
+ update-texmf-config #WHATTODO#
;;
purge|upgrade|failed-upgrade|abort-upgrade|abort-install)
Deleted: tex-common/branches/full-trigger/scripts/postrm-texlsr
===================================================================
--- tex-common/branches/full-trigger/scripts/postrm-texlsr 2009-04-14 11:14:36 UTC (rev 3875)
+++ tex-common/branches/full-trigger/scripts/postrm-texlsr 2009-04-14 11:57:36 UTC (rev 3876)
@@ -1,82 +0,0 @@
-##
-## postrm-texlsr
-##
-## postrm snippets for calling mktexlsr and update-*
-##
-## Authors:
-## Florent Rougon <f.rougon at free.fr>
-## Norbert Preining <preining at logic.at>
-##
-# Please note that comments in this file are stripped before installation
-# by calling a grep -v '^[ \t]*# '
-# Thus, first lines containing ## are preserved!
-# So please be careful if you add stuff here!
-#
-
-
-# Tell if kpsewhich works. If this is the case:
-#
-# 1. kpsewhich is installed and;
-#
-# 2. libkpathsea is configured.
-dhit_libkpathsea_configured ()
-{
- kpsewhich --version >/dev/null 2>&1
-}
-
-dhit_check_run_without_errors ()
-{
- silent=0
- if [ "$1" = "-silent" ] ; then
- silent=1
- shift
- fi
- if which "$1" >/dev/null; then
- tempfile=$(mktemp -p /tmp checkrun.XXXXXXXX)
- if [ $silent = 0 ] ; then
- printf "Running '$*'.\nThis may take some time..."
- fi
- set +e
- if "$@" > $tempfile 2>&1 ; then
- rm -f $tempfile
- [ $silent = 0 ] && echo " done."
- else
- echo
- echo "$* failed. Output has been stored in"
- echo "$tempfile"
- echo "If tex-common is not configured you can ignore this error" \
- "message!"
- echo "Otherwise, please include this file if you report a bug."
- echo
- fi
- set -e
- fi
-
- return 0
-}
-
-case "$1" in
- remove|disappear)
- # It doesn't hurt to call all of them.
- dhit_check_run_without_errors -silent update-updmap --quiet
- dhit_check_run_without_errors -silent update-language
- dhit_check_run_without_errors -silent update-fmtutil
- # The mktexlsr call needs an installed and configured basic TeX
- # system, so check this.
- if dhit_libkpathsea_configured; then
- dhit_check_run_without_errors \
- mktexlsr #TEXMFTREES#
- fi
- ;;
-
- purge|upgrade|failed-upgrade|abort-upgrade|abort-install)
- ;;
-
- *)
- echo "postrm called with unknown argument '$1'" >&2
- exit 1
- ;;
-esac
-
-# Let vim know that we don't want tabs
-# vim:set expandtab: #
Modified: tex-common/branches/full-trigger/scripts/update-texmf-config
===================================================================
--- tex-common/branches/full-trigger/scripts/update-texmf-config 2009-04-14 11:14:36 UTC (rev 3875)
+++ tex-common/branches/full-trigger/scripts/update-texmf-config 2009-04-14 11:57:36 UTC (rev 3876)
@@ -21,6 +21,8 @@
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+DOLSR=off
+DOFORMAT=off
DOLANGUAGE=off
DOUPDMAP=off
@@ -29,9 +31,15 @@
language)
DOLANGUAGE=on
shift;;
- updmap)
+ map)
DOUPDMAP=on
shift;;
+ format)
+ DOFORMAT=on
+ shift;;
+ lsr)
+ DOLSR=on
+ shift;;
*)
echo "unknown option: $1"
exit 1
@@ -40,14 +48,16 @@
done
+if [ $DOLSR = on ] ; then
+ dpkg-trigger texmf-lsr
+fi
+if [ $DOFORMAT = on ] ; then
+ dpkg-trigger texmf-format
+fi
if [ $DOLANGUAGE = on ] ; then
- # done in the trigger action of tex-common
- # update-language
dpkg-trigger texmf-language
fi
if [ $DOUPDMAP = on ] ; then
- # done in the trigger action of tex-common
- # update-updmap
dpkg-trigger texmf-updmap
fi
Modified: tex-common/branches/full-trigger/scripts/update-texmf-config.8
===================================================================
--- tex-common/branches/full-trigger/scripts/update-texmf-config.8 2009-04-14 11:14:36 UTC (rev 3875)
+++ tex-common/branches/full-trigger/scripts/update-texmf-config.8 2009-04-14 11:57:36 UTC (rev 3876)
@@ -16,19 +16,26 @@
.PP
.B update-texmf-config
is a shell script that is called from maintainer scripts shipping new
-map files or hyphenation patterns for TeX, and dropping files into
-/etc/texmf/updmap.d and /etc/texmf/language.d, respectively.
+map files, format definitions, hyphenation patterns, or any other
+TeX input file.
.PP
The script simply activates the respective trigger, namely texmf-updmap
-for font map files, and texmf-language for hyphenation patterns. All
+for font map files, texmf-language for hyphenation patterns, texmf-format
+for formats, and texmf-lsr for updates to the lsr database. All
the necessary action will then be carried out by the tex-common package.
.SH OPTIONS
.TP
-.B updmap
+.B map
Activate the texmf-updmap trigger.
.TP
.B language
Activate the texmf-language trigger.
+.TP
+.B format
+Activate the texmf-format trigger.
+.TP
+.B lsr
+Activate the texmf-lsr trigger.
.SH SEE ALSO
.PP
Further information can be found in
More information about the Debian-tex-commits
mailing list