[Debian-tex-commits] SVN tex-common commit + diffs: r3864 - in tex-common/trunk: debian scripts

Norbert Preining preining at alioth.debian.org
Fri Mar 27 15:29:39 UTC 2009


Author: preining
Date: 2009-03-27 15:29:39 +0000 (Fri, 27 Mar 2009)
New Revision: 3864

Added:
   tex-common/trunk/scripts/update-texmf-config
Modified:
   tex-common/trunk/debian/changelog
   tex-common/trunk/debian/postinst.in
   tex-common/trunk/debian/triggers
   tex-common/trunk/scripts/dh_installtex
   tex-common/trunk/scripts/postinst-tex
   tex-common/trunk/scripts/postrm-tex
Log:
  * rework trigger support so that new file triggers are used, but
    the code in the maintainer scripts generated by dh_installtex
    for updmap and language calls the new script update-texmf-config
    which simply calls the respective trigger. In the course of the
    the options map:notriggers and language:notriggers were removed
    from the possible options of dh_installtex.


Modified: tex-common/trunk/debian/changelog
===================================================================
--- tex-common/trunk/debian/changelog	2009-03-25 11:33:27 UTC (rev 3863)
+++ tex-common/trunk/debian/changelog	2009-03-27 15:29:39 UTC (rev 3864)
@@ -1,12 +1,18 @@
-tex-common (1.18~2) unstable; urgency=low
+tex-common (1.18) unstable; urgency=low
 
   * make sure that fmtutil-sys --all and updmap-sys are called on new
     installations when tex-common is configured, since new installations
     do not trigger. This bug fixes via rebuild of texlive-base #520042,
     #520410, and via rebuild of #520449.
   * bump the dh_installtex induced dependency on tex-common to 1.18
+  * rework trigger support so that new file triggers are used, but 
+    the code in the maintainer scripts generated by dh_installtex 
+    for updmap and language calls the new script update-texmf-config
+    which simply calls the respective trigger. In the course of the
+    the options map:notriggers and language:notriggers were removed
+    from the possible options of dh_installtex.
 
- -- Norbert Preining <preining at debian.org>  Tue, 24 Mar 2009 02:05:42 +0100
+ -- Norbert Preining <preining at debian.org>  Fri, 27 Mar 2009 16:25:07 +0100
 
 tex-common (1.17) unstable; urgency=low
 

Modified: tex-common/trunk/debian/postinst.in
===================================================================
--- tex-common/trunk/debian/postinst.in	2009-03-25 11:33:27 UTC (rev 3863)
+++ tex-common/trunk/debian/postinst.in	2009-03-27 15:29:39 UTC (rev 3864)
@@ -66,8 +66,7 @@
         fi
     fi
     case " $trigger " in
-        *" /etc/texmf/updmap.d "*) 
-            # do the processing
+        *" texmf-updmap "*) 
          # code from postinst-tex
          if dhit_libkpathsea_configured; then
              if which updmap-sys >/dev/null; then
@@ -92,10 +91,7 @@
                 fi
             fi
         ;;
-    esac
-    case " $trigger " in
-        *" /etc/texmf/language.d "*) 
-            # do the processing
+        *" texmf-language "*) 
          # code from postinst.tex
             v=$(kpsewhich -var-value TEXMFSYSVAR)
             c=$(kpsewhich -var-value TEXMFSYSCONFIG)
@@ -264,7 +260,7 @@
     # that calls mktexlsr if possible, and update-*
     # we set the triggers updmap.d
     #
-    trigger=/etc/texmf/updmap.d
+    trigger=texmf-updmap
     do_triggers
 
     # now call the equivalent of fmtutil-sys --all explicitely

Modified: tex-common/trunk/debian/triggers
===================================================================
--- tex-common/trunk/debian/triggers	2009-03-25 11:33:27 UTC (rev 3863)
+++ tex-common/trunk/debian/triggers	2009-03-27 15:29:39 UTC (rev 3864)
@@ -1,2 +1,2 @@
-interest /etc/texmf/updmap.d
-interest /etc/texmf/language.d
+interest texmf-language
+interest texmf-updmap

Modified: tex-common/trunk/scripts/dh_installtex
===================================================================
--- tex-common/trunk/scripts/dh_installtex	2009-03-25 11:33:27 UTC (rev 3863)
+++ tex-common/trunk/scripts/dh_installtex	2009-03-27 15:29:39 UTC (rev 3864)
@@ -176,9 +176,8 @@
 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:notriggers>,
-B<format:build_all>, B<format:add_one:I<formatname>>, and 
-B<language:notriggers>.
+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> 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
@@ -194,10 +193,6 @@
 
 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.
@@ -216,10 +211,6 @@
 exists, dh_installtex will skip this format with an informational
 message, even if this option is not given.
 
-<language:notriggers> allows to circumvent the delayed calls to fmtutil-sys
-using triggers. Use this only if other postinst code requires that the
-hyphenation patterns are properly installed.
-
 =back
 
 =head1 NOTES
