[Debian-tex-commits] SVN tex-common commit + diffs: r3369 - in tex-common/branches/triggers: debian scripts

Norbert Preining preining at alioth.debian.org
Tue May 13 11:52:39 UTC 2008


Author: preining
Date: 2008-05-13 11:52:39 +0000 (Tue, 13 May 2008)
New Revision: 3369

Modified:
   tex-common/branches/triggers/debian/postinst.in
   tex-common/branches/triggers/debian/triggers
   tex-common/branches/triggers/scripts/update-fontlang
   tex-common/branches/triggers/scripts/update-texmf
Log:
do triggers only for updmap, and implement the postinst trigger action


Modified: tex-common/branches/triggers/debian/postinst.in
===================================================================
--- tex-common/branches/triggers/debian/postinst.in	2008-05-13 11:34:19 UTC (rev 3368)
+++ tex-common/branches/triggers/debian/postinst.in	2008-05-13 11:52:39 UTC (rev 3369)
@@ -37,12 +37,38 @@
 
 case $action in
   triggered)
-      # things to do:
-      # - go through all the triggers on the cmdline
+      # currently we only support only one trigger for updmap.d changes
+      # because all the other calls are quite fast 
       # - call all the update-* scripts (it doesn't hurt)
       # - 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
+      *" /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
+	 ;;
+      esac
       ;;
       
   configure|reconfigure)

Modified: tex-common/branches/triggers/debian/triggers
===================================================================
--- tex-common/branches/triggers/debian/triggers	2008-05-13 11:34:19 UTC (rev 3368)
+++ tex-common/branches/triggers/debian/triggers	2008-05-13 11:52:39 UTC (rev 3369)
@@ -1,4 +1 @@
-interest /etc/texmf/fmt.d
-interest /etc/texmf/language.d
-interest /etc/texmf/texmf.d
 interest /etc/texmf/updmap.d

Modified: tex-common/branches/triggers/scripts/update-fontlang
===================================================================
--- tex-common/branches/triggers/scripts/update-fontlang	2008-05-13 11:34:19 UTC (rev 3368)
+++ tex-common/branches/triggers/scripts/update-fontlang	2008-05-13 11:52:39 UTC (rev 3369)
@@ -28,6 +28,7 @@
 
 if [ "$progname" = "update-language" ] ; then
     CNFDIR=language.d
+    USE_TRIGGER=0
     # System-wide configuration directory
     SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
     CHECKFILE="$SYSWIDE_CONFDIR/00tex.cnf"
@@ -43,6 +44,7 @@
     SHORT_DESC="Generate language.dat, the hyphenation configuration file for LaTeX"
 elif [ "$progname" = "update-updmap" ] ; then
     CNFDIR=updmap.d
+    USE_TRIGGER=1
     # System-wide configuration directory
     SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
     CHECKFILE="$SYSWIDE_CONFDIR/00updmap.cfg"
@@ -57,6 +59,7 @@
     SHORT_DESC="Generate an updmap configuration file"
 elif [ "$progname" = "update-fmtutil" ] ; then
     CNFDIR=fmt.d
+    USE_TRIGGER=0
     # System-wide configuration directory
     SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
     CHECKFILE="$SYSWIDE_CONFDIR/00tex.cnf"
@@ -581,6 +584,10 @@
     fi
 fi
 
+if [ $USE_TRIGGER = 0 ]; then
+    # if we don't use triggers, we always work in real mode
+    real=0
+fi
 if [ $real = 0 ]; then
     if type dpkg-trigger > /dev/null 2>&1 &&
        dpkg-trigger $SYSWIDE_CONFDIR ; then

Modified: tex-common/branches/triggers/scripts/update-texmf
===================================================================
--- tex-common/branches/triggers/scripts/update-texmf	2008-05-13 11:34:19 UTC (rev 3368)
+++ tex-common/branches/triggers/scripts/update-texmf	2008-05-13 11:52:39 UTC (rev 3369)
@@ -14,7 +14,6 @@
 
 VERBOSE=false
 DEBUG=false
-REAL=false
 while [ $# -ne 0 ]; do
   case $1 in
     -v|--verbose)
@@ -24,9 +23,6 @@
       DEBUG=true
       VERBOSE=true
       shift;;
-    --read)
-      READ=true
-      shift;;
     *)
       echo "unknown option: $1"
       exit 1
@@ -34,13 +30,6 @@
   esac
 done
 
-if [ "${REAL}" = "false" ]; then
-  if type dpkg-trigger >/dev/null 2>&1 && 
-     dpkg-trigger /etc/texmf/texmf.d; then
-       exit 0
-  fi
-fi
-
 # test wether /etc isn't mounted read-only
 if touch /etc/texmf/is_rw 2>/dev/null; then
   rm -f /etc/texmf/is_rw




More information about the Debian-tex-commits mailing list