[Debian-tex-commits] SVN tex-common commit + diffs: r3372 - in tex-common/branches/triggers: debian scripts
Norbert Preining
preining at alioth.debian.org
Tue May 13 12:34:16 UTC 2008
Author: preining
Date: 2008-05-13 12:34:16 +0000 (Tue, 13 May 2008)
New Revision: 3372
Modified:
tex-common/branches/triggers/debian/postinst.in
tex-common/branches/triggers/scripts/dh_installtex
tex-common/branches/triggers/scripts/update-fontlang
Log:
more work on triggers, seems to work now ...
Modified: tex-common/branches/triggers/debian/postinst.in
===================================================================
--- tex-common/branches/triggers/debian/postinst.in 2008-05-13 11:55:00 UTC (rev 3371)
+++ tex-common/branches/triggers/debian/postinst.in 2008-05-13 12:34:16 UTC (rev 3372)
@@ -21,6 +21,7 @@
# Give a name to the first commandline argument
action=$1
+trigger=$2
. <:=${CONFMODULE}:>
db_version 2.0
@@ -43,30 +44,33 @@
# - go through all the triggers and call the respective fmtutil/updmap
# calls.
# we currently do ONLY the trigger for the updmap.d
- echo "triggers not implemented by now: $*"
- case " $3 " in
+ case " $trigger " in
*" /etc/texmf/updmap.d "*)
- # do the processing
- # code from postinst.tex
- tempfile=$(mktemp -p /tmp updmap.XXXXXXXX)
- update-updmap --quiet --real
- 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
+ # do the processing
+ # code from postinst.tex
+ if dhit_libkpathsea_configured; then
+ if which updmap-sys >/dev/null; then
+ tempfile=$(mktemp -p /tmp updmap.XXXXXXXX)
+ update-updmap --quiet --real
+ 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
+ fi
+ fi
;;
esac
;;
@@ -255,6 +259,9 @@
#DEBHELPER#
-# Local Variables:
-# mode: shell-script
-# End:
+### Local Variables:
+### perl-indent-level: 4
+### tab-width: 4
+### indent-tabs-mode: nil
+### End:
+# vim:set tabstop=4 expandtab: #
Modified: tex-common/branches/triggers/scripts/dh_installtex
===================================================================
--- tex-common/branches/triggers/scripts/dh_installtex 2008-05-13 11:55:00 UTC (rev 3371)
+++ tex-common/branches/triggers/scripts/dh_installtex 2008-05-13 12:34:16 UTC (rev 3372)
@@ -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 Norbert Preining
+# Copyright (C) 2006, 2007, 2008 Norbert Preining
# Copyright (C) 2006, 2007 Frank Küster
#
# This program is free software; you can redistribute it and/or modify
@@ -176,7 +176,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<map:config_for_active_maps>, B<map:config_for_all_maps>, B<map:notriggers>,
B<format:build_all>, and B<format:add_one:I<formatname>>.
B<map:config_for_active_maps> will create a file I<config.bar> for each active
@@ -193,6 +193,10 @@
Default is I<not> to generate any config files.
+B<map:notriggers> allows to circumvent the delayed calls to updmap-sys
+using triggers. Use this only if other postinst code requires that the
+fonts are properly installed.
+
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.
@@ -237,6 +241,7 @@
my @addbuildformats = (); # additional formats to be build
my $priority=20; # priority with which files are installed
my $doformatlinks = 1;
+my $donotriggers = 0;
my %cmdlineargs;
my %cmdlinefiles;
my %cmdlinefilespriority;
@@ -410,6 +415,8 @@
push @addbuildformats , $1;
} elsif ($fl eq "format:no_links") {
$doformatlinks = 0;
+ } elsif ($fl eq "map:notriggers") {
+ $donotriggers = 1;
} else {
error("Specified flavor $fl not supported.\nPlease see man page for supported flavors!\n");
}
@@ -637,6 +644,18 @@
autoscript($package, "postinst", "postinst-texlsr", "s|#TEXMFTREES#|@foo|");
autoscript($package, "postrm", "postrm-texlsr", "s|#TEXMFTREES#|@foo|");
if ($dothefullstuff) {
+ # updmap-sys is now done with triggers, so we should
+ # filter out the "map" from the @whattodo list
+ # but only if we are not running with flavor notriggers
+ if (!$donotriggers) {
+ my @newwhat = ();
+ foreach my $t (@whattodo) {
+ if ($t ne "map") {
+ push @newwhat, $t;
+ }
+ }
+ @whattodo = @newwhat;
+ }
autoscript($package, "postinst", "postinst-tex", "s|#FORMATSFILES#|@fmtconffiles|; s|#WHATTODO#|@whattodo|");
autoscript($package, "postrm", "postrm-tex", "s|#FORMATS#|@postrmfmtdata|; s|#WHATTODO#|@whattodo|");
}
Modified: tex-common/branches/triggers/scripts/update-fontlang
===================================================================
--- tex-common/branches/triggers/scripts/update-fontlang 2008-05-13 11:55:00 UTC (rev 3371)
+++ tex-common/branches/triggers/scripts/update-fontlang 2008-05-13 12:34:16 UTC (rev 3372)
@@ -586,7 +586,7 @@
if [ $USE_TRIGGER = 0 ]; then
# if we don't use triggers, we always work in real mode
- real=0
+ real=1
fi
if [ $real = 0 ]; then
if type dpkg-trigger > /dev/null 2>&1 &&
More information about the Debian-tex-commits
mailing list