@@ -249,8 +240,6 @@
 my @addbuildformats = (); # additional formats to be build
 my $priority=20;	# priority with which files are installed
 my $doformatlinks = 1;
-my $no_updmap_triggers = 0;
-my $no_language_triggers = 0;
 my %cmdlineargs;
 my %cmdlinefiles;
 my %cmdlinefilespriority;
@@ -424,10 +413,6 @@
 			push @addbuildformats , $1;
 		} elsif ($fl eq "format:no_links") {
 			$doformatlinks = 0;
-		} elsif ($fl eq "map:notriggers") {
-			$no_updmap_triggers = 1;
-		} elsif ($fl eq "language:notriggers") {
-			$no_language_triggers = 1;
 		} else {
 			error("Specified flavor $fl not supported.\nPlease see man page for supported flavors!\n");
 		}
@@ -654,20 +639,6 @@
 		# because we have to update the ls-R db for disappearing files, too.
 		autoscript($package, "postinst", "postinst-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
-			my @newwhat = ();
-			foreach my $t (@whattodo) {
-				if ($t eq "map") {
-					push @newwhat, $t if $no_updmap_triggers;
-				} elsif ($t eq "language") {
-					push @newwhat, $t if $no_language_triggers;
-				} else {
-					push @newwhat, $t;
-				}
-			}
-			@whattodo = @newwhat;
 			autoscript($package, "postinst", "postinst-tex", "s|#FORMATSFILES#|@fmtconffiles|; s|#WHATTODO#|@whattodo|");
 		}
 

Modified: tex-common/trunk/scripts/postinst-tex
===================================================================
--- tex-common/trunk/scripts/postinst-tex	2009-03-25 11:33:27 UTC (rev 3863)
+++ tex-common/trunk/scripts/postinst-tex	2009-03-27 15:29:39 UTC (rev 3864)
@@ -82,9 +82,10 @@
         if dhit_libkpathsea_configured; then
             for i in #WHATTODO# ; do
                 if [ "$i" = map ] ; then
-                    if which updmap-sys >/dev/null; then
-                        dhit_create_fontmaps
-                    fi
+                    update-texmf-config updmap
+                    #if which updmap-sys >/dev/null; then
+                    #   dhit_create_fontmaps
+                    #fi
                 fi
                 if [ "$i" = allformats ] ; then
                     dhit_build_format --all
@@ -95,8 +96,9 @@
                     done
                 fi
                 if [ "$i" = language ] ; then
-                    dhit_build_hyphen_format_if_format_exists \
-                        latex $(kpsewhich language.dat)
+                    update-texmf-config language
+                    #dhit_build_hyphen_format_if_format_exists \
+                    #    latex $(kpsewhich language.dat)
                 fi
             done
         fi

Modified: tex-common/trunk/scripts/postrm-tex
===================================================================
--- tex-common/trunk/scripts/postrm-tex	2009-03-25 11:33:27 UTC (rev 3863)
+++ tex-common/trunk/scripts/postrm-tex	2009-03-27 15:29:39 UTC (rev 3864)
@@ -50,8 +50,9 @@
     remove|disappear)
         for i in #WHATTODO# ; do
             if [ "$i" = map ] ; then
-                dhit_libkpathsea_configured && \
-                    dhit_check_run_without_errors updmap-sys
+                update-texmf-config updmap
+                #dhit_libkpathsea_configured && \
+                #    dhit_check_run_without_errors updmap-sys
             fi
             if [ "$i" = allformats ] ; then
                 for fmt in #FORMATS# ; do
@@ -65,11 +66,12 @@
                 done
             fi
             if [ "$i" = language ] ; then
-                if dhit_libkpathsea_configured && \
-                    which fmtutil-sys >/dev/null; then
-                    dhit_build_hyphen_format_if_format_exists \
-                        latex $(kpsewhich language.dat)
-                fi
+                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
     ;;

Added: tex-common/trunk/scripts/update-texmf-config
===================================================================
--- tex-common/trunk/scripts/update-texmf-config	                        (rev 0)
+++ tex-common/trunk/scripts/update-texmf-config	2009-03-27 15:29:39 UTC (rev 3864)
@@ -0,0 +1,54 @@
+#!/bin/sh -e
+#
+# update-texmf-config
+# script used in maintainer script for updating the config files
+# updmap.cfg, language.dat, fmtutil.cnf, and calling the respective
+# triggers to allow tex-common trigger action to be run.
+#
+# Copyright (C) 2009 Norbert Preining
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 dated June, 1991.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA  02110-1301 USA.
+
+DOLANGUAGE=off
+DOUPDMAP=off
+
+while [ $# -ne 0 ]; do
+  case $1 in
+    language)
+      DOLANGUAGE=on
+      shift;;
+    updmap)
+      DOUPDMAP=on
+      shift;;
+    *)
+      echo "unknown option: $1"
+      exit 1
+      ;;
+  esac
+done
+
+ 
+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
+
+# vim:set expandtab tabstop=2: #




More information about the Debian-tex-commits mailing list