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

Norbert Preining preining at alioth.debian.org
Sun May 11 20:53:29 UTC 2008


Author: preining
Date: 2008-05-11 20:53:29 +0000 (Sun, 11 May 2008)
New Revision: 3359

Added:
   tex-common/branches/triggers/debian/triggers
Modified:
   tex-common/branches/triggers/debian/postinst.in
   tex-common/branches/triggers/scripts/update-fontlang
   tex-common/branches/triggers/scripts/update-texmf
Log:
first step in implementing triggers


Modified: tex-common/branches/triggers/debian/postinst.in
===================================================================
--- tex-common/branches/triggers/debian/postinst.in	2008-05-11 20:52:48 UTC (rev 3358)
+++ tex-common/branches/triggers/debian/postinst.in	2008-05-11 20:53:29 UTC (rev 3359)
@@ -36,6 +36,15 @@
 #################################################################
 
 case $action in
+  triggered)
+      # things to do:
+      # - go through all the triggers on the cmdline
+      # - call all the update-* scripts (it doesn't hurt)
+      # - go through all the triggers and call the respective fmtutil/updmap
+      #   calls.
+      echo "triggers not implemented by now: $*"
+      ;;
+      
   configure|reconfigure)
 
 # is there a file /etc/texmf/language.dat already? Move it out of the way

Added: tex-common/branches/triggers/debian/triggers
===================================================================
--- tex-common/branches/triggers/debian/triggers	                        (rev 0)
+++ tex-common/branches/triggers/debian/triggers	2008-05-11 20:53:29 UTC (rev 3359)
@@ -0,0 +1,4 @@
+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-11 20:52:48 UTC (rev 3358)
+++ tex-common/branches/triggers/scripts/update-fontlang	2008-05-11 20:53:29 UTC (rev 3359)
@@ -4,7 +4,7 @@
 #                     from a set of files
 # Copyright (C) 2002 Atsuhito Kohda
 # Copyright (C) 2004, 2005, 2006, 2007 Florent Rougon
-# Copyright (C) 2005, 2006 Norbert Preining
+# Copyright (C) 2005, 2006, 2007, 2008 Norbert Preining
 # Copyright (C) 2007 Frank Küster
 #
 # This program is free software; you can redistribute it and/or modify
@@ -88,7 +88,8 @@
       --quiet            don't write anything to the standard output during
                          normal operation
       --help             display this help message and exit
-      --version          output version information and exit"
+      --version          output version information and exit
+      --real             do actual processing, don't use triggers"
 
 
 DebPkgProvidedMaps_magic_comment="^[#%] -_- DebPkgProvidedMaps -_-"
@@ -466,7 +467,7 @@
 
 # -v (verbose) is here for backward compatibility only.
 TEMP=$(getopt -o +vc:o: --longoptions \
-    conf-dir:,output-file:,check,quiet,help,version \
+    conf-dir:,output-file:,check,quiet,help,version,real \
     -n "$progname" -- "$@")
 
 case $? in
@@ -492,6 +493,7 @@
 quiet=1
 dochecks=0
 output_file_specified=0
+real=0
 
 if [ $syswide_mode = 1 ]; then
     output_file="$SYSWIDE_DEFAULT_OUTPUTFILE"
@@ -541,6 +543,7 @@
             shift 2 ;;
         --quiet) quiet=1; shift ;;
         --check) dochecks=1; shift ;;
+        --real)  real=1; shift ;;
         -v) printf "\
 ${progname}'s -v option is deprecated. The default mode of operation will
 be verbose as soon as enough packages use the --quiet option. Please update
@@ -561,6 +564,8 @@
 
 # In user-specific mode, $conf_dir is required; let's check that.
 if [ $syswide_mode = 0 ]; then
+    # we set real mode to 1 if we are not running as root
+    real=1
     if [ -z "$conf_dir" ]; then
         printf "$progname: "
         cat >&2 <<EOF
@@ -576,6 +581,13 @@
     fi
 fi
 
+if [ $real = 0 ]; then
+    if type dpkg-trigger > /dev/null 2>&1 &&
+       dpkg-trigger $SYSWIDE_CONFDIR
+        exit 0
+    fi
+fi
+
 if [ -z "$output_file" ]; then
     printf "$progname: "
     cat >&2 <<EOF

Modified: tex-common/branches/triggers/scripts/update-texmf
===================================================================
--- tex-common/branches/triggers/scripts/update-texmf	2008-05-11 20:52:48 UTC (rev 3358)
+++ tex-common/branches/triggers/scripts/update-texmf	2008-05-11 20:53:29 UTC (rev 3359)
@@ -14,6 +14,7 @@
 
 VERBOSE=false
 DEBUG=false
+REAL=false
 while [ $# -ne 0 ]; do
   case $1 in
     -v|--verbose)
@@ -23,6 +24,9 @@
       DEBUG=true
       VERBOSE=true
       shift;;
+    --read)
+      READ=true
+      shift;;
     *)
       echo "unknown option: $1"
       exit 1
@@ -30,6 +34,13 @@
   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