[Debian-tex-commits] SVN tex-common commit + diffs: r5285 - in tex-common/trunk: . conf debian debian/po doc scripts

Norbert Preining preining at alioth.debian.org
Sat Mar 24 07:13:17 UTC 2012


Author: preining
Date: 2012-03-24 07:13:14 +0000 (Sat, 24 Mar 2012)
New Revision: 5285

Added:
   tex-common/trunk/debian/config
   tex-common/trunk/debian/maintscript
   tex-common/trunk/debian/po/pl.po
   tex-common/trunk/debian/postinst
   tex-common/trunk/debian/postrm
   tex-common/trunk/scripts/update-fmtlang
   tex-common/trunk/scripts/update-fmtlang.8
   tex-common/trunk/scripts/update-updmap
   tex-common/trunk/scripts/update-updmap.8
Removed:
   tex-common/trunk/conf/texmf.d/
   tex-common/trunk/conf/updmap.d/
   tex-common/trunk/debian/COPYRIGHT.scripts
   tex-common/trunk/debian/common.functions.in
   tex-common/trunk/debian/common.variables
   tex-common/trunk/debian/config.in
   tex-common/trunk/debian/md5sums/
   tex-common/trunk/debian/postinst.functions
   tex-common/trunk/debian/postinst.in
   tex-common/trunk/debian/postrm.functions
   tex-common/trunk/debian/postrm.in
   tex-common/trunk/debian/preinst.in
   tex-common/trunk/debian/variables
   tex-common/trunk/scripts/FileUtils.pm
   tex-common/trunk/scripts/Tpm.pm
   tex-common/trunk/scripts/debianize-updmap
   tex-common/trunk/scripts/language.dat.header
   tex-common/trunk/scripts/language.def.header
   tex-common/trunk/scripts/tpm2licenses
   tex-common/trunk/scripts/tpm2licenses.README
   tex-common/trunk/scripts/update-fmtutil.8
   tex-common/trunk/scripts/update-fontlang
   tex-common/trunk/scripts/update-fontlang.1
   tex-common/trunk/scripts/update-fontlang.8.old
   tex-common/trunk/scripts/update-language-dat
   tex-common/trunk/scripts/update-language-def
   tex-common/trunk/scripts/update-language.8
   tex-common/trunk/scripts/update-updmap.1
   tex-common/trunk/split-texmf
Modified:
   tex-common/trunk/TODO
   tex-common/trunk/debian/changelog
   tex-common/trunk/debian/control
   tex-common/trunk/debian/dirs
   tex-common/trunk/debian/prerm
   tex-common/trunk/debian/reportbug-control
   tex-common/trunk/debian/rules
   tex-common/trunk/debian/tex-common.links
   tex-common/trunk/doc/Debian-TeX-Policy.pdf
   tex-common/trunk/doc/Debian-TeX-Policy.sgml
   tex-common/trunk/doc/TeX-on-Debian.pdf
   tex-common/trunk/doc/TeX-on-Debian.sgml
   tex-common/trunk/scripts/dh_installtex
   tex-common/trunk/scripts/postinst-tex
   tex-common/trunk/scripts/postrm-tex
   tex-common/trunk/scripts/update-texmf
   tex-common/trunk/scripts/update-texmf.8
Log:
merge v3 branch into trunk, we don't need it anymore since it is
in unstable now


Modified: tex-common/trunk/TODO
===================================================================
--- tex-common/trunk/TODO	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/TODO	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,3 +1,6 @@
-- Manually build acl2, find out why "/usr/bin/make mini-proveall" fails.
-- remove old tetex-packages from reportbug-control as soon as the
-  migration packages have disappeared
\ No newline at end of file
+* rewrite policy and user documentation!!!
+  - updmap.d handling has disappeared
+  - texmf.d handling has changed, changes to /etc/texmf/web2c/texmf.cnf
+    are NOT USER EDITABLE ANYMORE
+    exclusive use of /etc/texmf/texmf.d
+

Deleted: tex-common/trunk/debian/COPYRIGHT.scripts
===================================================================
--- tex-common/trunk/debian/COPYRIGHT.scripts	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/COPYRIGHT.scripts	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,21 +0,0 @@
-# Copyright (C) 2004 by Frank Küster <frank at kuesterei.ch>. 
-#
-# The eperl code is taken from the auctex package, Copyright (C) 1999,
-# 2000, 01, 02, 03, 04 by Davide Giovanni Maria Salvetti.
-#
-# This file 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; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This file 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; if not, write to: The Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-#
-# On Debian GNU/Linux System you can find a copy of the GNU General Public
-# License in "/usr/share/common-licenses/GPL".

Modified: tex-common/trunk/debian/changelog
===================================================================
--- tex-common/trunk/debian/changelog	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/changelog	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,11 +1,66 @@
-tex-common (2.11~1) unstable; urgency=low
+tex-common (3.4) unstable; urgency=low
 
-  * UNRELEASED
+  * implement support for generation of language.dat.lua for luatex
+    based formats:
+    - extended update-fmtlang
+    - change and extended the format of files in hyphen.d (needs rebuild
+      of all providing packages!)
+    - adapt dh_installtex for new format
+  * start fixing the TeX-Debian-Policy document
+  * do not add a universal fail clause in the debhelper generated
+    maintainer scripts parts if the script is called with an
+    unknown argument (scripts/post{inst,rm}-tex)
+  * lintian warning: add addition makefile targets
+  * doc: first run on updated documentation
+
+ -- Norbert Preining <preining at debian.org>  Thu, 22 Mar 2012 18:08:18 +0900
+
+tex-common (3.3) experimental; urgency=low
+
+  [ Norbert Preining ]
+  * remove tpm2licenses, Tpm.pm, FileUtils.pm, this script is hopelessly
+    useless now that we don't have tpm files. 
+  * fix report-bug script configuration
+
+  [ Hilmar Preuße ]
+  * add new Polish debconf translation (Closes: #662094)
+
+ -- Norbert Preining <preining at debian.org>  Wed, 14 Mar 2012 16:55:00 +0900
+
+tex-common (3.2) experimental; urgency=low
+
+  * clean up 3.1 changelog entry
+  * don't run upgrade code on new install
+  * don't create and remove texmf.cnf if no texmf.d conffiles are present
+
+ -- Norbert Preining <preining at debian.org>  Sat, 10 Mar 2012 10:49:30 +0900
+
+tex-common (3.1) experimental; urgency=low
+
+  * only try to remove /etc/texmf/web2c if it is still here (Closes: #663029)
+  * add missing break against tex-gyre <= 2.004.1-2.1 (Closes: #663173)
+  * remove old ucf managed files with ucf instead of dpkg-maintscript-helper
+    (Closes: #663092)
+  * clean upgrade from tex-common < 3, move settings in 00updmap.cfg over
+    to /etc/texmf/web2c/updmap.cfg
+
+ -- Norbert Preining <preining at debian.org>  Sat, 10 Mar 2012 08:48:22 +0900
+
+tex-common (3.0) experimental; urgency=low
+
+  * remove all texmf.d conf files
+  * remove /var/lib/texmf/web2c/updmap.cfg in the postinst, it is disturbing!
+  * properly treat KanjiMap entries in dh_installtex
+  * postinst-tex: don't break if a fmt.d snipped has been removed
+  * bump up to 3.0, updmap.cfg is now managed differently with multi
+    enabled updmap, so all the local adaptions are not necessary anymore
   * add calls to mtxrun --generate to the mktexlsr trigger action
     in case context is installed
   * add new Dutch translation (Closes: #652627)
+  * bump standards version, no changes necessary
+  * add Breaks against old versions of all packages shipping files in updmap.d
 
- -- Norbert Preining <preining at debian.org>  Fri, 01 Jul 2011 08:23:17 +0900
+ -- Norbert Preining <preining at debian.org>  Tue, 06 Mar 2012 20:06:47 +0900
 
 tex-common (2.10) unstable; urgency=low
 

Deleted: tex-common/trunk/debian/common.functions.in
===================================================================
--- tex-common/trunk/debian/common.functions.in	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/common.functions.in	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,633 +0,0 @@
-#include common.variables
-#################################################################
-## Function definitions - included from file common.functions
-#################################################################
-# Copyright (C) 2004, 05, 06 by Frank Küster <frank at debian.org>.
-# Copyright (C) 2006 by Julian Gilbey <jdg at debian.org>.
-# $Id$
-
-# internal variables for common.functions
-SYMLINK_MOVE_EXT=<:=$SYMLINK_MOVE_EXT:>
-TEXMFSYSVARDIR=<:=$TEXMFSYSVARDIR:>
-
-debug(){
-  true "$*"
-}
-# debug(){
-#   echo -en "$*"
-# }
-
-savemove(){
-  source="$1"
-  dest="$2"
-  chown --reference=$dest $source
-  chmod --reference=$dest $source
-  mv $source $dest
-} 
-
-rename_catinfo(){
-  oldfile=$1
-  newfile=$oldfile.$MOVE_EXT
-  echo $INFO_TEXT > $newfile
-  cat $oldfile >> $newfile
-  chmod --reference=$oldfile $newfile
-  chown --reference=$oldfile $newfile
-  rm -f $oldfile
-}
-
-create_tetex_formats(){
-  options="$@"
-  printf "Running fmtutil-sys. This may take some time... "
-  # for jadetex safety (see #352391 and friends), remove old latex formats
-  if [ "$options" = "--all" ];
-    then for file in latex.fmt latex.efmt latex.log pdflatex.fmt pdflatex.efmt pdflatex.log; do
-      rm -f $TEXMFSYSVARDIR/web2c/$file
-    done
-  fi
-
-  # Working in a temporary directory avoids bad suprises caused by TeX first
-  # looking for input files in the current directory (see bug #377581).
-  tempdir=$(mktemp -d -t tetex.format_creation.XXXXXXXX) || exit 1
-  curdir="$PWD"; cd "$tempdir"
-
-  if fmtutil-sys $options >fmtutil-sys.log; then
-    cd "$curdir"
-    rm -r "$tempdir"
-    echo "done."
-  else
-    echo
-    echo "fmtutil-sys failed. Output has been stored in:"
-    echo "  $tempdir/fmtutil-sys.log"
-    echo "Please include this file if you report a bug."
-    exit 1
-  fi
-}
-
-create_fontmaps(){
-    tempfile=$(mktemp -t tetex.updmap.XXXXXXXX)
-    printf "Running updmap-sys. This may take some time... "
-    if updmap-sys 2> $tempfile; then
-      rm -f $tempfile
-      echo "done."
-    else
-      echo
-      echo "updmap-sys failed. Output has been stored in:"
-      echo "  $tempfile"
-      echo "Please include this file if you report a bug."
-      exit 1
-    fi
-    echo
-}
-
-handle_stateof_configfile(){
-  # call this function with the correct action (see below) as first
-  # argument, the configuration file to handle as second, and the 
-  # package it belongs to as third argument.
-  #
-  # If you want to understand the function, start reading the --remove
-  # action. The function cannot do all for you! What you have to do
-  # additionally in preinst is outlined in the preinst action.
-
-  CONFIG_FILE="$2"
-  PACKAGE=$3
-
-  # static variables
-  CONFSTATEDIR=<:=$confstatedir:>
-  NO_CONFIG_PREFIX=<:=$no_config_prefix:>
-  PCONFSTATEDIR=$CONFSTATEDIR/$PACKAGE
-  SAVED_CONFIG_FILE=$PCONFSTATEDIR/$(basename $CONFIG_FILE)
-  NO_CONFIG_FILE=$PCONFSTATEDIR/$NO_CONFIG_PREFIX.$(basename $CONFIG_FILE)
-  TEMP_CONFIG_FILE="$PCONFSTATEDIR/$(basename $CONFIG_FILE).tmp"
-
-  case $1 in
-    --preinst)
-      if [ ! -d "$PCONFSTATEDIR" ]; then
-	mkdir --mode=755 "$PCONFSTATEDIR"
-      fi
- 
-# here comes what you need to do in _your_ preinst script
-
-#     # if an old version is in state rc, we get "$old_version" as second arg
-#     # if an other version is installed, we will be called with upgrade.
-#     # Therefore we know that we install on a clean system if we've got 
-#     # only one argument and first argument is "install"
-#      case $1 in
-#	install)
-#	  if [ $# = 1 ] && [ ! -f $CONFIG_FILE ]; then
-#	    cat > "$TEMP_CONFIG_FILE" <<EOF
-#Put the filecontents here
-#EOF
-#	    mv "$TEMP_CONFIG_FILE" "$CONFIG_FILE"
-#
-#	  fi
-#	  ;;
-#      esac
-      ;;
-    --postinst)
-      if [ ! -f "$CONFIG_FILE" ]; then
-      # the config file does not exist (might also be deleted by the admin)
-	if [ -f "$SAVED_CONFIG_FILE" ]; then
-	# an old version was in state rc, and the admin wants the file
-	  if [ ! -f "$NO_CONFIG_FILE" ]; then
-	    mv "$SAVED_CONFIG_FILE" "$CONFIG_FILE"
-	  else
-	    echo >&2 <<EOF
-Error: 
-$SAVED_CONFIG_FILE and $NO_CONFIG_FILE
-should not be present at the same time on the system. If you did not fiddle 
-with one of these files yourself, please note carefully the last operations
-you did with $PACKAGE (installations, removals, purges, etc.) 
-and file a bug.
-EOF
-	  fi
-	fi
-      fi
-      rm -f $NO_CONFIG_FILE
-
-      ;;
-    --remove)
-      # updon remove, save away the config file (with possible local changes)
-      # or note that the local admin has deleted it.
-      if [ -f $CONFIG_FILE ]; then
-	mv $CONFIG_FILE $SAVED_CONFIG_FILE
-      elif [ ! -f $SAVED_CONFIG_FILE ]; then
-	: > $NO_CONFIG_FILE
-      fi
-      ;;
-    --purge)
-      rm -f "$CONFIG_FILE" "$SAVED_CONFIG_FILE" "$NO_CONFIG_FILE" "$TEMP_CONFIG_FILE"
-      rmdir $PCONFSTATEDIR
-      ;;
-  esac
-}
-
-preinst_move_symlink(){
-  existing_symlink="$1"
-  if [ -e $existing_symlink ] && [ -L $existing_symlink ]; then
-    echo "Removing obsolete symlink $existing_symlink."
-      mv  $existing_symlink  $existing_symlink.$SYMLINK_MOVE_EXT
-
-  fi
-}
-
-preinst_move_dir(){
-  existing_dir="$1"
-  if [ -d $existing_dir ] && [ ! -L $existing_dir ]; then
-    echo "Removing obsolete directory $existing_dir."
-      mv  $existing_dir  $existing_dir.$SYMLINK_MOVE_EXT
-
-  fi
-}
-
-# for abort-upgrade
-preinst_restore_symlink(){
-  stored_symlink="$1"
-  if [ -e $stored_symlink.$SYMLINK_MOVE_EXT ] && [ ! -e $stored_symlink ]; then
-    mv  $stored_symlink.$SYMLINK_MOVE_EXT  $stored_symlink
-  fi
-}
-
-preinst_restore_dir(){
-  stored_dir="$1"
-  if [ -e $stored_dir.$SYMLINK_MOVE_EXT ] && [ ! -e $stored_dir ]; then
-    mv  $stored_dir.$SYMLINK_MOVE_EXT  $stored_dir
-  fi
-}
-
-postinst_remove_saveddir(){
-  saveddir="$1"
-  if [ -e $saveddir.$SYMLINK_MOVE_EXT ] && \
-    [ -L $saveddir ] && \
-    [ -e $saveddir ]; # true if target exists
-    then
-    rm -r $saveddir.$SYMLINK_MOVE_EXT
-  fi
-}
-
-postinst_remove_savedlink(){
-  savedlink="$1"
-  if [ -e $savedlink.$SYMLINK_MOVE_EXT ] && \
-    [ ! -L $savedlink ] && \
-    [ -d $savedlink ];
-    then
-    rm -r $savedlink.$SYMLINK_MOVE_EXT
-  fi
-}
-
-select_lsrfile() {
-    case $1 in
-     main) LSR=$TEXMFSYSVARDIR/ls-R-TEXMFMAIN ;;
-     var)  LSR=$TEXMFSYSVARDIR/ls-R ;;
-     cache) LSR=/var/cache/fonts/ls-R ;;
-     *) echo "select_lsr: don't know how to set this: $1" >&2 ;;
-    esac
-    echo $LSR
-}
-
-clean_texenvironment(){
-  envvars="AFMFONTS BIBINPUTS BSTINPUTS CMAPFONTS CWEBINPUTS ENCFONTS GFFONTS \
-GLYPHFONTS INDEXSTYLE LIGFONTS MAILCAPLIBDIR MFBASES MFINPUTS MFPOOL MFTINPUTS \
-MIMELIBDIR MISCFONTS MISSFONT_LOG MPINPUTS MPMEMS MPPOOL MPSUPPORT MPXCOMMAND \
-OCPINPUTS OFMFONTS OPENTYPEFONTS OPLFONTS OTPINPUTS OVFFONTS OVPFONTS PDFTEXCONFIG \
-PKFONTS PSHEADERS SFDFONTS SYSTEXMF T1FONTS T42FONTS T4HTINPUTS TEX4HTFONTSET \
-TEX4HTINPUTS TEXCONFIG TEXDOCEXT TEXDOCHTML TEXDOCS TEXDOCSCOMPRESS TEXDOCSSUFFIX \
-TEXFONTMAPS TEXFORMATS TEX_HUSH TEXINPUTS TEXMF TEXMFCNF TEXMFCONFIG TEXMFDBS \
-TEXMFDIST TEXMFHOME TEXMFLOCAL TEXMFMAIN TEXMFSCRIPTS TEXMFSYSCONFIG TEXMFSYSVAR \
-TEXMFVAR TEXPICTS TEXPOOL TEXPSHEADERS TEXSOURCES TFMFONTS TRFONTS TTFONTS \
-VARTEXFONTS VFFONTS WEB2C WEBINPUTS"
-  for var in $envvars; do
-    unset $var || true
-  done
-
-}
-
-get_newfilename(){
-  file="$1" # without leading /etc/texmf
-  basedir=${file%%/*}
-  restname=$(echo ${file#*/})
-  case $basedir in
-    $file)
-      case $file in
-	modes.mf)
-	  echo metafont/misc/modes.mf
-	  ;;
-	mktex.cnf)
-	  echo web2c/mktex.cnf
-      esac
-      ;;
-    map)
-      echo fonts/$file
-      ;;
-    dvips)
-      echo $basedir/config/$restname
-      ;;
-      *)
-      echo tex/$basedir/config/$restname
-      ;;
-  esac
-}
-
-dpkg_md5sum(){
-  file=$1
-  package=$2
-  md5sum=$(dpkg-query -W -f='${Conffiles}' $package | grep "$file[[:space:]]" | cut -f 3 -d ' ')
-  if [ -z "$md5sum" ]; then
-    get_sarge_md5sum_from_list $file
-  fi
-  echo $md5sum
-}
-
-ucf_md5sum(){
-  file=$1
-  md5sum=$(grep "$file$"  /var/lib/ucf/hashfile | cut -f 1 -d ' ')
-  if [ -z "$md5sum" ]; then
-    get_sarge_md5sum_from_list $file
-  fi
-  echo $md5sum
-}
-
-
-
-sarge_md5sum_list="
- /etc/texmf/mktex.cnf 6491db33ef75bbe4f38a6dcbdcab7db8 
- /etc/texmf/modes.mf 17886f0a39f023a1830538073a743047
- /etc/texmf/context/cont-cz.ini 984f5ed1242258775b9c6e5e8b219a26
- /etc/texmf/context/cont-de.ini c2c75aaddf59e7cd1d14ef3661578eef
- /etc/texmf/context/cont-en.ini 5d7064e3adc9acdaf94e37e9bc5c1a29
- /etc/texmf/context/cont-it.ini 96366065e347eab53a30e72d9a6e4ca0
- /etc/texmf/context/cont-nl.ini 25cbcc11164d749693de4eea197a9c65
- /etc/texmf/context/cont-ro.ini a94fd43e68156f57e6bf3ac4a901af14
- /etc/texmf/context/cont-uk.ini ee6f13cd52623786f7a13c151900ec50
- /etc/texmf/context/cont-usr.tex 15b671e578d517dc54df1db022c3f412
- /etc/texmf/context/texexec.ini 1497213cfcfded9d1ae2e5546cf55fc4
- /etc/texmf/cslatex/fonttext.cfg 1129c41c24cf37f4d2cad6deca949fb1
- /etc/texmf/cslatex/hyphen.cfg 987e934d95d372902b0e1a81d3dc3802
- /etc/texmf/cyrplain/cyramstx.ini 15d4ba30419b36376851a124619e20ba
- /etc/texmf/cyrplain/cyrtex.cfg 843bd70324caf63d72269dd3afdd8eb1
- /etc/texmf/cyrplain/cyrtex.ini 40ae6def8399827a80f3736e5fb1cdf5
- /etc/texmf/cyrplain/cyrtxinf.ini 797f2dae2d06396a4b40b1454609f025
- /etc/texmf/dvipdfm/config 8713d15e9e574109c61474a3990b677f 
- /etc/texmf/dvipdfm/README.config 2731fe134e122f315d91cae400a6b13e
- /etc/texmf/dvips/config.builtin35 5775e9a2ec5e89c44f03c49a84133c76 
- /etc/texmf/dvips/config.dfaxhigh 1c7ef7c0bcc006af534241df17d1e085
- /etc/texmf/dvips/config.dfaxlo 25b7f9a41d13d188b75fb6ec63e8fa09
- /etc/texmf/dvips/config.download35 39bb1088ea568d10973f48293c205a8e
- /etc/texmf/dvips/config.gsftopk e02bc7dd315e819e349c52191837975a
- /etc/texmf/dvips/config.ps 7402075ae27071bff26ddeb1143ace07
- /etc/texmf/dvips/config.outline e671960560b7cb570aef7f19af14519a
- /etc/texmf/dvips/config.pdf d05ab1e98fcf0d2a4eccd4bb7ad9b0e4
- /etc/texmf/dvips/config.pk 44348634a3771beda74b4133a8614fa5
- /etc/texmf/dvips/config.www ba6b447883942b5f0d653d878072321b
- /etc/texmf/dvips/context.map 0c886351c178a140f3e2b6e39656ee44
- /etc/texmf/etex/etex.ini eb7eeca34d4f7c338480ae2f1e95dae6
- /etc/texmf/etex/language.def e28ea8119d0edaea53f2a55bd5a13bf5
- /etc/texmf/latex/color.cfg d77957eef96e7e9a4bdc3d1d24a49df3
- /etc/texmf/latex/graphics.cfg 3f384c52d267b7f0a50fb71fab57d60f
- /etc/texmf/latex/latex.ini 09e4f410ade0befce1e0bacf8e272789
- /etc/texmf/latex/latex209.cfg c9af399f9747715e21b6e64daa4e5916
- /etc/texmf/latex/ltxdoc.cfg 50cf6ee9115a007246d2d79e350a8592
- /etc/texmf/latex/ltxguide.cfg cc8dbfee5a57b4ae20bb77cc6aeb0e1f
- /etc/texmf/latex/texsys.cfg 055c0b3967730e2dd75dee66ccde2687
- /etc/texmf/latex/fontmath.cfg ee0a90dac1a81d3aee68f1abdbbd5839
- /etc/texmf/latex/fonttext.cfg 6be6de7b54df7d13a8831138e7f1297b
- /etc/texmf/latex/preload.cfg a2df76edd8245ce697c998dd4cbf060f
- /etc/texmf/map/dvips/context/il2-ams-cmr.map cc471142a76445139def6ad5b5202ad4
- /etc/texmf/map/dvips/context/pl0-ams-cmr.map 0bf5e38fde2a67bb4df7cdb11e499175
- /etc/texmf/pdftex/context/il2-ams-cmr.map cc471142a76445139def6ad5b5202ad4
- /etc/texmf/pdftex/context/original-adobe-euro.map ee2826182cf6f1b95890e8b7d0fc9633
- /etc/texmf/pdftex/context/original-ams-cmr.map 5912f95748bc1917f14632e48cc223ac
- /etc/texmf/pdftex/context/original-ams-euler.map 878c01a7de86554eb41ff74a0b752f5f
- /etc/texmf/pdftex/context/original-context-symbol.map 7090f11f5bee8f5e9b46841f286d1df9
- /etc/texmf/pdftex/context/original-vogel-symbol.map e4f07d28e80b93ad2513a3e812541f32
- /etc/texmf/pdftex/context/original-youngryu-px.map b17cc8cb081cb34cbff9e197c1e97512
- /etc/texmf/pdftex/context/original-youngryu-tx.map 229dbd1882f3378c4dd21e353489f03a
- /etc/texmf/pdftex/context/pl0-ams-cmr.map 0bf5e38fde2a67bb4df7cdb11e499175
- /etc/texmf/pdftex/context/pl0-ams-cmr.map 0bf5e38fde2a67bb4df7cdb11e499175
- /etc/texmf/pdftex/cmttf.map 6b87723795683cdcfd846c2d8d60cb3e
- /etc/texmf/pdftex/pdftex.cfg 8d08d2723661c86cd45e4a1408a5f923
- /etc/texmf/platex/hyphen.cfg 1199fd3dbe752e8eedaca7a5a6df9258
- /etc/texmf/platex/language.dat 8e3525fe40ae72bb08f673b30eca1236
- /etc/texmf/platex/platex.ini c865212575be3a09cbadb694a803ca55
-
- /etc/texmf/dvips/config.ams df69e80e8157afde30550f21317bbd6d 
- /etc/texmf/dvips/config.cm 363c5ef43576af28b14330ae78ed5de8 
- /etc/texmf/dvips/config.amz 0ef9213edceaaba3185a79e5946c8411 
- /etc/texmf/dvips/config.cmz 949213a1865415e6f5199188ee57419e 
- /etc/texmf/latex/SIunits.cfg e1c35ec7ca1a5a17ac67ecbdabb6990b 
- /etc/texmf/latex/draftcopy.cfg 339604ed6e259f766281201bc26a3ebf 
- /etc/texmf/latex/geometry.cfg 10ea5acebcdd8c1f6e50c6059a86fc4b 
- /etc/texmf/latex/hyperref.cfg 6865c020b50d426d7d3893193933f852 
- /etc/texmf/latex/lettrine.cfg 980963bc52386638361f704f2316092b 
- /etc/texmf/latex/seminar.con e72fce0eed20a2c0ffe505578a517937 
- /etc/texmf/latex/listings.cfg cda21886f370b2a08959be5b7c522bd0 
- /etc/texmf/latex/jblong.cfg 1ff923049f25d755e3c598f1f9bd7321 
- /etc/texmf/latex/jurabib.cfg d4655b3681c0a8be21267ee31a200164 
- /etc/texmf/latex/efxmpl.cfg 8e5a8e1829832aefb9e6190365201470 
- /etc/texmf/latex/adrplaner.cfg 26a0aedd3f777b141037b8bf0b992c92 
- /etc/texmf/latex/adrdir.cfg fafff964038150fa8cf034d92a56ee77 
- /etc/texmf/latex/adrsmall.cfg 6fdd42917d54ebb2389c6f4e4a13ae6c 
- /etc/texmf/latex/htex4ht.cfg 9f3b36f33fd350aa315a4a3a40c87ef9 
- /etc/texmf/lambda/language.dat b7b70636a817d3f75f28a107c240d2cf 
-
- /etc/texmf/dvips/config.qbk ba3f00776ea78362953c9211a09c09d7
- /etc/texmf/dvips/config.qcr 13822cff599bb1dc574a038f0d86a362
- /etc/texmf/dvips/config.qhv 7c77d2e5f9ca96fbfda5f3f6c68d8287
- /etc/texmf/dvips/config.qpl b36d7997a69aec7389a9580513750755
- /etc/texmf/dvips/config.qtm 8cc586156ba303881e41671f7d5d8227
- /etc/texmf/dvips/config.qzc ba705b343b90b615012fa41d5a7016d5
-"
-
-woody_md5sum_list="
- /etc/texmf/dvips/antp.cfg 5fdea5dec2977f321c1d39b90f161858
- /etc/texmf/dvips/antp.map 629cf954491b5092f56c79ba12761eb7
- /etc/texmf/dvips/antt.cfg eb9863fe55c45357f3e93cc0f796df7d
- /etc/texmf/dvips/antt.map 015d3ea75dda8f11ac4d3d376fc3f4f9
- /etc/texmf/dvips/ar-ext-adobe-bi.map 7587ed88b27b0e85585bc2300d1c2a9a
- /etc/texmf/dvips/ar-ext-adobe-kb.map b3e9ba6adac40cb9499d8f7c5bb7e6c3
- /etc/texmf/dvips/ar-ext-urw-kb.map 1e18d58b346a184b2c009e8a2611cf6c
- /etc/texmf/dvips/ar-ext-urw-urw.map 4613ccfaa28c351167239a049149076f
- /etc/texmf/dvips/ar-std-adobe-bi.map b8729c41827597f2a5d9dc293a6257a3
- /etc/texmf/dvips/ar-std-adobe-kb.map 4d5a5faacb6bb60ba44a040df0485c8f
- /etc/texmf/dvips/ar-std-urw-kb.map 7c95efc06585ece0cad0c73f9bbe92bb
- /etc/texmf/dvips/ar-std-urw-urw.map 512269272f1ec556035c8d4b38db4175
- /etc/texmf/dvips/bakoma-extra.map 2deed84112de63c43d532bbd1dd51afa
- /etc/texmf/dvips/bsr-interpolated.map b1810467ac2e91f76745f0eaed3eddc6
- /etc/texmf/dvips/bsr.map dd57d8b9b4cc4fee6c4869ccb637f7d3
- /etc/texmf/dvips/charter.map bcbe669e6587e1c0b9fbf5d3ac69a716
- /etc/texmf/dvips/cmcyr.map 1fa90ba90a5ac959be73acbbf993aaa6
- /etc/texmf/dvips/config.ams 32c36b063268c5e45819fe8114ce3cf0
- /etc/texmf/dvips/config.amz b9c14f2d2e3923372e9067e2e1ee47b5
- /etc/texmf/dvips/config.antp 5fdea5dec2977f321c1d39b90f161858
- /etc/texmf/dvips/config.antt eb9863fe55c45357f3e93cc0f796df7d
- /etc/texmf/dvips/config.cm 68d23ead2901dddbc1779c905806b783
- /etc/texmf/dvips/config.cmz 830f16e1e39c67b1c665a8b09824a7b4
- /etc/texmf/dvips/config.mirr 0e8b7634e3aeace8b57e240cb93408f6
- /etc/texmf/dvips/config.pl a516410ffe6bcea727b688cdbff15c45
- /etc/texmf/dvips/config.qf d8faeac49b163e20f2d5f7664fd4d312
- /etc/texmf/dvips/cs.map b9727dbb85c735942232d9e77c548892
- /etc/texmf/dvips/hoekwater.map bc6bdcc34147938cac35dd9cbfcf5461
- /etc/texmf/dvips/lucidabr.map 75651df30093b42f15a137f4e8abb2d0
- /etc/texmf/dvips/lw35extra-adobe-bi.map 11264229d954278095d041a7d406a1de
- /etc/texmf/dvips/lw35extra-adobe-kb.map b599fd43351ddf92787bc4d45b210b33
- /etc/texmf/dvips/lw35extra-urw-kb.map 22fad0272384ba9040e095cb23f5b751
- /etc/texmf/dvips/lw35extra-urw-urw.map 947b2971882ac3defc4e1539e08d7755
- /etc/texmf/dvips/marvosym.map b62e3abdcb114dbc2a09cf34f7d8d1d3
- /etc/texmf/dvips/mathpi.map b583f43ff524840a455391c507a91630
- /etc/texmf/dvips/mathpple-ext.map 34ae5407fab3660f7121fcad21016a70
- /etc/texmf/dvips/mt-belleek.map 347a0440cf51e36f53fe76e205c71280
- /etc/texmf/dvips/mt-plus.map 1a905e8e34fab38aa54af13dc1479864
- /etc/texmf/dvips/mt-yy.map 6b31a726154f4542f030d1f73186683d
- /etc/texmf/dvips/mtsupp-ext-adobe-bi.map 81bcdf8701d93786913a0139a7c37592
- /etc/texmf/dvips/mtsupp-ext-adobe-kb.map bd64720edf9c35db323305d801b11be5
- /etc/texmf/dvips/mtsupp-ext-urw-kb.map 74d836235b7c35e3af5fcef8404d6f86
- /etc/texmf/dvips/mtsupp-ext-urw-urw.map 88297fe4c49421bb283d4b70cc6edf83
- /etc/texmf/dvips/mtsupp-std-adobe-bi.map 8bb11a1c60587515f5d77170167f7f57
- /etc/texmf/dvips/mtsupp-std-adobe-kb.map 95fca79f2bb903589501b60623cf2a70
- /etc/texmf/dvips/mtsupp-std-urw-kb.map 464234ad0a8c06b5411e6bb69c69407f
- /etc/texmf/dvips/mtsupp-std-urw-urw.map 500150762c74095610b6d57250f94b3b
- /etc/texmf/dvips/omega.map 3d6c7dd276926b59b23ffdf03fb0572f
- /etc/texmf/dvips/pazo.map d3595db441a758df87659e4818b38690
- /etc/texmf/dvips/pdftex.map 3d0e6e8f2d699c2f34d07d49e4de040d
- /etc/texmf/dvips/pl.cfg a516410ffe6bcea727b688cdbff15c45
- /etc/texmf/dvips/pl.map b4c7ab7e7f366132ade80179181529b5
- /etc/texmf/dvips/ps2pk.map a5252a3d87db54b810b75296cceca7e6
- /etc/texmf/dvips/psfonts.map 30c95da0f4ba9c7fca1558212a245058
- /etc/texmf/dvips/psnfss.map f00b2d47c09074b3f7c138adac928731
- /etc/texmf/dvips/qpl.map f80cdfb21c7d47450d922bcdf2f0d741
- /etc/texmf/dvips/qtm.map 8597ab2c2c1f30a5eb338200c752bcc4
- /etc/texmf/dvips/raw-ar-ext-adobe-bi.map f625673c720a566fefc3adb2a330b0c6
- /etc/texmf/dvips/raw-ar-ext-adobe-kb.map 99fa23110abc0b6322b168cd942abb00
- /etc/texmf/dvips/raw-ar-ext-urw-kb.map a15eccb4c519784b0382e98b35462584
- /etc/texmf/dvips/raw-ar-ext-urw-urw.map 4e4c658e639ed63d6b089e970d5b8790
- /etc/texmf/dvips/raw-ar-std-adobe-bi.map 8f075586c668dd49d6659a47f80ca222
- /etc/texmf/dvips/raw-ar-std-adobe-kb.map 420803cd71d69a67d30e01414a4b0b7c
- /etc/texmf/dvips/raw-ar-std-urw-kb.map d9761c9236ba5f72a6a1db0add78e4c0
- /etc/texmf/dvips/raw-ar-std-urw-urw.map a46a2fd9dc6c2b8d1520e9c5b8947293
- /etc/texmf/dvips/raw-lw35extra-adobe-bi.map b8f9a068495e84954575da333dbff52b
- /etc/texmf/dvips/raw-lw35extra-adobe-kb.map 90090d802aa0591abd0897c836119e43
- /etc/texmf/dvips/raw-lw35extra-urw-kb.map e2ab5453857be7683779788218ea9e78
- /etc/texmf/dvips/raw-lw35extra-urw-urw.map de4b3fc35de1dc73202d1ea31a018bc7
- /etc/texmf/dvips/updmap ae1883f5a9a065d8b290943783ae5699
- /etc/texmf/dvips/utopia.map 1486b1d114c9b279cdfebaffa7a6d47f
- /etc/texmf/dvips/xypic.map 76252f9400b09fd41094c59d3ec887ae
- /etc/texmf/varfontdirs.debian 7a37da968bb865bde339fb44818ba44a
-"
-
-teTeX3_md5sumlist="
- /etc/texmf/latex/microtype.cfg 649944bb5f193e75dba7604b9515317f
- /etc/texmf/map/dvips/ams/psfonts.ams 4b9748dab405dfea8ed231f49c6d41be  
- /etc/texmf/map/dvips/ams/psfonts.amz b50e059ec6e8100fe2117c6369f481be
- /etc/texmf/map/dvips/ams/psfonts.cm 32e4fd405f16fba1efa4b30b3eb6fbb2
- /etc/texmf/map/dvips/ams/psfonts.cmz 5e4704775fe8b7a50da60d0c89bddbb6
- /etc/texmf/map/dvips/misc/eurosym.map d166c4724e8ba420f96a1f09a520a571
- /etc/texmf/map/dvips/omega/omega.map 4e8b9ee7c3eeaf1f29acfb4e8498a300
- /etc/texmf/map/dvips/tetex/bsr-interpolated.map ff9ed6a46c278b41fe8fbbb6a2dff340
- /etc/texmf/map/dvips/tetex/bsr.map 0b0b15d8614b7b0fea0e39c4e0aac0d5
- /etc/texmf/map/dvips/xypic/xypic.map 76252f9400b09fd41094c59d3ec887ae
-
- /etc/texmf/latex/mt-bch.cfg 614a80d4ecd37228b91cc2218bf2318e
- /etc/texmf/latex/mt-cmr.cfg 0628cdefd394aa8cf76e81b25b202939
- /etc/texmf/latex/mt-pad.cfg b8eb5e92c7fc74cfc76981cd2060efb1
- /etc/texmf/latex/mt-pmn.cfg 9590d6f8df10679a1bb1b3688debdc60
- /etc/texmf/latex/mt-ppl.cfg fd4be8fc50f24b2f71af4437aecd1b45
- /etc/texmf/latex/mt-ptm.cfg d45476b9dc1ccafdbe47ab3421ed6487
- /etc/texmf/latex/pict2e.cfg b16b3616fed72f01eb96e9db61b4c6b2
- /etc/texmf/latex/subfig.cfg 6576eee12179b8e6e74a61803dccd4e8
- /etc/texmf/latex/subfigure.cfg 42ba738bf6f1cec796106a69840777a4
-
- /etc/texmf/map/dvips/tetex/ttcmex.map 30b444ca3bdddc7385674a264a88fc71
- /etc/texmf/map/dvips/tetex/txfonts.map 1517cdcd00753f4cf479e1cd902e5565
- /etc/texmf/map/dvips/urwvn/urwvn.map 3957d2189b90cf29432d11f3940f07a9
- /etc/texmf/map/dvips/vntex/vnr.map e24ba6c5dba7177b97b1f09674b2efdd
- /etc/texmf/map/dvips/context/8r-base.map 79cfc6242d56d94a474f82cf68b9b4f7
- /etc/texmf/map/dvips/context/context-base.map 47f25cd8bbd06782c0c37e3a59fd2ad5
- /etc/texmf/map/dvips/context/cork-public-lm.map 52c874fe89509d5c5680f7bf065021a8
- /etc/texmf/map/dvips/context/cork-var-exclusive-public-lm.map d390da268671bfe0534a0e2f6f755ebe
- /etc/texmf/map/dvips/context/cork-var-public-lm.map a9736f8a7e667b6e25a5d73743779424
- /etc/texmf/map/dvips/context/ec-base.map dac422cda2e42ebc444a9c0a5270118d
- /etc/texmf/map/dvips/context/ec-public-lm.map 52c874fe89509d5c5680f7bf065021a8
- /etc/texmf/map/dvips/context/ec-var-exclusive-public-lm.map 8d8b3e2d03a46945abe9166ae8717980
- /etc/texmf/map/dvips/context/ec-var-public-lm.map 5bba1aec7dc180ab5c7a14a8c7f37307
- /etc/texmf/map/dvips/context/original-adobe-euro.map ee2826182cf6f1b95890e8b7d0fc9633
- /etc/texmf/map/dvips/context/original-base.map d2769316abae0730b0ba7302f8445bad
- /etc/texmf/map/dvips/context/original-context-symbol.map 7090f11f5bee8f5e9b46841f286d1df9
- /etc/texmf/map/dvips/context/original-dummy.map c73e4c248c1b10fb4c2dba637e2ab5ac
- /etc/texmf/map/dvips/context/original-empty.map c62254f50983f6bd7a9ba0b9c8a454e1
- /etc/texmf/map/dvips/context/original-micropress-informal.map b1193c3602a01d34e7325a154d7d0752
- /etc/texmf/map/dvips/context/original-public-csr.map 1b65adecb4e19df833eb7e74a0ba81f1
- /etc/texmf/map/dvips/context/original-public-lm.map 0e1d5937d6b78e933e6e9c82ef9aef60
- /etc/texmf/map/dvips/context/original-public-plr.map bb5e9c65080da1f780d52ca6d665c53b
- /etc/texmf/map/dvips/context/original-vogel-symbol.map e4f07d28e80b93ad2513a3e812541f32
- /etc/texmf/map/dvips/context/psclean.map 3827b27c947b8ccf50010649d7deebd0
- /etc/texmf/map/dvips/context/qx-base.map 114614226629844c7e2895907254747b
- /etc/texmf/map/dvips/context/qx-public-lm.map 6f4469307efb3d5219f8a59eb90439a0
- /etc/texmf/map/dvips/context/texnansi-base.map 4b4834091ada92c2bea9d04d64f367cc
- /etc/texmf/map/dvips/context/texnansi-public-lm.map 19dd099ceadcc329c4b6a46e8c1f8837
- /etc/texmf/map/dvips/context/texnansi-var-exclusive-public-lm.map f06fac31ec825d35a478551652c28764
- /etc/texmf/map/dvips/context/texnansi-var-public-lm.map 9114ed6275fb2d9e17bb5fb7de8d76a6
- /etc/texmf/map/dvips/context/original-public-vnr.map f83114a5d4489dea4223d3d54dbaed2a
- /etc/texmf/map/dvips/context/t5-base.map edfab2c556e71e69081803d366c32f36
- /etc/texmf/map/dvips/context/t5-public-lm.map ba63279e67979c19cadcd2115b1a9b8d
- /etc/texmf/map/dvipdfm/tetex/cm-dvipdfm-fix.map 6df4e61f14013914f4c232465f38b096
- /etc/texmf/map/pdftex/cmttf/cmttf.map 6b87723795683cdcfd846c2d8d60cb3e
- /etc/texmf/map/dvips/tetex/contnav.map 841fb6fa662cdee17994748492e8493c
- /etc/texmf/generic/pdftexconfig.tex edd42bc8e0c2768a6e84c3bd5f41eb4a
- /etc/texmf/generic/fontmath.cfg bf78874db3d6425f6f98d7dc6fd3ad74
- /etc/texmf/generic/fonttext.cfg 1871c2f77ee3c2ea6bad3c786d4b6b4f
- /etc/texmf/generic/preload.cfg 63a7532825e1f8f5742fa392577e9101
- /etc/texmf/map/dvips/context/original-ams-euler.map baef813cea1c95eaf5782cd5c4db593d
- /etc/texmf/map/dvips/context/original-ams-cmr.map 9f6c7359622ba2fe1cbbe36c8b40c07f
- /etc/texmf/map/dvips/context/original-youngryu-tx.map efd89c4c9790b92c19dd9c94307c2497
- /etc/texmf/pdftex/context/original-youngryu-px.map aac975fbf317cb2c3af057ae011f0356
-
- /etc/texmf/map/dvips/qfonts/qbk.map a880a86dc59af79fa21176109426e002
- /etc/texmf/map/dvips/qfonts/qcr.map 0dde05fe1edf9d22c1c33abb308337b5
- /etc/texmf/map/dvips/qfonts/qhv.map 1b7d8cecc9b2037b4e14be6aec821425
- /etc/texmf/map/dvips/qfonts/qpl.map 7d59433ee7e9ba0bab61973797280d01
- /etc/texmf/map/dvips/qfonts/qtm.map 440385da4f2f40e53440d9e0e7782a6b
- /etc/texmf/map/dvips/qfonts/qzc.map 59e87840844241fe3eede78368c13ff6
- /etc/texmf/map/dvips/tetex/dvipdfm35.map ed194cf7240a45cb458c5ec174045cc6
- /etc/texmf/map/dvips/tetex/dvips35.map ca61c59bcecd9f75c90f8b03416533f9
- /etc/texmf/map/dvips/tetex/hoekwater.map bc6bdcc34147938cac35dd9cbfcf5461
- /etc/texmf/map/dvips/tetex/lucidabr-o.map d8125ebea10915ba2e5ab2d5168f1a4e
- /etc/texmf/map/dvips/tetex/lumath-o.map 374a42867948c28911301aa8ae4b9f73
- /etc/texmf/map/dvips/tetex/mathpple.map bc2531931c6ab748e6a507803cc06f28
- /etc/texmf/map/dvips/tetex/mt-belleek.map 347a0440cf51e36f53fe76e205c71280
- /etc/texmf/map/dvips/tetex/mt-plus.map 4895bcb036ff481e067daec1a196b25a
- /etc/texmf/map/dvips/tetex/mt-yy.map 7fb24232a249e9e899c97eaf33f6a7af
- /etc/texmf/map/dvips/tetex/pdftex35.map 29f11fe462735f27af57ca893e37362d
- /etc/texmf/map/dvips/tetex/ps2pk35.map f0d12d8dd8472e7fee1019c46b8718b6
- /etc/texmf/map/dvips/tetex/pxfonts.map d92a7aba5febb36b3179de747bd7c099
-
- /etc/texmf/map/dvips/antp/antp.map 50e9ff27840e0c2225fe2ab10658b5d3
- /etc/texmf/map/dvips/antt/cork-antt.map b6d42f790e3bff20f56735ff6b612f57
- /etc/texmf/map/dvips/antt/cs-antt.map 19e8e4a13d77ca47e0a0c1acb254ad0d
- /etc/texmf/map/dvips/antt/exp-antt.map 08919cd0c39577f860f8b4c7a64c2b3d
- /etc/texmf/map/dvips/antt/greek-antt.map 67f6c7038c5963663bd5516c10acba4e
- /etc/texmf/map/dvips/antt/qx-antt.map 669ebfc8198223b41e4008ef3d74f508
- /etc/texmf/map/dvips/antt/t2a-antt.map 1c9bd0a971ecf0cfa0e9ee9c57bbb100
- /etc/texmf/map/dvips/antt/t2b-antt.map 0f3018935e9047a6965941dc1899fdfa
- /etc/texmf/map/dvips/antt/t2c-antt.map 1d57e45d10a6d9015e393cf7160be328
- /etc/texmf/map/dvips/antt/texnansi-antt.map 4baf42d2478c8a7e7d7e19b7dff03256
- /etc/texmf/map/dvips/antt/wncy-antt.map 60aeb6f763540cb9eae371bf6977c84f
- /etc/texmf/map/dvips/antt/t5-antt.map afbb27d29fbebd8976f22623811a940e
- /etc/texmf/map/dvips/cc-pl/ccpl.map f2b809a52174b30918426e94ef56b86b
- /etc/texmf/map/dvips/lucida/lucidabr-k.map 30174ed3e1f4cba2731c22dd9571f1b1
- /etc/texmf/map/dvips/lucida/lucidabr.map c3b6c5489b772e235158b3c22117a95a
- /etc/texmf/map/dvips/lucida/lumath-k.map ef1b8f1edbab74b19e450d732c8befa4
- /etc/texmf/map/dvips/lucida/lumath.map fed199fec8770f09c201208602978e04
- /etc/texmf/map/dvips/misc/cmcyr.map 1fa90ba90a5ac959be73acbbf993aaa6
- /etc/texmf/map/dvips/misc/cs.map b9727dbb85c735942232d9e77c548892
- /etc/texmf/map/dvips/misc/marvosym.map b62e3abdcb114dbc2a09cf34f7d8d1d3
- /etc/texmf/map/dvips/misc/pcrr8rn.map 798d4ca99e50961a24f8eaea20978ceb
- /etc/texmf/map/dvips/misc/dstroke.map 48c4f60d6a6326675a9c377c8d835e6a
- /etc/texmf/map/dvips/pl/pl.map facfcd8e0cfd0be291ea542fb6c10148
- /etc/texmf/map/dvips/psnfss/charter.map 993695ecc0d071d7fc3377129338cba1
- /etc/texmf/map/dvips/psnfss/pazo.map d3595db441a758df87659e4818b38690
- /etc/texmf/map/dvips/psnfss/psnfss.map 9bc5893a55f916e90839073715bbc390
- /etc/texmf/map/dvips/psnfss/fpls.map 277c296a5fed1dab839c3b50169b22cf
- /etc/texmf/map/dvips/psnfssx/pcr8y.map d50bbaffee15c71b4f37a3e57ef8ae92
- /etc/texmf/map/dvips/psnfssx/phv8y.map 1a5eb8c9a441bf0f828212b0b3be535e
- /etc/texmf/map/dvips/psnfssx/ptm8y.map 2f3991312960f9f9fd00156b34c0b4de
- /etc/texmf/plain/language.def e28ea8119d0edaea53f2a55bd5a13bf5
-
- /etc/texmf/map/dvips/psnfssx/README.mapfiles de70bcb7f559055385f0b450fce51d03
- /etc/texmf/dvips/omega.cfg 20f3291d20f52a0af681cea63d491f22
- /etc/texmf/dvips/config.omega 20f3291d20f52a0af681cea63d491f22
- /etc/texmf/context/texexec.rme aca8d2729ceb83bc24852c0876cf884b
-
- /etc/texmf/language.d/00tetex.cnf e057f645b860c3b4ac92a9b5a127c43e
-"
-
-get_sarge_md5sum_from_list(){
-  file=$1
-  set $sarge_md5sum_list $woody_md5sum_list $teTeX3_md5sumlist
-  while [ $# -gt 0 ]; do
-    if [ $file = $1 ]; then
-      echo $2
-      return 0
-    else
-      shift 2
-    fi
-  done
-  echo "$file: md5sum not known. Exiting" >&2
-  exit 1
-}
-
-preinst_remove_or_move(){
-  file=/etc/texmf/$1
-  newname=$(get_newfilename $1)
-  debug $file
-  test -f "$file" || return 0
-  debug "handled\n"
-  oldmd5sum=$(dpkg_md5sum $file)
-  currmd5sum=$(md5sum $file | cut -d ' ' -f 1)
-  if [ "$oldmd5sum" != "$currmd5sum" ]; then
-    mv $file $oldstuff_dir/$(basename $file).$PREINST_MOVE_EXT
-  else
-    rm $file
-  fi
-}
-preinst_remove_or_move_ucf(){
-  file=/etc/texmf/$1
-  newname=$(get_newfilename $1)
-  debug $file
-  test -f "$file" || return 0
-  debug "handled\n"
-  oldmd5sum=$(ucf_md5sum $file)
-  currmd5sum=$(md5sum $file | cut -d ' ' -f 1)
-  if [ "$oldmd5sum" != "$currmd5sum" ]; then
-    mv $file $oldstuff_dir/$(basename $file).$PREINST_MOVE_EXT
-  else
-    rm $file
-    if [ -x /usr/bin/ucf ]; then ucf --purge $file; fi
-  fi
-}
-
-
-
-#################################################################
-##  End of function definitions from file common.functions
-#################################################################
-
-

Deleted: tex-common/trunk/debian/common.variables
===================================================================
--- tex-common/trunk/debian/common.variables	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/common.variables	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,75 +0,0 @@
-<:
-# Copyright (C) 1999, 2000, 01, 02 by Davide Giovanni Maria Salvetti <salve at debian.org>.
-# Copyright (C) 2004, 05, 06 by Frank Küster <frank at debian.org>.
-# Copyright (C) 2006 by Julian Gilbey <jdg at debian.org>.
-# $Id$
-# this list is from dpkg-1.10.9/include/dpkg.h.in:
-$DPKG_EXTENSIONS="'~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist";
-$PREINST_MOVE_EXT="preinst-bak";
-$POSTINST_MOVE_EXT="postinst-bak";
-$PURGE_EXTENSIONS="$DPKG_EXTENSIONS $PREINST_MOVE_EXT $POSTINST_MOVE_EXT";
-# package specific
-$ETC="/etc/";
-$etc="/etc/texmf/";
-$doc="/usr/share/doc/$PACKAGE/";
-$TEXMFSYSVARDIR="/var/lib/texmf";
-$FONTMAP_MEMORY_DIR="/var/lib/tex-common/fontmap-cfg";
-$LANGUAGE_MEMORY_DIR="/var/lib/tex-common/language-cnf";
-$LANGUAGE_DIR="$etc/language.d";
-$LDAT_PATTERNS=<<EOL;
-  inhyph.tex bahyph.tex cahyph.tex hrhyph.tex czhyph.tex \\
-  dehypht.tex dehyphn.tex dkhyphen.tex nehyph.tex fi8hyph.tex frhyph.tex \\
-  gahyph.tex grhyph.tex icehyph.tex ithyph.tex lahyph.tex huhyph.tex \\
-  nohyph.tex nohyphb.tex nohyphbc.tex plhyph.tex pt8hyph.tex rohyphen.tex \\
-  ruhyphen.tex sehyph.tex skhyph.tex sihyph23.tex sphyph.tex trhyph.tex \\
-  ukrhyph.tex ukrhyph.t2a ukrhyph.lcy ukrhyph.ot2
-EOL
-$TEXMF_CNF="/etc/texmf/texmf.cnf";
- at TEXMF_PARTS=qw(05TeXMF 15Plain 45TeXinputs 55Fonts 65BibTeX 75DviPS
-		80DVIPDFMx 85Misc 90TeXDoc 95NonPath);
- at TEXMF_PARTS_FULLNAME = map { "texmf.d/$_.cnf"; } @TEXMF_PARTS;
-$TEX_COMMON_UCF_FILES="@TEXMF_PARTS_FULLNAME updmap.d/00updmap.cfg";
-#$confstatedir="/var/lib/tetex";
-#$no_config_prefix="admin-wants-no";
-$LSRS="/var/lib/texmf/ls-R /var/lib/texmf/ls-R-TEXMFMAIN /var/lib/texmf/ls-R-LOCAL /var/cache/fonts/ls-R";
-# get the package version - must be usable in subdirectories, too)
-open CHANGELOG, "debian/changelog" or die "Can't open debian/changelog: $!\n";
-# get the version even if the first line is blank
-while ($VERSION=<CHANGELOG>) {
-    last if $VERSION=~s/^$PACKAGE \((.*)\).*\n$/$1/;
-}
-# compute the corresponding version for a sarge backport
-($rev=$VERSION) =~ s/^.*-(\d+)[^\-]*$/$1/;
-if ($rev == 0) {
-  # if the debian revision is 0 or 0.x, don't make a backport
-    $SARGEVERSION = '';
-} else {
-    ($SARGEVERSION=$VERSION) =~ s/^(.*)$/$1~bpo.1/;
-#   ($SARGEVERSION=$VERSION)=~s/(.*-)$rev(.*)/$1$rev.0.sarge1/;
-}
-$FIRST_BASE_VERSION_WITH_COMMON="3.0-4";
-$README_sarge = (-e 'sarge-stamp') ? 'debian/sarge/README.sarge' : '';
-# upgrading stuff
-$SYMLINK_MOVE_EXT="moved-by-preinst";
-# debconf
-$CONFMODULE="/usr/share/debconf/confmodule";
-# docbase
-$DINSTALL="test -x /usr/sbin/install-docs && install-docs --install";
-$DREMOVE="test -x /usr/sbin/install-docs && install-docs --remove";
-$docbase="/usr/share/doc-base/";
-# info
-$IINSTALL=qq[install-info --section "$INFOSEC" "$INFOSEC"] .
-	    qq[ --menuentry="$INFOMENU" --description="$INFODESC" --quiet];
-$IREMOVE="install-info --quiet --remove";
-$info="/usr/share/info/";
-# misc
-$GPL="/usr/share/common-licenses/GPL";
-open COPYRIGHT, 'debian/COPYRIGHT.scripts'
-    or die "Couldn't open debian/COPYRIGHT.scripts: $!\n";
- at COPYRIGHT=<COPYRIGHT>;
-close(COPYRIGHT);
-
-# local variables:
-# mode: perl
-# end:
-:>//

Copied: tex-common/trunk/debian/config (from rev 5258, tex-common/branches/v3/debian/config)
===================================================================
--- tex-common/trunk/debian/config	                        (rev 0)
+++ tex-common/trunk/debian/config	2012-03-24 07:13:14 UTC (rev 5285)
@@ -0,0 +1,67 @@
+#!/bin/sh -e
+# 
+# config maintainer script for the Debian tex-common package.
+#
+# Copyright (C) 2004 by Frank Küster <frank at kuesterei.ch>. 
+# Copyright (C) 2012 by Norbert Preining <preining at debian.org>.
+#
+# This file 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; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This file 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; if not, write to: The Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+#
+# On Debian GNU/Linux System you can find a copy of the GNU General Public
+# License in "/usr/share/common-licenses/GPL".
+
+# Give names to the commandline arguments
+action=$1
+installed_version=$2
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+## do the things we have to do for upgraders from old versions
+# it does not harm to do the checks also when $action is reconfigure.
+
+# we also unregister the tetex-bin/lsr-perms
+db_unregister tetex-bin/lsr-perms || true
+
+# and unregister old tex-common questions, they are not needed anymore
+db_unregister tex-common/groupperm || true
+db_unregister tex-common/userperm || true
+db_unregister tex-common/managedlsr || true
+db_unregister tex-common/cnf_name || true
+
+# now we can also unregister the managecache questions
+db_unregister tex-common/groupname || true
+db_unregister tex-common/groupname_single || true
+db_unregister tex-common/groupname_multi || true
+db_unregister tex-common/managecache || true
+db_unregister tex-common/invalid_groupname || true
+db_unregister tex-common/warn_mktexcnf || true
+
+# test whether mktex.cnf exists in TEXMFSYSCONFIG and warn the user
+# mktex.cnf in TEXMFCONFIG will have the same effect, but all we can provide
+# in this case is the message in NEWS.Debian
+#
+# disabled, we ship mktex.cnf again in /etc/texmf/web2c/, see bug 379089
+# if [ -f /etc/texmf/web2c/mktex.cnf ]; then
+#   db_input medium tex-common/warn_mktexcnf || true
+#   db_go
+# fi
+
+
+# Local Variables:
+# mode: shell-script
+# skeleton-pair: t
+# End:
+

Deleted: tex-common/trunk/debian/config.in
===================================================================
--- tex-common/trunk/debian/config.in	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/config.in	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,58 +0,0 @@
-#include variables
-#!/bin/sh -e
-# 
-# config maintainer script for the Debian <:=${PACKAGE}:> package.
-# $Id: config.in 114 2005-08-04 15:04:01Z frn $
-<:=@COPYRIGHT:>//
-
-# Give names to the commandline arguments
-action=$1
-installed_version=$2
-
-# common variables
-FONTCACHE_PERMS=<:=$FONTCACHE_PERMS:>
-
-
-
-. <:=${CONFMODULE}:>
-db_version 2.0
-
-<:open(FUNCTIONS,'common.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
-<:=@FUNCTIONS:>//
-
-## do the things we have to do for upgraders from old versions
-# it does not harm to do the checks also when $action is reconfigure.
-
-# we also unregister the tetex-bin/lsr-perms
-db_unregister tetex-bin/lsr-perms || true
-
-# and unregister old tex-common questions, they are not needed anymore
-db_unregister tex-common/groupperm || true
-db_unregister tex-common/userperm || true
-db_unregister tex-common/managedlsr || true
-db_unregister tex-common/cnf_name || true
-
-# now we can also unregister the managecache questions
-db_unregister tex-common/groupname || true
-db_unregister tex-common/groupname_single || true
-db_unregister tex-common/groupname_multi || true
-db_unregister tex-common/managecache || true
-db_unregister tex-common/invalid_groupname || true
-db_unregister tex-common/warn_mktexcnf || true
-
-# test whether mktex.cnf exists in TEXMFSYSCONFIG and warn the user
-# mktex.cnf in TEXMFCONFIG will have the same effect, but all we can provide
-# in this case is the message in NEWS.Debian
-#
-# disabled, we ship mktex.cnf again in /etc/texmf/web2c/, see bug 379089
-# if [ -f /etc/texmf/web2c/mktex.cnf ]; then
-#   db_input medium tex-common/warn_mktexcnf || true
-#   db_go
-# fi
-
-
-# Local Variables:
-# mode: shell-script
-# skeleton-pair: t
-# End:
-

Modified: tex-common/trunk/debian/control
===================================================================
--- tex-common/trunk/debian/control	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/control	2012-03-24 07:13:14 UTC (rev 5285)
@@ -3,9 +3,9 @@
 Priority: optional
 Maintainer: Debian TeX maintainers <debian-tex-maint at lists.debian.org>
 Uploaders: Julian Gilbey <jdg at debian.org>, C.M. Connelly <cmc at debian.org>, Atsuhito KOHDA <kohda at debian.org>, Frank Küster <frank at debian.org>, Florent Rougon <frn at debian.org>, Norbert Preining <preining at debian.org>
-Build-Depends: debhelper (>= 5.0.0), po-debconf
-Build-Depends-Indep: debiandoc-sgml, eperl
-Standards-Version: 3.9.2
+Build-Depends: debhelper (>= 8.1.0~), po-debconf
+Build-Depends-Indep: debiandoc-sgml
+Standards-Version: 3.9.3
 Vcs-Svn: svn://svn.debian.org/svn/debian-tex/tex-common/trunk
 Vcs-Browser: http://svn.debian.org/wsvn/debian-tex/tex-common/trunk/
 
@@ -14,7 +14,8 @@
 Depends: ${misc:Depends}, ucf, debconf (>= 1.4.69) | cdebconf (>= 0.39), dpkg (>= 1.14.18)
 Suggests: debhelper (>= 7.0.8)
 Replaces: tetex-base (<= 3.0-10), dvipdfmx
-Conflicts: tetex-base (<< 2007), texlive-common (<< 2009), context (<< 2011.05.18.20110627-1)
+Conflicts: tetex-base (<< 2007), texlive-common (<< 2009), context (<= 2011.05.18.20110627-1)
+Breaks: texlive-common (<< 2010), tipa (<= 2:1.3-15), itrans (<= 5.3-10), gregoriotex (<= 2.0-1.1), cm-super (<= 0.3.4-4), cm-super-minimal (<= 0.3.4-4), latex-cjk-chinese-arphic-bkai00mp (<= 1.21+nmu1), latex-cjk-japanese-wadalab (<= 0.20050817-15), latex-fonts-sipa-arundina (<= 0.2.0-1), latex-fonts-thai-tlwg (<= 1:0.5.0-1), lmodern (<= 2.004.1-3.1), ko.tex-base (<= 0.1.0+20071012-1), ko.tex-extra (<= 0.1.0+20071012-1), latex-cjk-chinese-arphic-bsmi00lp (<= 1.21+nmu1), latex-cjk-chinese-arphic-gbsn00lp (<= 1.21+nmu1), latex-cjk-chinese-arphic-gkai00mp (<= 1.21+nmu1), latex-cjk-thai (<= 4.8.2+git20111216-1), latex-sanskrit (<= 2.2-8), musixtex (<= 1:0.115-2), scalable-cyrfonts-tex (<= 4.15), tex-gyre (<= 2.004.1-2.1)
 Description: common infrastructure for building and installing TeX
  This package contains a number of scripts and common configuration
  files that are needed to install a TeX System.

Modified: tex-common/trunk/debian/dirs
===================================================================
--- tex-common/trunk/debian/dirs	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/dirs	2012-03-24 07:13:14 UTC (rev 5285)
@@ -8,12 +8,10 @@
 usr/share/lintian/overrides
 etc/texmf/fmt.d
 etc/texmf/hyphen.d
-etc/texmf/texmf.d
-etc/texmf/updmap.d
 etc/texmf/language.d
+etc/texmf/texmf.d
 var/lib/texmf/web2c
 var/lib/texmf/tex/generic/config
-var/lib/tex-common/fontmap-cfg
 var/lib/tex-common/hyphen-cnf
 var/lib/tex-common/fmtutil-cnf
 var/cache/fonts

Copied: tex-common/trunk/debian/maintscript (from rev 5258, tex-common/branches/v3/debian/maintscript)
===================================================================
--- tex-common/trunk/debian/maintscript	                        (rev 0)
+++ tex-common/trunk/debian/maintscript	2012-03-24 07:13:14 UTC (rev 5285)
@@ -0,0 +1 @@
+rm_conffile /etc/texmf/language.d/00tex.cnf 2.11

Copied: tex-common/trunk/debian/po/pl.po (from rev 5258, tex-common/branches/v3/debian/po/pl.po)
===================================================================
--- tex-common/trunk/debian/po/pl.po	                        (rev 0)
+++ tex-common/trunk/debian/po/pl.po	2012-03-24 07:13:14 UTC (rev 5285)
@@ -0,0 +1,75 @@
+# Translation of tex-common debconf templates to Polish.
+# Copyright (C) 2009
+# This file is distributed under the same license as the tex-common package.
+#
+# Michał Kułach <michal.kulach at gmail.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: tex-common at packages.debian.org\n"
+"POT-Creation-Date: 2009-03-17 21:50+0100\n"
+"PO-Revision-Date: 2012-03-04 02:11+0100\n"
+"Last-Translator: Michał Kułach <michal.kulach at gmail.com>\n"
+"Language-Team: Polish <debian-l10n-polish at lists.debian.org>\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+
+#. Type: error
+#. Description
+#: ../templates:2001
+msgid "Essential entry missing in ${filename}"
+msgstr "Brakuje istotnego wpisu w ${filename}"
+
+#. Type: error
+#. Description
+#: ../templates:2001
+msgid "An essential entry is missing in ${filename}:"
+msgstr "W pliku ${filename} brakuje istotnego wpisu:"
+
+#. Type: error
+#. Description
+#: ../templates:2001
+msgid "No setting of ${variable}."
+msgstr "Brak ustawienia dla zmiennej ${variable}."
+
+#. Type: error
+#. Description
+#. Type: error
+#. Description
+#: ../templates:2001 ../templates:3001
+msgid ""
+"TeX will not work until the configuration files are fixed. The version of "
+"${filename} that is provided by the package should be available as "
+"${filename}.ucf-dist."
+msgstr ""
+"TeX nie będzie działał dopóki pliki konfiguracyjne nie zostaną poprawione. "
+"Wersja ${filename}, którą udostępnia pakiet, powinna być dostępna pod nazwą "
+"${filename}.ucf-dist."
+
+#. Type: error
+#. Description
+#. Type: error
+#. Description
+#: ../templates:2001 ../templates:3001
+msgid "The configuration process has been aborted."
+msgstr "Proces konfiguracji został przerwany."
+
+#. Type: error
+#. Description
+#: ../templates:3001
+msgid "Invalid essential entry in ${filename}"
+msgstr "Nieprawidłowy istotny wpis w ${filename}"
+
+#. Type: error
+#. Description
+#: ../templates:3001
+msgid ""
+"An essential entry is invalid in ${filename}: ${variable} does not contain:"
+msgstr ""
+"Istotny wpis w pliku ${filename} jest nieprawidłowy: zmienna ${variable} nie "
+"zawiera:"

Copied: tex-common/trunk/debian/postinst (from rev 5258, tex-common/branches/v3/debian/postinst)
===================================================================
--- tex-common/trunk/debian/postinst	                        (rev 0)
+++ tex-common/trunk/debian/postinst	2012-03-24 07:13:14 UTC (rev 5285)
@@ -0,0 +1,547 @@
+#!/bin/sh -e
+# 
+# postinst maintainer script for the Debian tex-common package.
+#
+# Copyright (C) 2004 by Frank Küster <frank at kuesterei.ch>. 
+# Copyright (C) 2012 by Norbert Preining <preining at debian.org>
+#
+# This file 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; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This file 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; if not, write to: The Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+#
+# On Debian GNU/Linux System you can find a copy of the GNU General Public
+# License in "/usr/share/common-licenses/GPL".
+
+umask 022
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+
+
+# Give a name to the first commandline argument
+action=$1
+trigger=$2
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+cleanup()
+{
+  rc=$?
+  [ -n "$tempdir" ] && rm -rf "$tempdir"
+  exit $rc
+}
+
+dhit_libkpathsea_configured ()
+{
+    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
+}
+
+run_mtxrun_if_possible()
+{
+    # code from postinst-tex
+    if dhit_libkpathsea_configured; then
+        if which mtxrun >/dev/null; then
+            # we also have to check that texlive-base is installed
+            # and configured, otherwise we cannot be sure that
+            # all necessary basic files are present
+            #
+            # dpkg-query has two defects wrt not existing packages
+            # - it is noisy to stderr
+            # - it returns 1
+            # so shut both errors up
+            stat=$(dpkg-query -W -f='${Status}' context 2>/dev/null || true)
+            case "$stat" in
+                "install ok installed")
+                    do_it=1
+                    ;;
+                *)
+                    do_it=0
+                    ;;
+            esac
+            if [ "$do_it" = 1 ] ; then
+                tempfile=$(mktemp -p /tmp mtxrun.XXXXXXXX)
+                printf "Running mtxrun --generate. This may take some time... "
+                if mtxrun --generate > $tempfile 2>&1 ; then
+                    rm -f $tempfile
+                    echo "done."
+                else
+                    exec >&2
+                    echo
+                    echo "mtxrun --generate 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
+}
+
+do_triggers() 
+{
+    # vars used to record what we have done already, not to make
+    # it two times
+    DONE_FULL_LSR=0
+    DONE_MTXRUN=0
+    # currently we only support only triggers for updmap.d and
+    # language.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.
+
+    # in any case call the update-* calls
+    update-language
+    update-fmtutil
+    #
+    # the following triggers are reacted upon and in that order:
+    # - texmf-lsr: call mktexlsr if present
+    # - texmf-lsrfull: call mktexlsr if present
+    # - texmf-map: call updmap-sys
+    # - texmf-hyphen: if texmf-format hasn't been triggered call 
+    #                 fmtutil-sys --byhyphen ...
+    case " $trigger " in
+        *" texmf-lsrfull "*)
+            # 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 $FULLTEXMFTREES > $tempfile 2>&1 ; then
+                        DONE_FULL_LSR=1
+                        rm -f $tempfile
+                        echo "done."
+                    else
+                        exec >&2
+                        echo
+                        echo "mktexlsr $FULLTEXMFTREES failed. Output has been stored in"
+                        echo "$tempfile"
+                        echo "Please include this file if you report a bug."
+                        echo
+                        exit 1
+                    fi
+                fi
+            fi
+            if [ $DONE_MTXRUN = 0 ] ; then
+                run_mtxrun_if_possible
+                DONE_MTXRUN=1
+            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-lsr "*)
+          # only to lsr if we haven't done lsrfull
+          if [ $DONE_FULL_LSR = 0 ] ; then
+            # 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 $TEXMFTREES > $tempfile 2>&1 ; then
+                        rm -f $tempfile
+                        echo "done."
+                    else
+                        exec >&2
+                        echo
+                        echo "mktexlsr $TEXMFTREES 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
+          if [ $DONE_MTXRUN = 0 ] ; then
+              run_mtxrun_if_possible
+              DONE_MTXRUN=1
+          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-map "*) 
+         # code from postinst-tex
+         if dhit_libkpathsea_configured; then
+             if which updmap-sys >/dev/null; then
+                    # we also have to check that texlive-base is installed
+                    # and configured, otherwise we cannot be sure that
+                    # all necessary basic files are present
+                    #
+                    # dpkg-query has two defects wrt not existing packages
+                    # - it is noisy to stderr
+                    # - it returns 1
+                    # so shut both errors up
+                    stat=$(dpkg-query -W -f='${Status}' texlive-base 2>/dev/null || true)
+                    case "$stat" in
+                        "install ok installed")
+                            do_it=1
+                            ;;
+                        *)
+                            do_it=0
+                            ;;
+                    esac
+                    if [ "$do_it" = 0 ] ; then
+                        echo "texlive-base is not ready, delaying updmap-sys call" >&2
+                    else
+                        tempfile=$(mktemp -p /tmp updmap.XXXXXXXX)
+                        printf "Running updmap-sys. This may take some time... "
+                        # call updmap with --nohash so that no ls-R files
+                        # are created in /usr/local/share/texmf/
+                        # see bug report #607857
+                        # instead of that we call mktexlsr $TEXMFSYSVARDIR 
+                        # afterwards. This can be done without checks as
+                        # we know that dhit_libkpathsea_configured and
+                        # since mktexlsr and updmap are in the same package
+                        # and we checked for updmap already
+                        if updmap-sys --nohash > $tempfile 2>&1 ; then
+                            rm -f $tempfile
+                            echo "done."
+                            tempfile=$(mktemp -p /tmp mktexlsr.XXXXXXXX)
+                            printf "Running mktexlsr $TEXMFSYSVARDIR ... "
+                            if mktexlsr $TEXMFSYSVARDIR > $tempfile 2>&1 ; then
+                                rm -f $tempfile
+                                echo "done."
+                            else
+                                exec >&2
+                                echo
+                                echo "mktexlsr $TEXMFSYSVARDIR failed. Output has been stored in"
+                                echo "$tempfile"
+                                echo "Please include this file if you report a bug."
+                                echo
+                                exit 1
+                            fi
+                        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
+            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-hyphen "*) 
+          if dhit_libkpathsea_configured; then
+            if which kpsewhich >/dev/null; then
+              if which fmtutil-sys >/dev/null; then
+                # code from postinst.tex
+                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:]]*latex[[:space:]]" $fmtcnffile || true)
+                if [ -n "$X" ] ; then
+                  # latex is installed so we can actually try to recreate
+                  # formats based on language.dat
+                  tempfile=$(mktemp -p /tmp fmtutil.XXXXXXXX)
+                  printf "Building latex-based formats --byhyphen $(kpsewhich language.dat).\n\tThis may take some time... "
+                  if fmtutil-sys --byhyphen "$(kpsewhich language.dat)" > $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
+                fi
+                Y=$(grep "^[[:space:]]*tex[[:space:]]" $fmtcnffile || true)
+                if [ -n "$Y" ] ; then
+                  # tex is installed so we can actually try to recreate
+                  # formats based on language.def
+                  tempfile=$(mktemp -p /tmp fmtutil.XXXXXXXX)
+                  printf "Building e-tex based formats --byhyphen $(kpsewhich language.def).\n\tThis may take some time... "
+                  if fmtutil-sys --byhyphen "$(kpsewhich language.def)" > $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
+                fi
+              fi
+            fi
+          fi
+        ;;
+    esac
+}
+
+ucf_is_changed() {
+  file=$1
+  if  [ "$(ucfq --with-colons $file | cut -f 4 --delimiter=:)" = "Yes" ] ; then
+    # shell return codes are reverted!
+    return 0
+  else
+    return 1
+  fi
+}
+
+cfgval()
+{
+  cnfFile="$1"
+  opt="$2"
+  cat "$cnfFile" | sed -n 's/^'"$opt"'[  =][     =]*//p' | sed q
+}
+
+
+#################################################################
+# Here starts the real action
+#################################################################
+
+
+case $action in
+    triggered)
+        do_triggers
+        ;;
+
+    configure|reconfigure)
+
+    # remove old language.dat file, it is not used anymore
+    if [ -f /etc/texmf/language.dat ] ; then
+        old_ldat_md5sum=`md5sum /etc/texmf/language.dat`
+        if [ ! "$old_ldat_md5sum" = fe9baf0768ade79a585a9df568dac5f6 ] && \
+            [ ! "$old_ldat_md5sum" = 1d2d9b25a41ab1cec892bd3382af7645 ]; then
+            cat > /etc/texmf/language.dat.postinst-bak <<EOF
+This file is no longer used and has therefore been renamed by the postinst 
+script of the tex-common package.
+
+Please use the mechanism described in update-language(8) instead.
+
+EOF
+            cat /etc/texmf/language.dat >> /etc/texmf/language.dat.postinst-bak
+        fi
+        rm /etc/texmf/language.dat
+    fi
+
+    # if we are upgrading from a 1 < version < 3 we do the full upgrade stuff
+    # we saved the second argument into $trigger, which contains now 
+    # the version
+    # using the double check also guarantees that the code is NOT executed
+    # on new installs, where $trigger is empty
+    if dpkg --compare-versions "$trigger" lt "3" && dpkg --compare-versions "$trigger" gt 1 ; then
+        #
+        # whatever we do, we remove the updmap.cfg file in /var/lib/texmf/web2c!!
+        # it was created by former versions of update-updmap and disturbs the 
+        # peace in the new system!
+        rm -f /var/lib/texmf/web2c/updmap.cfg
+
+        # purge the old texmf.cnf file
+        ucf --purge /etc/texmf/texmf.cnf
+        if test -x "`which ucfr`" ; then
+            ucfr --purge tex-common /etc/texmf/texmf.cnf
+        fi
+        rm /etc/texmf/texmf.cnf
+        rm -f /etc/texmf/texmf.cnf.ucf-new
+        rm -f /etc/texmf/texmf.cnf.ucf-old
+        rm -f /etc/texmf/texmf.cnf.ucf-dist
+
+        #
+        # ucf files that will be removed
+        UCF_REMOVE="texmf.d/05TeXMF.cnf texmf.d/15Plain.cnf texmf.d/45TeXinputs.cnf texmf.d/55Fonts.cnf texmf.d/65BibTeX.cnf texmf.d/75DviPS.cnf texmf.d/80DVIPDFMx.cnf texmf.d/85Misc.cnf texmf.d/90TeXDoc.cnf texmf.d/95NonPath.cnf"
+        for i in $UCF_REMOVE ; do
+            file=/etc/texmf/$i
+            if [ -r $file ] ; then
+                if ucf_is_changed $file ; then
+                    cat > $file.postinst-bak <<EOF
+This file is no longer used and has therefore been renamed by the postinst 
+script of the tex-common package.
+EOF
+                    cat $file >> $file.postinst-bak
+                fi
+                rm $file
+                rm -f $file.ucf-old
+                rm -f $file.ucf-new
+                rm -f $file.ucf-dist
+            fi
+            ucf --purge $file
+            if test -x "`which ucfr`" ; then
+                ucfr --purge tex-common $file
+            fi
+        done
+
+        # move changed settings from 00updmap.cfg to /etc/texmf/web2c/updmap.cfg
+        if [ -r /etc/texmf/updmap.d/00updmap.cfg ]; then
+            if [ ! -r /etc/texmf/web2c/updmap.cfg ] ; then
+                # these are the defaults in tex-common < 3 
+                dflt_dvipsPreferOutline=true
+                dflt_LW35=URWkb
+                dflt_dvipsDownloadBase35=false
+                dflt_pdftexDownloadBase14=true
+                dflt_dvipdfmDownloadBase14=true
+                options="dvipsPreferOutline LW35 pdftexDownloadBase14 dvipdfmDownloadBase14 dvipsDownloadBase35"
+                SETTING_CHANGED=false
+                tempdir=`mktemp -d`
+                tempfile=`mktemp -p $tempdir`
+                trap 'cleanup' HUP INT QUIT BUS PIPE TERM
+                for option in $options; do
+                    eval $option=`cfgval /etc/texmf/updmap.d/00updmap.cfg $option`
+                    if eval [ ! "\$$option" = "\$dflt_$option" ]; then
+                        # the defaults in tex-common < 3 and TL2012 are the
+                        # same with one exception: dvipsDownloadBase35
+                        # it was false in tex-common and true in TL2012
+                        #
+                        if [ ! $option = dvipsDownloadBase35 ] ; then
+                            # options agree between TL2012 and tex-common < 3
+                            # so move the change over!
+                            SETTING_CHANGED=true
+                            eval optvalue=\$$option
+                            echo "$option = $optvalue" >> $tempfile
+                        else
+                            # dvipsDownloadBase35 case
+                            # in tex-common the default was false
+                            # now it is true
+                            # since the admin changed it from false -> true
+                            # and now it is true anyway, we don't write
+                            # anything for this case
+                            :
+                        fi
+
+                    fi
+                done
+                if [ "$SETTING_CHANGED" = "true" ]; then
+                    mkdir -p /etc/texmf/web2c/
+                    mv $tempfile /etc/texmf/web2c/updmap.cfg
+                fi
+            fi
+            rm /etc/texmf/updmap.d/00updmap.cfg
+            rm -f /etc/texmf/updmap.d/00updmap.cfg.ucf-old
+            rm -f /etc/texmf/updmap.d/00updmap.cfg.ucf-new
+            rm -f /etc/texmf/updmap.d/00updmap.cfg.ucf-dist
+            ucf --purge /etc/texmf/updmap.d/00updmap.cfg
+            if test -x "`which ucfr`" ; then
+                ucfr --purge tex-common /etc/texmf/updmap.d/00updmap.cfg
+            fi
+            # try to remove the now hopefully empty dir
+            rmdir --ignore-fail-on-non-empty /etc/texmf/updmap.d 
+        fi
+
+    # end of upgrade from versions < 3
+    fi    
+
+    # after we have removed the left overs from old times
+    # create/update texmf.cnf
+    update-texmf
+
+    #
+    # call trigger action
+    # that calls mktexlsr if possible, and update-*
+    # we set the triggers updmap.d
+    #
+    trigger="texmf-lsr texmf-map"
+    do_triggers
+
+
+    # now call the equivalent of fmtutil-sys --all explicitely
+    # we also have to check that texlive-base is installed
+    # and configured, otherwise we cannot be sure that
+    # all necessary basic files are present
+    if dhit_libkpathsea_configured; then
+        # see above for information on dpkg-query usage
+        stat=$(dpkg-query -W -f='${Status}' texlive-base  2>/dev/null || true)
+        case "$stat" in
+        "install ok installed")
+            do_it=1
+            ;;
+        *)
+            do_it=0
+            ;;
+        esac
+        if [ "$do_it" = 0 ] ; then
+            echo "texlive-base is not ready, skipping fmtutil-sys --all call" >&2
+        else
+            dhit_build_format --all
+        fi
+    fi
+
+
+    # create empty dirs in /usr/local/share/
+    if [ ! -e /usr/local/share/texmf ]
+    then
+      if mkdir -p /usr/local/share/texmf 2>/dev/null
+      then
+        chown root:staff /usr/local/share/texmf
+        chmod 2775 /usr/local/share/texmf
+      fi
+    fi
+
+    ;;
+  *)
+    ;;
+esac
+
+
+#DEBHELPER#
+
+### Local Variables:
+### perl-indent-level: 4
+### tab-width: 4
+### indent-tabs-mode: nil
+### End:
+# vim:set tabstop=4 expandtab: #

Deleted: tex-common/trunk/debian/postinst.functions
===================================================================
--- tex-common/trunk/debian/postinst.functions	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/postinst.functions	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,87 +0,0 @@
-#################################################################
-## Function definitions - included from file postinst.functions
-#################################################################
-
-# variables needed, please set in the main file
-# POSTINST_MOVE_EXT
-
-###############################################################################
-# cfgval(variable)
-#   read variable ($1) from config file, first match wins
-###############################################################################
-# from tetex-bin's updmap
-cfgval()
-{
-  cnfFile="$1"
-  opt="$2"
-  cat "$cnfFile" | sed -n 's/^'"$opt"'[	 =][	 =]*//p' | sed q
-}
-
-cleanup()
-{
-  rc=$?
-  [ -n "$tempdir" ] && rm -rf "$tempdir"
-  exit $rc
-}
-
-check_texmf(){
-  file=$1
-  variable=$2
-  pattern="$3"
-  removepattern='( |=)'
-  line=""
-  line=`egrep "^$variable" $file` || true
-  if [ -z "$line" ]; then
-    variable=${variable%$removepattern}
-    db_subst tex-common/check_texmf_missing filename $file || true
-    db_subst tex-common/check_texmf_missing variable $variable || true
-    db_fset tex-common/check_texmf_missing seen false || true
-    db_input critical tex-common/check_texmf_missing || true
-    db_go || true
-    echo "Error in $file: $variable not defined." >&2
-    checkfailed=true
-  else
-    if ! echo "$line" | egrep -q "$pattern"; then
-      variable=${variable%$removepattern}
-      # remove the slashes that escape the $ signs:
-      pattern=$(echo $pattern |  sed -e 's@[\]@@g')
-      db_subst tex-common/check_texmf_wrong filename $file || true
-      db_subst tex-common/check_texmf_wrong variable $variable || true
-      db_subst tex-common/check_texmf_wrong pattern $pattern || true
-      db_fset tex-common/check_texmf_wrong seen false || true
-      db_input critical  tex-common/check_texmf_wrong || true
-      db_go || true
-      echo "Error in $file: $variable incorrectly defined." >&2
-      checkfailed=true
-    fi
-  fi
-}
-
-dhit_libkpathsea_configured ()
-{
-    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
-#################################################################

Deleted: tex-common/trunk/debian/postinst.in
===================================================================
--- tex-common/trunk/debian/postinst.in	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/postinst.in	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,481 +0,0 @@
-<::>//
-#!/bin/sh -e
-# 
-# postinst maintainer script for the Debian <:=${PACKAGE}:> package.
-# $Id$
-
-#include variables
-<:=@COPYRIGHT:>//
-
-
-## Define static variables we need
-UCF_FILES="<:=$TEX_COMMON_UCF_FILES:>"
-TEXMFSYSVARDIR="<:=$TEXMFSYSVARDIR:>"
-UCF="ucf --debconf-ok"
-#UCF="ucf -d --debconf-ok --verbose"
-OLD_LDAT=/etc/texmf/language.dat
-POSTINST_MOVE_EXT="<:=$POSTINST_MOVE_EXT:>"
-FONTCACHE_PERMS=<:=$FONTCACHE_PERMS:>
-
-TEXMFTREES="/usr/share/texmf $TEXMFSYSVARDIR"
-FULLTEXMFTREES="$TEXMFTREES /usr/share/texmf-texlive"
-
-
-umask 022
-
-# Give a name to the first commandline argument
-action=$1
-trigger=$2
-
-. <:=${CONFMODULE}:>
-db_version 2.0
-
-<:open(FUNCTIONS,'debian/postinst.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
-<:=@FUNCTIONS:>//
-
-# <:open(FUNCTIONS,'debian/common.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
-# <:=@FUNCTIONS:>//
-
-
-run_mtxrun_if_possible()
-{
-    # code from postinst-tex
-    if dhit_libkpathsea_configured; then
-        if which mtxrun >/dev/null; then
-            # we also have to check that texlive-base is installed
-            # and configured, otherwise we cannot be sure that
-            # all necessary basic files are present
-            #
-            # dpkg-query has two defects wrt not existing packages
-            # - it is noisy to stderr
-            # - it returns 1
-            # so shut both errors up
-            stat=$(dpkg-query -W -f='${Status}' context 2>/dev/null || true)
-            case "$stat" in
-                "install ok installed")
-                    do_it=1
-                    ;;
-                *)
-                    do_it=0
-                    ;;
-            esac
-            if [ "$do_it" = 1 ] ; then
-                tempfile=$(mktemp -p /tmp mtxrun.XXXXXXXX)
-                printf "Running mtxrun --generate. This may take some time... "
-                if mtxrun --generate > $tempfile 2>&1 ; then
-                    rm -f $tempfile
-                    echo "done."
-                else
-                    exec >&2
-                    echo
-                    echo "mtxrun --generate 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
-}
-
-do_triggers() 
-{
-    DONE_FULL_LSR=0
-    # currently we only support only triggers for updmap.d and
-    # language.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.
-
-    # in any case call the update-* calls
-    update-updmap --quiet
-    update-language
-    update-fmtutil
-    #
-    # the following triggers are reacted upon and in that order:
-    # - texmf-lsr: call mktexlsr if present
-    # - texmf-lsrfull: call mktexlsr if present
-    # - texmf-map: call updmap-sys
-    # - texmf-hyphen: if texmf-format hasn't been triggered call 
-    #                 fmtutil-sys --byhyphen ...
-    case " $trigger " in
-        *" texmf-lsrfull "*)
-            # 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 $FULLTEXMFTREES > $tempfile 2>&1 ; then
-                        DONE_FULL_LSR=1
-                        rm -f $tempfile
-                        echo "done."
-                    else
-                        exec >&2
-                        echo
-                        echo "mktexlsr $FULLTEXMFTREES failed. Output has been stored in"
-                        echo "$tempfile"
-                        echo "Please include this file if you report a bug."
-                        echo
-                        exit 1
-                    fi
-                fi
-            fi
-            run_mtxrun_if_possible
-        ;;
-    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-lsr "*)
-          # only to lsr if we haven't done lsrfull
-          if [ $DONE_FULL_LSR = 0 ] ; then
-            # 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 $TEXMFTREES > $tempfile 2>&1 ; then
-                        rm -f $tempfile
-                        echo "done."
-                    else
-                        exec >&2
-                        echo
-                        echo "mktexlsr $TEXMFTREES 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
-          run_mtxrun_if_possible
-        ;;
-    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-map "*) 
-         # code from postinst-tex
-         if dhit_libkpathsea_configured; then
-             if which updmap-sys >/dev/null; then
-                    # we also have to check that texlive-base is installed
-                    # and configured, otherwise we cannot be sure that
-                    # all necessary basic files are present
-                    #
-                    # dpkg-query has two defects wrt not existing packages
-                    # - it is noisy to stderr
-                    # - it returns 1
-                    # so shut both errors up
-                    stat=$(dpkg-query -W -f='${Status}' texlive-base 2>/dev/null || true)
-                    case "$stat" in
-                        "install ok installed")
-                            do_it=1
-                            ;;
-                        *)
-                            do_it=0
-                            ;;
-                    esac
-                    if [ "$do_it" = 0 ] ; then
-                        echo "texlive-base is not ready, delaying updmap-sys call" >&2
-                    else
-                        tempfile=$(mktemp -p /tmp updmap.XXXXXXXX)
-                        printf "Running updmap-sys. This may take some time... "
-                        # call updmap with --nohash so that no ls-R files
-                        # are created in /usr/local/share/texmf/
-                        # see bug report #607857
-                        # instead of that we call mktexlsr $TEXMFSYSVARDIR 
-                        # afterwards. This can be done without checks as
-                        # we know that dhit_libkpathsea_configured and
-                        # since mktexlsr and updmap are in the same package
-                        # and we checked for updmap already
-                        if updmap-sys --nohash > $tempfile 2>&1 ; then
-                            rm -f $tempfile
-                            echo "done."
-                            tempfile=$(mktemp -p /tmp mktexlsr.XXXXXXXX)
-                            printf "Running mktexlsr $TEXMFSYSVARDIR ... "
-                            if mktexlsr $TEXMFSYSVARDIR > $tempfile 2>&1 ; then
-                                rm -f $tempfile
-                                echo "done."
-                            else
-                                exec >&2
-                                echo
-                                echo "mktexlsr $TEXMFSYSVARDIR failed. Output has been stored in"
-                                echo "$tempfile"
-                                echo "Please include this file if you report a bug."
-                                echo
-                                exit 1
-                            fi
-                        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
-            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-hyphen "*) 
-          if dhit_libkpathsea_configured; then
-            if which kpsewhich >/dev/null; then
-              if which fmtutil-sys >/dev/null; then
-                # code from postinst.tex
-                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:]]*latex[[:space:]]" $fmtcnffile || true)
-                if [ -n "$X" ] ; then
-                  # latex is installed so we can actually try to recreate
-                  # formats based on language.dat
-                  tempfile=$(mktemp -p /tmp fmtutil.XXXXXXXX)
-                  printf "Building latex-based formats --byhyphen $(kpsewhich language.dat).\n\tThis may take some time... "
-                  if fmtutil-sys --byhyphen "$(kpsewhich language.dat)" > $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
-                fi
-                Y=$(grep "^[[:space:]]*tex[[:space:]]" $fmtcnffile || true)
-                if [ -n "$Y" ] ; then
-                  # tex is installed so we can actually try to recreate
-                  # formats based on language.def
-                  tempfile=$(mktemp -p /tmp fmtutil.XXXXXXXX)
-                  printf "Building e-tex based formats --byhyphen $(kpsewhich language.def).\n\tThis may take some time... "
-                  if fmtutil-sys --byhyphen "$(kpsewhich language.def)" > $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
-                fi
-              fi
-            fi
-          fi
-        ;;
-    esac
-}
-
-
-#################################################################
-# Here starts the real action
-#################################################################
-
-
-case $action in
-    triggered)
-        do_triggers
-        ;;
-
-    configure|reconfigure)
-
-# is there a file /etc/texmf/language.dat already? Move it out of the way
-    if [ -f $OLD_LDAT ]; then
-      old_ldat_md5sum=`md5sum $OLD_LDAT`
-      # do nothing if the md5sum matches sarge's or woody's default:
-      if [ ! "$old_ldat_md5sum" = fe9baf0768ade79a585a9df568dac5f6 ] && \
-	[ ! "$old_ldat_md5sum" = 1d2d9b25a41ab1cec892bd3382af7645 ]; then
-	cat > $OLD_LDAT.$POSTINST_MOVE_EXT <<EOF
-This file is no longer used and has therefore been renamed by the postinst 
-script of the tetex-base package.
-
-Please use the mechanism described in update-language(8) instead.
-
-EOF
-	cat $OLD_LDAT >> $OLD_LDAT.$POSTINST_MOVE_EXT 
-      fi
-      rm $OLD_LDAT
-    fi
-
-
-# normal install    
-    # handle ucf-managed configuration files
-    for file in $UCF_FILES; do
-      $UCF /usr/share/tex-common/`basename $file` /etc/texmf/$file
-      if test -x "`which ucfr`" ; then
-        ucfr tex-common /etc/texmf/$file
-      fi
-    done
-
-# remove left over fmt/efmt/log files in /usr/share/texmf/web2c/.  If they are
-# there, it's because of an old bug or user misconfiguration, and they are
-# never registered to dpkg.
-#
-# move out of the way old config files
-# 
-    if [ -d /usr/share/texmf/web2c ] ; then
-      rm -rf /usr/share/texmf/web2c/*.fmt
-      rm -rf /usr/share/texmf/web2c/*.efmt
-      rm -rf /usr/share/texmf/web2c/*.base
-      rm -rf /usr/share/texmf/web2c/*.log
-      for cfgfile in fmtutil.cnf updmap.cfg ; do
-        oldname=/usr/share/texmf/web2c/$cfgfile
-	newname=/usr/share/texmf/web2c/$cfgfile.pre-upgrade
-        if [ -r $oldname ] ; then
-	  cat - > $newname <<EOF
-# This file conflicts with the new configuration location.
-# Please merge your changes to the correct location.
-
-EOF
-	  cat $oldname >> $newname
-	  rm $oldname
-	fi
-      done
-    fi
-
-# if the machine was originally upgraded from woody to sarge, and now
-# to etch, it will have a bogus generated configuration file.  This
-# will break with TeXlive, therefore we remove it
-    bogusfile=/etc/texmf/fmt.d/99postinst.cnf
-    if [ -f $bogusfile ]; then
-      tmpfile=`mktemp`
-      egrep -v \
-	"mf[[:space:]]*mf[[:space:]]*-[[:space:]]*mf.ini|\
-mfw[[:space:]]*mfw[[:space:]]*-[[:space:]]*mf.ini|\
-pdftex[[:space:]]*pdftex[[:space:]]*language.dat[[:space:]]*pdftex.ini|\
-omega[[:space:]]*omega[[:space:]]*language.dat*[[:space:]]*omega.ini" \
-	$bogusfile > $tmpfile
-      if !  egrep -v '^#|^[[:space:]]*$' $tmpfile >/dev/null; then
-	# only comments in tmpfile
-	cat >> $bogusfile.bak <<EOF
-
-This file has been renamed by the post-installation script of
-tex-common.  It is unused and contains only lines that were
-erroneously detected as being a local configuration file change.
-
-
-EOF
-	cat $bogusfile >> $bogusfile.bak
-	chmod 664 $bogusfile.bak
-	chown root:root $bogusfile.bak
-	rm $bogusfile
-      fi
-      rm $tmpfile
-    fi
-
-
-
-    update-texmf
-# Now we check for some essential settings
-    checkfailed=false
-    check_texmf /etc/texmf/texmf.d/55Fonts.cnf TEXFONTMAPS \
-'\$TEXMF/{fonts/,}map//;\$TEXMF/dvips//|\.;\$TEXMF{/fonts/map,}{/\$progname,/pdftex,/dvips,}//'
-    check_texmf /etc/texmf/texmf.cnf TEXFONTMAPS \
-'\$TEXMF/{fonts/,}map//;\$TEXMF/dvips//|\.;\$TEXMF{/fonts/map,}{/\$progname,/pdftex,/dvips,}//'
-    check_texmf /etc/texmf/texmf.d/05TeXMF.cnf TEXMFMAIN '/usr/share/texmf'
-    check_texmf /etc/texmf/texmf.cnf TEXMFMAIN '/usr/share/texmf'
-    check_texmf /etc/texmf/texmf.d/05TeXMF.cnf TEXMFDIST \
-          '/usr/share/texmf-{tetex,texlive}|/usr/share/texmf-{texlive,tetex}|/usr/share/texmf-texlive'
-    check_texmf /etc/texmf/texmf.cnf TEXMFDIST \
-          '/usr/share/texmf-{tetex,texlive}|/usr/share/texmf-{texlive,tetex}|/usr/share/texmf-texlive'
-    check_texmf /etc/texmf/texmf.d/05TeXMF.cnf 'TEXMF( |=)' TEXMFSYSCONFIG
-    check_texmf /etc/texmf/texmf.cnf 'TEXMF( |=)' TEXMFSYSCONFIG
-    check_texmf /etc/texmf/texmf.d/05TeXMF.cnf 'TEXMF( |=)' TEXMFSYSVAR
-    check_texmf /etc/texmf/texmf.cnf 'TEXMF( |=)' TEXMFSYSVAR
-    check_texmf /etc/texmf/texmf.d/05TeXMF.cnf 'TEXMF( |=)' TEXMFMAIN
-    check_texmf /etc/texmf/texmf.cnf 'TEXMF( |=)' TEXMFMAIN
-    check_texmf /etc/texmf/texmf.d/05TeXMF.cnf 'TEXMF( |=)' TEXMFDIST
-    check_texmf /etc/texmf/texmf.cnf 'TEXMF( |=)' TEXMFDIST
-
-    if [ $checkfailed = true ]; then
-      echo "Unrecoverable errors in your configuration have been detected" >&2
-      echo "in configuration files in /etc/texmf/." >&2
-      echo "If you've not seen debconf error messages,  see your mail for details" >&2
-      echo "or use an interactive debconf frontend." >&2
-      echo >&2
-      echo "Exiting" >&2
-
-      exit 1
-    fi
-
-
-    #
-    # call trigger action
-    # that calls mktexlsr if possible, and update-*
-    # we set the triggers updmap.d
-    #
-    trigger="texmf-lsr texmf-map"
-    do_triggers
-
-
-    # now call the equivalent of fmtutil-sys --all explicitely
-    # we also have to check that texlive-base is installed
-    # and configured, otherwise we cannot be sure that
-    # all necessary basic files are present
-    if dhit_libkpathsea_configured; then
-        # see above for information on dpkg-query usage
-        stat=$(dpkg-query -W -f='${Status}' texlive-base  2>/dev/null || true)
-        case "$stat" in
-        "install ok installed")
-            do_it=1
-            ;;
-        *)
-            do_it=0
-            ;;
-        esac
-        if [ "$do_it" = 0 ] ; then
-            echo "texlive-base is not ready, skipping fmtutil-sys --all call" >&2
-        else
-            dhit_build_format --all
-        fi
-    fi
-
-
-    # create empty dirs in /usr/local/share/
-    if [ ! -e /usr/local/share/texmf ]
-    then
-      if mkdir -p /usr/local/share/texmf 2>/dev/null
-      then
-        chown root:staff /usr/local/share/texmf
-        chmod 2775 /usr/local/share/texmf
-      fi
-    fi
-
-    ;;
-  *)
-    ;;
-esac
-
-
-#DEBHELPER#
-
-### Local Variables:
-### perl-indent-level: 4
-### tab-width: 4
-### indent-tabs-mode: nil
-### End:
-# vim:set tabstop=4 expandtab: #

Copied: tex-common/trunk/debian/postrm (from rev 5258, tex-common/branches/v3/debian/postrm)
===================================================================
--- tex-common/trunk/debian/postrm	                        (rev 0)
+++ tex-common/trunk/debian/postrm	2012-03-24 07:13:14 UTC (rev 5285)
@@ -0,0 +1,59 @@
+#!/bin/sh -e
+# 
+# postrm maintainer script for the Debian tex-common package.
+#
+# Copyright (C) 2004 by Frank Küster <frank at kuesterei.ch>. 
+# Copyright (C) 2012 by Norbert Preining <preining at debian.org>.
+#
+# This file 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; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This file 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; if not, write to: The Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+#
+# On Debian GNU/Linux System you can find a copy of the GNU General Public
+# License in "/usr/share/common-licenses/GPL".
+
+# give commandline args a name
+action=$1 # remove, purge, upgrade, failed-upgrade, abort-install, abort-upgrade, disappear
+
+## do the things we have to do always
+case $action in
+  remove)
+    # remove TEXMFSYSVARDIR: All files and dirs are created either by
+    # us, or by packages depending on us.
+    rm -rf /var/lib/texmf
+    # same with obsolete /var/cache/fonts
+    rm -rf /var/cache/fonts
+    ;;
+  purge)
+    # TODO purge ucf files
+
+    # remove texmf.cnf
+    if [ -d /etc/texmf/web2c ] ; then
+      rm -rf /etc/texmf/web2c/texmf.cnf
+      rmdir --ignore-fail-on-non-empty /etc/texmf/web2c
+    fi
+
+    # try to remove /usr/local/share/texmf if it is empty
+    # people should normally not have TEXMFLOCAL ls-R files
+    # unless they called mktexlsr manually, in which case this is fine
+    # maintainer scripts should call mktexlsr with a list of trees so
+    # no /u/l/s/texmf/ls-R is created
+    #rm -f /usr/local/share/texmf/ls-R 2>/dev/null || true
+    rmdir --ignore-fail-on-non-empty /usr/local/share/texmf/ 2>/dev/null || true
+    ;;
+  *)
+    ;;
+esac
+
+#DEBHELPER#
+

Deleted: tex-common/trunk/debian/postrm.functions
===================================================================
--- tex-common/trunk/debian/postrm.functions	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/postrm.functions	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,24 +0,0 @@
-#################################################################
-## Function definitions - included from file postrm.functions
-#################################################################
-
-purge_file () {
-  local conffile
-  conffile="$1"
-  for ext in $PURGE_EXTENSIONS; do
-    rm -f "${conffile}.${ext}"
-  done
-  rm -f "${conffile}"
-}
-purge_ucf_file () {
-  local conffile
-  conffile="$1"
-  purge_file $conffile
-  if [ -x /usr/bin/ucf ]; then
-    ucf --purge "${conffile}"
-  fi
-  if [ -x /usr/bin/ucfr ]; then
-    ucfr --purge tex-common "${conffile}"
-  fi
-}
-

Deleted: tex-common/trunk/debian/postrm.in
===================================================================
--- tex-common/trunk/debian/postrm.in	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/postrm.in	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,52 +0,0 @@
-<::>//
-#!/bin/sh -e
-# 
-# postrm maintainer script for the Debian <:=${PACKAGE}:> package.
-# $Id$
-
-#include variables
-<:=@COPYRIGHT:>//
-
-## variables
-PURGE_EXTENSIONS="<:=$PURGE_EXTENSIONS:>"
-UCF_FILES="<:=$TEX_COMMON_UCF_FILES:>"
-TEXMFSYSVARDIR="<:=$TEXMFSYSVARDIR:>"
-
-# give commandline args a name
-action=$1 # remove, purge, upgrade, failed-upgrade, abort-install, abort-upgrade, disappear
-
-<:open(FUNCTIONS,'debian/postrm.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
-<:=@FUNCTIONS:>//
-
-## do the things we have to do always
-case $action in
-  remove)
-    # remove TEXMFSYSVARDIR: All files and dirs are created either by
-    # us, or by packages depending on us.
-    rm -rf $TEXMFSYSVARDIR
-    # same with obsolete /var/cache/fonts
-    rm -rf /var/cache/fonts
-    ;;
-  purge)
-    # purge texmf_parts
-    for file in $UCF_FILES; do
-      purge_ucf_file /etc/texmf/$file
-    done
-    # purge texmf.cnf which is generated by update-texmf using ucf:
-    purge_ucf_file  /etc/texmf/texmf.cnf
-
-    # try to remove /usr/local/share/texmf if it is empty
-    # people should normally not have TEXMFLOCAL ls-R files
-    # unless they called mktexlsr manually, in which case this is fine
-    # maintainer scripts should call mktexlsr with a list of trees so
-    # no /u/l/s/texmf/ls-R is created
-    #rm -f /usr/local/share/texmf/ls-R 2>/dev/null || true
-    rmdir --ignore-fail-on-non-empty /usr/local/share/texmf/ 2>/dev/null || true
-    ;;
-  *)
-    ;;
-esac
-
-
-#DEBHELPER#
-

Deleted: tex-common/trunk/debian/preinst.in
===================================================================
--- tex-common/trunk/debian/preinst.in	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/preinst.in	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,160 +0,0 @@
-<::>//
-#!/bin/sh -e
-# 
-# preinst maintainer script for the Debian tex-common package.
-# $Id$
-# don't try to understand this generated script as installed with the package.
-# instead, look at the source files in the source package
-
-#include variables
-<:=@COPYRIGHT:>//
-
-## Variables needed for upgrading
-FIRST_VERSION_WITH_UPGRADE_PATH=0.3
-
-#################################################################
-# Functions
-#################################################################
-
-###############################################################################
-# cfgval(variable)
-#   read variable ($1) from config file, first match wins
-#   this is a copy of a function in postinst.functions
-###############################################################################
-# from tetex-bin's updmap
-cfgval()
-{
-  cnfFile="$1"
-  opt="$2"
-  cat "$cnfFile" | sed -n 's/^'"$opt"'[	 =][	 =]*//p' | sed q
-}
-
-###############################################################################
-# updmap_extract ()
-#   we extract the settings from an existing 00updmap.cfg that belonged to
-#   tetex-base.  If the settings are unchanged from tetex-base's defaults 
-#   (2.0.2), ucf will know the md5sum and make the changes 2.0.2->3.0
-###############################################################################
-updmap_extract(){
-  # 
-  # The file itself is stored, so that tetex-base can also extract its settings.
-  conffile=/etc/texmf/updmap.d/00updmap.cfg
-  dfltfile=/usr/share/tex-common/00updmap.cfg
-  keepfile=/etc/texmf/updmap.d/10tetex-base.cfg.postinst-old
-  tetex_base_file=/etc/texmf/updmap.d/10tetex-base.cfg
-  oldmd5sum="82884281d955998e22141cf67b45209d"
-  options="dvipsPreferOutline pdftexDownloadBase14 dvipdfmDownloadBase14 dvipsDownloadBase35 LW35"
-
-  # is no old version installed?
-  test ! -f "$conffile" && return 0 || true
-  
-  # is it changed?
-  if [ ! "$oldmd5sum" = "`md5sum $conffile | cut -d ' ' -f 1`" ]; then
-    # changed.
-
-    # stow away a copy for tetex-base
-    if [ ! -f $keepfile ]; then
-      cat > $keepfile <<EOF
-This file contains the parts of what was called 00updmap.cfg in 
-teTeX-2.0.2 that now are handled by tetex-base in 10tetex-base.cfg, 
-or tetex-extra in 20tetex-extra.cfg.
-
-If you have local changes, please transfer them manually.  Changes 
-in the items that are still in 00updmap.cfg have been transferred.
-
-EOF
-      sed -e '0,/^# Map files should be marked by/ d; 1,/^$/ d' \
-	$conffile >> $keepfile
-    fi
-
-    # get the new defaults
-#     for option in $options; do
-#       eval dflt_$option=`cfgval $dfltfile $option`
-#     done
-    # set the settings we had in tetex-base 2.0.2
-    dflt_dvipsPreferOutline=true
-    dflt_LW35=URWkb
-    dflt_pdftexDownloadBase14=false
-    dflt_dvipdfmDownloadBase14=false
-    dflt_dvipsDownloadBase35=false
-
-    # compare with current settings, and create a new file
-    SETTING_CHANGED=false
-    tempdir=`mktemp -d`
-    tempfile1=`mktemp -p $tempdir`
-    trap 'cleanup' HUP INT QUIT BUS PIPE TERM
-    cp -p $dfltfile $tempfile1
-    for option in $options; do
-      eval $option=`cfgval $conffile $option`
-      if eval [ ! "\$$option" = "\$dflt_$option" ]; then
-	SETTING_CHANGED=true
-	tempfile2=`mktemp -p $tempdir`
-	optname=$option
-	eval optvalue=\$$option
-	eval optoldvalue=\$dflt_$option
-	sed -e "s@^[[:space:]]*$optname[[:space:]]*$optoldvalue@$optname $optvalue@" $tempfile1 > $tempfile2
-	mv $tempfile2 $tempfile1
-      fi
-    done
-    if [ "$SETTING_CHANGED" = "true" ]; then
-      # this mv command will give a "conffile changed by you or a script" message next time
-      # we change it - but that is exactly what has happened: The user has changed options, 
-      # and the script has just transferred them to a new file.
-      mv $tempfile1 $conffile
-      chmod a+r $conffile
-    else
-      # this part is unchanged, just remove and ucf-purge the file, it will be
-      # reinstalled by postinst (a copy is already saved).
-      rm -f $tempfile1 $conffile
-      ucf --purge $conffile
-      if test -x "`which ucfr`" ; then
-        ucfr --purge tex-common $conffileA
-      fi
-    fi
-    rm -rf "$tempdir"
-
-  else
-    # unchanged, just remove  and ucf-purge the file, it will be
-    # reinstalled by postinst 
-    rm -f $conffile
-    ucf --purge $conffile
-    if test -x "`which ucfr`" ; then
-      ucfr --purge tex-common $conffile
-    fi
-  fi
-
-}
-
-# <:open(FUNCTIONS,'debian/common.functions');@FUNCTIONS=<FUNCTIONS>;close(FUNCTIONS):>//
-# <:=@FUNCTIONS:>//
-
-#################################################################
-# Here starts the real action
-#################################################################
-
-case "$1" in
-  # install is also used if the old package is in state rc
-  upgrade|install)
-
-    ## upgrade from 2.0.2 in sarge
-    configured_version=$2
-    # we must keep changes to the option part of 00updmap.cfg, if it is 
-    # installed (from an older tetex-base package)
-    dpkg --compare-versions \
-      $FIRST_VERSION_WITH_UPGRADE_PATH gt "$configured_version" && \
-      updmap_extract || true
-
-    ;;
-  failed-upgrade|abort-upgrade)
-    :
-    ;;
-esac
-
-#DEBHELPER#
-
-
-# Local Variables:
-# mode: shell-script
-# skeleton-pair: t
-# End:
-

Modified: tex-common/trunk/debian/prerm
===================================================================
--- tex-common/trunk/debian/prerm	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/prerm	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,7 +1,6 @@
 #!/bin/sh -e
 # 
-# postinst maintainer script for the Debian tex-common package.
-# $Id$
+# prerm maintainer script for the Debian tex-common package.
 
 # remove dirs in /usr/local if empty
 

Modified: tex-common/trunk/debian/reportbug-control
===================================================================
--- tex-common/trunk/debian/reportbug-control	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/reportbug-control	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1 +1 @@
-report-with: tetex-base tetex-bin tetex-extra texlive-base texlive-bin
+report-with: texlive-base texlive-binaries

Modified: tex-common/trunk/debian/rules
===================================================================
--- tex-common/trunk/debian/rules	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/rules	2012-03-24 07:13:14 UTC (rev 5285)
@@ -5,9 +5,9 @@
 
 INSTDIR=$(CURDIR)/debian/tex-common
 
-bin_scripts=dh_installtex update-fontlang
-sbin_scripts=update-texmf update-texmf-config
-nonbin_scripts=tpm2licenses tpm2licenses.README Tpm.pm FileUtils.pm debianize-updmap
+bin_scripts=dh_installtex
+sbin_scripts=update-fmtlang update-texmf-config update-updmap update-texmf
+nonbin_scripts=
 
 sbin_installfiles=$(foreach script,$(sbin_scripts), scripts/$(script))
 sbin_manpages=$(foreach script,$(sbin_scripts), scripts/$(script).8) 
@@ -16,26 +16,12 @@
 bin_manpages=$(foreach script,$(bin_scripts), scripts/$(script).1) 
 
 nonbin_installfiles=$(foreach script,$(nonbin_scripts), scripts/$(script)) \
-	texmf/web2c/mktex.cnf scripts/language.def.header \
-	scripts/language.dat.header
+	texmf/web2c/mktex.cnf 
 
-# create maintainer scripts etc.
-EPERL_FILES := debian/common.functions debian/postinst debian/postrm debian/config debian/preinst
-eperl_sourcefiles=debian/variables debian/COPYRIGHT.scripts debian/postinst.functions \
-   debian/common.variables debian/common.functions debian/postrm.functions
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
 
-# Eperl is simply great: thanks, Davide!
-% :: %.in $(eperl_sourcefiles) 
-	eperl -k -P -o $@ $<
-
-# Override the general rule for eperl-generated files in order to avoid a
-# circular dependency (debian/common.functions is listed in
-# $(eperl_sourcefiles)).
-debian/common.functions: debian/common.functions.in debian/common.variables
-	eperl -k -P -o $@ $<
-
-build: build-stamp
-
 build-stamp: $(EPERL_FILES) debian/po/templates.pot
 	dh_testdir
 	$(check-svn)
@@ -76,10 +62,6 @@
 	cd doc; $(MAKE) install DESTDIR=$(INSTDIR)/usr/share/doc/tex-common
 	cp conf/fmt.d/00tex.cnf $(INSTDIR)/etc/texmf/fmt.d/
 	cp conf/hyphen.d/00tex.cnf $(INSTDIR)/etc/texmf/hyphen.d/
-        # ucf files
-	cp conf/texmf.d/*cnf $(INSTDIR)/usr/share/tex-common/
-	cp conf/updmap.d/00updmap.cfg $(INSTDIR)/usr/share/tex-common/
-	cp -a debian/md5sums/* $(INSTDIR)/usr/share/tex-common/
 	cp $(sbin_installfiles) $(INSTDIR)/usr/sbin/
 	cp $(bin_installfiles) $(INSTDIR)/usr/bin/
 	cp $(nonbin_installfiles) $(INSTDIR)/usr/share/tex-common/
@@ -93,9 +75,6 @@
         # fontcache stuff with proper permissions
 	install -d $(INSTDIR)/etc/texmf/web2c/
 	install -m 644 texmf/web2c/mktex.cnf $(INSTDIR)/etc/texmf/web2c/
-# 	mkdir --mode=1777 $(INSTDIR)/var/cache/fonts/pk
-# 	mkdir --mode=1777 $(INSTDIR)/var/cache/fonts/tfm
-# 	mkdir --mode=1777 $(INSTDIR)/var/cache/fonts/source
 
         # Remove the out-of-date ls-R file from /usr/share/texmf and create a
         # link to one in /var/lib/texmf that we can update without violating

Modified: tex-common/trunk/debian/tex-common.links
===================================================================
--- tex-common/trunk/debian/tex-common.links	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/tex-common.links	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,20 +1,12 @@
-usr/share/man/man1/update-fontlang.1 usr/share/man/man1/update-updmap.1
-usr/share/man/man1/update-fontlang.1 usr/share/man/man1/update-fmtutil.1
-usr/share/man/man1/update-fontlang.1 usr/share/man/man1/update-language.1
-usr/share/man/man1/update-fontlang.1 usr/share/man/man1/update-language-def.1
-usr/share/man/man1/update-fontlang.1 usr/share/man/man1/update-language-dat.1
-usr/bin/update-fontlang usr/bin/update-updmap
-usr/bin/update-fontlang usr/bin/update-fmtutil
-usr/bin/update-fontlang usr/bin/update-language
-usr/bin/update-fontlang usr/bin/update-language-def
-usr/bin/update-fontlang usr/bin/update-language-dat
-usr/bin/update-fontlang usr/sbin/update-updmap
-usr/bin/update-fontlang usr/sbin/update-fmtutil
-usr/bin/update-fontlang usr/sbin/update-language
-usr/bin/update-fontlang usr/sbin/update-language-def
-usr/bin/update-fontlang usr/sbin/update-language-dat
-etc/texmf/texmf.cnf usr/share/texmf/web2c/texmf.cnf
+usr/share/man/man8/update-fmtlang.8 usr/share/man/man8/update-fmtutil.8
+usr/share/man/man8/update-fmtlang.8 usr/share/man/man8/update-language.8
+usr/share/man/man8/update-fmtlang.8 usr/share/man/man8/update-language-def.8
+usr/share/man/man8/update-fmtlang.8 usr/share/man/man8/update-language-dat.8
+usr/share/man/man8/update-fmtlang.8 usr/share/man/man8/update-language-lua.8
+usr/sbin/update-fmtlang usr/sbin/update-fmtutil
+usr/sbin/update-fmtlang usr/sbin/update-language
+usr/sbin/update-fmtlang usr/sbin/update-language-def
+usr/sbin/update-fmtlang usr/sbin/update-language-dat
+usr/sbin/update-fmtlang usr/sbin/update-language-lua
 var/lib/texmf/ls-R-TEXMFMAIN usr/share/texmf/ls-R
 usr/share/doc/texmf usr/share/texmf/doc
-
-

Deleted: tex-common/trunk/debian/variables
===================================================================
--- tex-common/trunk/debian/variables	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/debian/variables	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,16 +0,0 @@
-<:
-# Copyright (C) 2004 by Frank Küster <frank at kuesterei.ch>.
-# $Id$
-
-use File::Basename;
-
-$PACKAGE="tex-common";
-
-$FONTCACHE_PERMS="3775";
-:>//
-#include "common.variables"
-<:
-# Local variables:
-# mode: perl
-# end:
-:>//

Modified: tex-common/trunk/doc/Debian-TeX-Policy.pdf
===================================================================
(Binary files differ)

Modified: tex-common/trunk/doc/Debian-TeX-Policy.sgml
===================================================================
--- tex-common/trunk/doc/Debian-TeX-Policy.sgml	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/doc/Debian-TeX-Policy.sgml	2012-03-24 07:13:14 UTC (rev 5285)
@@ -18,7 +18,7 @@
 
       <copyright>
 	<copyrightsummary>
-	  Copyright © 2004-2006 Frank Küster, Richard Lewis, Norbert
+	  Copyright © 2004-2012 Frank Küster, Richard Lewis, Norbert
           Preining, Ralf Stubner, Florent Rougon
 	</copyrightsummary>
 	<p>
@@ -168,7 +168,7 @@
 	<item>
 	  A package that only installs TeX input files, e.g. a new
 	  LaTeX package, should install them in
-	  the <var>TEXMFMAIN</var> tree
+	  the <var>TEXMFDEBIAN</var> tree
 	  (<file>/usr/share/texmf/</file>) at the place indicated by
 	  the TDS,
 	  see <url id="file:///usr/share/doc/tex-common/tds.html"
@@ -194,7 +194,7 @@
       </p>
       <p>
 	Depending on the <package>texlive-*</package>
-	or <package>tetex-*</package> metapackages is only acceptable
+	metapackages is only acceptable
 	for editors, IDEs and other tools which handle user-generated
 	code.  TeX add-on packages, as well as automated input
 	generators etc., must instead depend on a list of individual
@@ -259,12 +259,12 @@
         The following <var>TEXMF</var> trees are defined, as outlined
         below:
         <enumlist>
-          <item><file>/usr/share/texmf-tetex/</file>, part of <var>TEXMFDIST</var></item>
-          <item><file>/usr/share/texmf-texlive/</file>, part of <var>TEXMFDIST</var></item>
-          <item><file>/usr/share/texmf/</file>, referenced as <var>TEXMFMAIN</var></item>
+          <item><file>/usr/share/texlive/texmf-dist/</file>, referenced as <var>TEXMFDIST</var></item>
+          <item><file>/usr/local/share/texmf/</file>, referenced as <var>TEXMFLOCAL</var></item>
+          <item><file>/usr/share/texlive/texmf/</file>, referenced as <var>TEXMFMAIN</var></item>
+          <item><file>/usr/share/texmf/</file>, referenced as <var>TEXMFDEBIAN</var></item>
           <item><file>/var/lib/texmf/</file>, referenced as <var>TEXMFSYSVAR</var></item>
           <item><file>/etc/texmf/</file>, referenced as <var>TEXMFSYSCONFIG</var></item>
-          <item><file>/usr/local/share/texmf/</file>, referenced as <var>TEXMFLOCAL</var></item>
           <item> Any directories listed in the <var>TEXMFHOME</var> configuration
                  variable in <file>texmf.cnf</file> or as an environment
                  variable,
@@ -281,44 +281,18 @@
 
 	  <p>
 	  The role of the trees <var>TEXMFMAIN</var> and
-          <var>TEXMFDIST</var> in Debian differ from upstream's
-          original usage.  Upstream uses <var>TEXMFMAIN</var> for the
+          <var>TEXMFDIST</var> in Debian parallels the usage in
+	  upstream TeX Live. Upstream uses <var>TEXMFMAIN</var> for the
           files that have to match the binary executables and
           <var>TEXMFDIST</var> for other TeX input files that are
-          replaced when a new texmf tarball appears; this distinction
-          is not necessary on a system with a decent package managment
-          system.  Instead, the basic TeX packages install their files
-          into their <var>TEXMFDIST</var> directories <footnote>This
-          is new, and the basic TeX packages currently transition
-          their files to the new place.</footnote> , while
-          <var>TEXMFMAIN</var> is used by TeX add-on packages for
-          their files and allows them to shadow older versions
-          provided by the basic TeX packages.
-	  A couple of files from the basic TeX packages still need to be
-	  placed in <var>TEXMFMAIN</var>
-	  <footnote>
-	    Reasons include hardcoded paths in executables as well as
-	    the need for e.g. pool files to exactly match the binaries'
-	    version, so that shadowing must be prevented.
-	  </footnote>.
+          replaced when a new texmf tarball appears; 
+	  <var>TEXMFDEBIAN</var> is an additional tree where TeX add-on
+	  packages can put their files.
 	  </p>
 
         <p>
-	The order of basic TeX packages in <var>TEXMFDIST</var> may be
-	changed by the user or by the basic TeX packages, and no
-	implementation may rely on a particular order.  This implies
-	that for a package that needs a version of a particular file
-	newer than provided by one of the basic TeX packages, it is
-	not sufficient to declare a dependency on the other basic TeX
-	package(s)<footnote>Of course this is only a problem if the
-	file is needed in the configure phase.  If it is needed only
-	at runtime, a README file to instruct the local admin should be
-	sufficient.</footnote>.
-        </p>
-
-        <p>
         Debian packages generally install files in
-        <var>TEXMFMAIN</var>, and may ship or create empty directories
+        <var>TEXMFDEBIAN</var>, and may ship or create empty directories
         in the other trees, in accordance with Debian Policy.
         Configuration file handling in <var>TEXMFSYSCONFIG</var> is
         described below in <ref id="configurationfiles">.  Packages
@@ -350,10 +324,10 @@
 	</p>
 
 	<p>An exception is the generated file
-        <file>/etc/texmf/texmf.cnf</file>.  It is not intended that
-        local administrators edit that file, but if they do, the
-        configuration update programs must respect these changes.
-        Debian packages must not alter that file.
+        <file>/etc/texmf/web2c/texmf.cnf</file>. 
+	Local administrators should not edit this file, as manual
+	changes will be overwritten later on. Instead, configuration
+	file snippets in <file>/etc/texmf/texmf.d</file> must be used.
 	</p>
 
       </sect>
@@ -382,7 +356,7 @@
 	  <p>Packages that need newer versions of a file than already
 	  supplied by a basic TeX package and installed in
 	  <var>TEXMFDIST</var> can place them into
-	  <var>TEXMFMAIN</var>.  Thus, the outdated file will be
+	  <var>TEXMFDEBIAN</var>.  Thus, the outdated file will be
 	  shadowed, and the new one is in effect.  
 	  </p>
 
@@ -495,31 +469,65 @@
 	for TeX input files and can be used by packages for
 	configuration files that are not TeX input files (e.g. the
 	files in subdirectories <file>fmt.d</file> or
-	<file>updmap.d</file>).
+	<file>hyphen.d</file>).
 	</p>
       </sect>
       <sect id="update-progs">
         <heading>Configuration update programs</heading>
 
+
 	<p>
-	The central configuration file for TeX applications is
-	<file>/etc/texmf/texmf.cnf</file>, the central font configuration
-	file is <file>/var/lib/texmf/web2c/updmap.cfg</file>, the central
-	language/hyphenation configuration 
-	<file>/var/lib/texmf/tex/generic/config/language.dat</file>,
-	and format
-	generation is determinded by
-	<file>/var/lib/texmf/web2c/fmtutil.cnf</file>.  All four files are
+	Configuration files in the TeX world come in two classes: stackable
+	and unstackable. The first class means that the respective programs
+	read <em>all</em> configuration files found, while in the later case
+	only the top or first configuration file is used.
+	</p>
+
+	<p>
+	Stackable configuration files in TeX are 
+	<file>TEXMFTREE/web2c/texmf.cnf</file> (central configuration
+	for TeX applications) and
+	<file>TEXMFTREE/web2c/updmap.cfg</file> (font configuration), 
+	while unstackable configuration files are 
+	<file>TEXMFTREE/tex/generic/config/language.dat</file> (language
+	support/hyphenation patterns for latex based formats),
+	<file>TEXMFTREE/tex/generic/config/language.def</file> (the same
+	for etex based formats),
+	<file>TEXMFTREE/tex/generic/config/language.dat.lua</file> (the
+	same for luatex based formats), and
+	<file>TEXMFTREE/web2c/fmtutil.cnf</file> (for format definitions).
+	</p>
+
+	<p>
+	In Debian, by default the respective configuration files of the
+	following trees are used: For <file>texmf.cnf</file>: TEXMFDEBIAN
+	(the texmf.cnf file is a link to the one in TEXMFMAIN).
+	For <file>updmap.cfg</file>:TEXMFDIST, TEXMFDEBIAN.
+	For the unstackable configuration files the respective copies
+	in TEXMFSYSVAR are used.
+	</p>
+
+	<p>
+	The stackable configuration files are either static (texmf.cnf)
+	or generated automatically in the background without any
+	need for configuration, since changes can be included in a
+	higher order configuration file.
+	</p>
+
+	<p>
+	The non stackable configuration files plus the file
+	<file>/etc/texmf/web2c/texmf.cnf</file> are
 	generated by configuration update programs from configuration
-	files in subdirectories of <file>/etc/texmf</file>.  For
-	<file>updmap.cfg</file>, <file>language.dat</file> and 
-	<file>fmtutil.cnf</file>, this is the only
-	method of configuration.  <file>texmf.cnf</file> can be edited
+	files in subdirectories of <file>/etc/texmf</file>.  For all
+	of them this is the only method of configuration.
+	<!--
+	<file>texmf.cnf</file> can be edited
 	manually by local system administrators, and changes will be
 	handled by ucf.  Package installation scripts, however, must
 	not change this file, but use the <prgn>update-texmf</prgn>
 	mechanism.  Local administrators are encouraged to use the
 	<prgn>update-texmf</prgn> mechanism, too.
+	-->
 	</p> 
 
 	<p>
@@ -540,8 +548,7 @@
         </p>
 
 	<p>
-	Maintainer scripts should call <prgn>update-updmap</prgn> with
-	the option <tt>--quiet</tt>.  Besides that, the configuration
+	The configuration
 	update programs should be called without any options to allow
 	for internal changes, e.g. of the directories where the
 	generated files are placed.

Modified: tex-common/trunk/doc/TeX-on-Debian.pdf
===================================================================
(Binary files differ)

Modified: tex-common/trunk/doc/TeX-on-Debian.sgml
===================================================================
--- tex-common/trunk/doc/TeX-on-Debian.sgml	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/doc/TeX-on-Debian.sgml	2012-03-24 07:13:14 UTC (rev 5285)
@@ -24,7 +24,7 @@
 
       <copyright>
         <copyrightsummary>
-          Copyright © 2004-2007 Frank Küster, Florent Rougon,
+          Copyright © 2004-2012 Frank Küster, Florent Rougon,
         Norbert Preining
         </copyrightsummary>
         <p>
@@ -63,11 +63,17 @@
         The Debian TeX Live packages are comprised of (currently) 80 packages
         in total. The most important are:
         <taglist>
-          <tag><package>texlive-base-bin</package></tag>
+          <tag><package>texlive-binaries</package></tag>
           <item>
-            provides the basic binaries and basic TeX input files
+            provides the basic binaries and scripts, but is practically
+	    useless by itself
           </item>
 
+          <tag><package>texlive-base</package></tag>
+          <item>
+	    provides a minimal system
+          </item>
+
           <tag><package>texlive-latex-base</package></tag>
           <item>
             provides the most basic LaTeX input files, and will be
@@ -184,35 +190,52 @@
               </p>
             </item>
 
-            <tag><var>TEXMFLOCAL</var></tag>
+            <tag><var>TEXMFDEBIAN</var></tag>
             <item>
               <p>
-                Default location: <file>/usr/local/share/texmf/</file>
+                Default location: <file>/usr/share/texmf/</file>
               </p>
               <p>
-                Contains system-wide input files 
+	        Contains files shipped by Debian packages other than
+		the main texlive packages.
+		This tree contains system-wide, <prgn>dpkg</prgn>-managed 
+		input files.
               </p>
             </item>
 
             <tag><var>TEXMFMAIN</var></tag>
             <item>
               <p>
-                Default location: <file>/usr/share/texmf/</file>
+                Default location: <file>/usr/share/texlive/texmf/</file>
               </p>
               <p>
-                Contains system-wide, <prgn>dpkg</prgn>-managed input files
-                (TeX add-on packages) 
+	        Contains files that are closely related to the binaries
+		and the specific version, thus this tree has higher
+		priority then <var>TEXMFLOCAL</var> below. It contains
+		only few system-wide, <prgn>dpkg</prgn>-managed input files.
               </p>
             </item>
 
+            <tag><var>TEXMFLOCAL</var></tag>
+            <item>
+              <p>
+                Default location: <file>/usr/local/share/texmf/</file>
+              </p>
+              <p>
+                Contains system-wide input files, used for configuration
+		on specific systems.
+              </p>
+            </item>
+
             <tag><var>TEXMFDIST</var></tag>
             <item>
               <p>
-                Default location: <file>/usr/share/texmf-texlive</file>
+                Default location: <file>/usr/share/texlive/texmf-dist</file>
               </p>
               <p>
-                Contains system-wide, <prgn>dpkg</prgn>-managed input files
-                (basic TeX packages)
+	        Contains the binary-independent files that are distributed
+		with TeX Live, comprising most of the input files, font
+		files etc. 
               </p>
             </item>
           </taglist>
@@ -223,7 +246,10 @@
           <var>TEXMFLOCAL</var> or <var>TEXMFHOME</var>, depending on whether
           you are the system administrator or a user. If needed, a system
           administrator can add additional trees to the <var>TEXMF</var>
-          variable in <file>/etc/texmf/texmf.d/05TeXMF.cnf</file> (earlier
+          variable by copying the definition of <var>TEXMF</var> from
+	  <file>/usr/share/texmf/web2c/texmf.cnf</file> into one file
+	  in <file>/etc/texmf/texmf.d/</file>, for example
+	  <file>/etc/texmf/texmf.d/00local.cnf</file> (earlier
           entries take precedence). <var>TEXMFCONFIG</var> and
           <var>TEXMFVAR</var> are used by the user-specific
           <prgn>texconfig</prgn>, <prgn>updmap</prgn>, and
@@ -275,20 +301,21 @@
             or <var>TEXMFCONFIG</var> of a particular user.  However,
             local admins can take any file they want from
             the <var>TEXMFDIST</var>
-            (<file>/usr/share/texmf-texlive</file>)
-            or <var>TEXMFMAIN</var> (<file>/usr/share/texmf</file>)
+            (<file>/usr/share/texlive/texmf-dist</file>)
+            or <var>TEXMFDEBIAN</var> (<file>/usr/share/texmf</file>)
             trees and put changed copies into the respective
             directories below <file>/etc/texmf</file>
             (<var>TEXMFSYSCONFIG</var> which sorts before all other
-            trees).
+            trees) or <file>/usr/local/share/texmf</file> 
+	    (<var>TEXMFLOCAL</var> which sorts before the above two trees).
           </p>
 
           <p>
             Since the package management system does not know whether a file
             is treated as a configuration file on a specific system, it is up
             to the site admin or local user to check whether one of their
-            changed files has changed in <var>TEXMFMAIN</var> or
-            <var>TEXMFDIST</var>.
+            changed files has changed in <var>TEXMFDIST</var> or
+            <var>TEXMFDEBIAN</var>.
           </p>
 
          <sect1>
@@ -297,43 +324,46 @@
             The central system-wide configuration files <file>texmf.cnf</file>
             (which controls the basic operation and file search paths for the
             included programs), <file>fmtutil.cnf</file> (which specifies the
-            available TeX formats), <file>updmap.cfg</file> (font
-            configuration) and <file>language.dat</file> (hyphenation patterns
-            for many formats) are handled through a Debian-specific mechanism
+            available TeX formats), (several) <file>updmap.cfg</file> (font
+            configuration) and <file>language.dat</file>, 
+	    <file>language.def</file>, <file>language.dat.lua</file>
+	    (hyphenation patterns for latex, etex, lualatex, resp.)
+	    are handled through a Debian-specific mechanism
             that allows the basic TeX packages, add-on packages and local
             administrators to combine their changes
             (see <ref id="sec-core-config-files"> below).
           </p>
 
-          <p>
-            For some configuration changes, there is a program called
-            <prgn>texconfig-dialog</prgn> (or simply <prgn>texconfig</prgn>
-            for a commandline frontend); alternatively, you can of course make
-            the necessary changes in configuration files by hand.
-          </p>
-
       <sect>
         <heading>Hyphenation</heading>
         <p>
           Hyphenation should pretty much work out of the box.
           Please note that
-          in Debian, language.dat is a generated file (see <ref
-          id="sec-core-config-files">).
+          in Debian, language.dat, language.def, language.dat.lua are 
+	  generated files (see <ref id="sec-core-config-files">).
         </p>
 
+<!--
         <p>
           For users of the ukranian language,
           the right pattern file depends on the output encoding 
           (see <file>/usr/share/texmf-texlive/tex/generic/ukrhyph/ukrhyph.tex</file>);
           you can also choose different rule sets in the file.
         </p>
+-->
 
       <sect id="sec-core-config-files">
         <heading>
           The files <file>texmf.cnf</file>, <file>fmtutil.cnf</file>,
-          <file>updmap.cfg</file> and <file>language.dat</file>
+          <file>updmap.cfg</file> and <file>language.*</file> group
         </heading>
 	<p>
+	In the following we will refer to the three files
+	<file>language.dat</file>, <file>language.def</file>, 
+	<file>language.dat.lua</file>, as <file>language.*</file>.
+	</p>
+
+	<p>
 	  In the following we describe ways to configure these files
 	  for the <em>system administrator</em>, i.e. one that has
 	  write access to the <file>/etc/texmf</file> hierachy. In
@@ -344,8 +374,7 @@
           <file>updmap.cfg</file> and <file>language.dat</file>
           contain configuration options from TeX Live,
           possibly from you, and from other TeX-related packages. They
-          are generated by scripts and should not—in fact,
-          except <file>texmf.cnf</file> may not—be edited
+          are generated by scripts and may not be edited
           directly. Rather, you should work with the source files in the
           respective directories below <file>/etc/texmf/</file>.
         </p>
@@ -357,9 +386,8 @@
           settings. For <file>texmf.cnf</file> snippets, this is
           particularly easy, since earlier entries override any later
           entries.  Only for removing settings
-          from <file>fmtutil.cnf</file>,
-          <file>updmap.cfg</file> or <file>language.dat</file> is it necessary
-          to edit existing files.
+          from <file>fmtutil.cnf</file>, or <file>language.*</file>
+	  it is necessary to edit existing files.
         </p>
 	
          <sect1 id="sec-texmfcnf-and-update-texmf">
@@ -367,12 +395,13 @@
             <file>texmf.cnf</file> and <prgn>update-texmf</prgn>
           </heading>
           <p>
-            The TeX binaries are built to look for <file>texmf.cnf</file> (the
-            master config file for TeX and Metafont) in
-            <file>/usr/share/texmf/web2c/texmf.cnf</file> (or
-            <file>$HOME/.texmf-config/web2c/texmf.cnf</file> if it exists).
-            The system-wide file is a symbolic link to
-            <file>/etc/texmf/texmf.cnf</file>. The Debian packaging includes a
+            The TeX binaries are built to look for and merge
+	    <file>texmf.cnf</file> files in various trees. That means
+	    that it is easy to override the default settings as shipped
+	    in 
+	    <file>/usr/share/texmf/web2c/texmf.cnf</file> by adding
+	    entries in <file>/etc/texmf/web2c/texmf.cnf</file>.
+            The Debian packaging includes a
             mechanism for constructing texmf.cnf from a collection of files
             under <file>/etc/texmf/texmf.d/</file>. To customize
             <file>texmf.cnf</file> while retaining the Debian-supplied
@@ -380,24 +409,22 @@
             <file>/etc/texmf/texmf.d/</file>, or change existing
             files, and then run <prgn>update-texmf</prgn>. This will
             generate the desired <file>texmf.cnf</file> for you.
+	    By default nothing is shipped in <file>/etc/texmf/texmf.d/</file>
+	    since no adaptions are necessary, but further addon packages
+	    might ship parts.
           </p>
 
           <p>
-            You should not edit this file directly! While changes made
-            by the local administrator will not be overwritten, they
-            will cause you trouble once a package is updated and
-            brings in a configuration change. You will be shown the
-            differences between the edited and the newly generated
-            file. We will try to merge our and your changes, but that
-            might not always work, and you will probably have to edit
-            again.
+            You may not edit the file <file>/etc/texmf/web2c/texmf.cnf</file>
+	    directly, any local changes will be overwritten the next
+	    time this file is generated.
           </p>
 
           <p>
-            Therefore, if you want a smooth upgrade, please edit the files in
+            Instead, please edit the files in
             <file>/etc/texmf/texmf.d</file>, or create an additional one, and
             invoke <prgn>update-texmf</prgn>. This will write your changes
-            into <file>/etc/texmf/texmf.cnf</file>.
+            into <file>/etc/texmf/web2c/texmf.cnf</file>.
           </p>
 
           <p>
@@ -416,8 +443,7 @@
          <sect1>
           <heading>
             <file>fmtutil.cnf</file> and <prgn>update-fmtutil</prgn>,
-            <file>updmap.cfg</file> and <prgn>update-updmap</prgn>,
-            <file>language.dat</file> and <prgn>update-language</prgn>
+            <file>language.*</file> and <prgn>update-language</prgn>
           </heading>
           <p>
             These files are also generated files, just as it has been
@@ -426,13 +452,11 @@
             be put into <file>/var/lib/texmf/web2c</file>, and any
             change made in these files will be <strong>unconditionally
             overwritten</strong>
-            by <prgn>update-fmtutil</prgn>, <prgn>update-language</prgn>
-            and
-            <prgn>update-updmap</prgn>, respectively.  Only the files
-	    in <file>/etc/texmf/updmap.d/</file>, <file>/etc/texmf/fmt.d/</file>
-	    and <file>/etc/texmf/language.d/</file> will be treated as
-	    configuration files.  Furthermore, the files <file>fmtutil.cnf</file>,
-	    <file>updmap.cfg</file> and <file>language.dat</file> are
+            by <prgn>update-fmtutil</prgn> and <prgn>update-language</prgn>,
+            respectively.  Only the files in <file>/etc/texmf/fmt.d/</file>
+	    and <file>/etc/texmf/hyphen.d/</file> will be treated as
+	    configuration files.  Furthermore, the files 
+	    <file>fmtutil.cnf</file> and <file>language.*</file> are
 	    used on a first-found-first-used basis, if there are more
 	    than one in the search path, whereas if there are
 	    several <file>texmf.cnf</file> files in the search path,
@@ -443,72 +467,39 @@
           <p>
             Just as for <file>texmf.cnf</file>, the right way to change
             settings is to edit or add files in
-            <file>/etc/texmf/updmap.d/</file>, <file>/etc/texmf/fmt.d/</file>
-            or <file>/etc/texmf/language.d/</file>. The details have been
+            <file>/etc/texmf/fmt.d/</file> 
+	    or <file>/etc/texmf/language.d/</file>. The details have been
             described above (see <ref id="sec-texmfcnf-and-update-texmf">).
-            Note, however, that the extension for <file>updmap.cfg</file>
-            snippets in <file>/etc/texmf/updmap.d/</file> is
-            <file>.cfg</file>, not <file>.cnf</file>.
           </p>
 
+         <sect1>
+          <heading>
+            <file>updmap.cfg</file>
+          </heading>
 	  <p>
+	    <prgn>updmap-sys(8)</prgn> reads <em>all</em> available
+	    <file>updmap.cfg</file> files found, stacking them
+	    on top of each other. That means that local configurations
+	    can be done by editing/adding a file in 
+	    <file>/etc/texmf/web2c/updmap.cfg</file>.
+	  </p>
+
+	  <p>
 	    <prgn>updmap-sys(8)</prgn> provides options for enabling
 	    or disabling font map files.  When enabling a new map file
-	    that is not mentioned, <prgn>updmap-sys</prgn> will first
-	    create or edit <file>10local.cfg</file> in
-	    the <file>/etc/texmf/updmap.d</file> directory and then
-	    call <prgn>update-updmap</prgn>.  Note
+	    that is not mentioned, <prgn>updmap-sys</prgn> will
+	    create or edit <file>/etc/texmf/web2c/updmap.cfg</file>. Note
 	    that <prgn>updmap-sys</prgn>'s <tt>--edit</tt>
 	    and <tt>--syncwithtrees</tt> options cannot be used on a
 	    Debian system.
-      
 	  </p>
-	
-         <sect1 id="jadetex-xmltex-specialcase">
-	   <heading>A special case in <prgn>update-fmtutil</prgn>:
-	   Formats which are based on other formats</heading>
-	   <p>
-	     The JadeTeX and xmlTeX formats are built on top of LaTeX
-	     and therefore require special treatment.  This is done
-	     automatically for the Debian packages for these formats.
-	     However, local administrators who similarly base their
-	     custom formats on LaTeX (or any other format) might need
-	     to take special care, in particular when dist-upgrading.
-	   </p>
-	   <p>
-	     JadeTeX is based on LaTeX such that during format
-	     generation, the LaTeX format dump is preloaded with this
-	     line in <file>fmtutil.cnf</file>:
-<example>
-jadetex		etex	language.dat	&latex jadetex.ini
-</example>
-             This is problematic if the package which provides LaTeX
-             (currently <package>texlive-latex-base</package>) is
-             upgraded at the same time as the package which provides
-             the executables
-             (currently <package>texlive-base-bin</package>).  In this
-             dpkg run, <package>texlive-base-bin</package> will be
-             configured while <package>texlive-latex-base</package> is
-             unpacked but unconfigured and might have
-             a <file>10texlive-latex-base.cnf.dpkg-new</file> file
-             in <file>/etc/texmf/fmt.d</file>.
-             <package>texlive-base-bin</package> will
-             call <prgn>update-fmtutil</prgn>  just before it executes
-             <tt>fmtutil --all</tt>, and because of
-             the <file>dpkg-new</file> file information for LaTeX will
-             not be included.  If JadeTeX would still be included, its
-             format generation would consequently fail.
-	   </p>
-	   <p>
-	     <prgn>update-fmtutil</prgn> knows about this problem and
-	     will ignore JadeTeX and xmlTeX if LaTeX is not
-	     available.  It does not know which other (locally
-	     defined) formats are also based on LaTeX, though.  To
-	     prevent failures (and actually a possible fork bomb, see
-	     Debian Bug #427562), local administrators should manually
-	     disable such formats before upgrading TeX Live packages.
-	   </p>
 
+	  <p>
+	    For more details on how to disable map files that are
+	    enabled on a higher level, please see the man page
+	    and help output of <prgn>updmap</prgn>.
+	  </p>
+	
          <sect1 id="sec-user-config-files">
           <heading>
 	    Per user configuration changes
@@ -518,8 +509,7 @@
 	    user wants to maintain their own <file>texmf.cnf</file>,
 	    they can put it into <tt><var>TEXMFCONFIG</var>/web2c</tt>
 	    and must manually edit it.  However, in order for it to be
-	    found, they need to set an environment
-	    variable
+	    found, they need to set an environment variable
 	    <footnote>
 	      The reason for this is that the search
 	      path for <file>texmf.cnf</file>, which is the file that
@@ -539,12 +529,11 @@
 
 	  <p>
 	    In contrast to the above—TeX reading and merging all
-	    <file>texmf.cnf</file> files—the <em>first</em> found occurrence of
-	    one of the files <file>updmap.cfg</file>, <file>language.dat</file>,
+	    <file>texmf.cnf</file> files—the <em>first</em> found 
+	    occurrence of one of the files <file>language.dat</file>,
 	    <file>fmtutil.cnf</file> is used. Thus, when called by a
 	    user, the other configuration update programs also work
 	    with files in
-	    <tt><var>TEXMFCONFIG</var>/updmap.d</tt>, 
 	    <tt><var>TEXMFCONFIG</var>/fmt.d</tt> or
 	    <tt><var>TEXMFCONFIG</var>/language.d</tt>, where
 	    <var>TEXMFCONFIG</var> is usually 
@@ -563,8 +552,8 @@
 	    <prgn>updmap(1)</prgn> provides the same options for
 	    enabling and disabling map files
 	    as <prgn>updmap-sys(8)</prgn>, see
-	    above.  <file>10local.cfg</file> is created or edited
-	    in <tt><var>TEXMFCONFIG</var>/updmap.d</tt>.
+	    above.  <file>updmap.cfg</file> is created or edited
+	    in <tt><var>TEXMFCONFIG</var>/web2c/</tt>.
 	  </p>
 
       <sect>
@@ -583,11 +572,9 @@
 	  On multi-user machines, it might be advisable that the local
 	  administrator enables a site-wide font cache and sets
 	  <var>VARTEXFONTS</var> to a persistent directory, e.g.
-	  <file>/var/cache/fonts</file>. The variable is set in
-	  <file>/etc/texmf/texmf.d/05TeXMF.cnf</file> and can either be
-	  changed there or preferrably overwritten in a file that sorts before
-	  <file>05TeXMF.cnf</file>, e.g.
-	  <file>/etc/texmf/texmf.d/04VARTEXFONTS.cnf</file>. Do not forget to
+	  <file>/var/cache/fonts</file>.  The variable can be changed
+	  by adding an entry via <file>/etc/texmf/texmf.d</file>, e.g.
+	  <file>/etc/texmf/texmf.d/00local.cnf</file>. Do not forget to
 	  run <prgn>update-texmf</prgn> after making the change. To enable a
 	  side-wide font caching the admin should edit
 	  <file>/etc/texmf/web2c/mktex.cnf</file> and use 'varfonts' instead
@@ -633,8 +620,10 @@
 -->
 
 	<p>
-	  The Debian TeX Live packages currently do not evaluate the
-          settings of <file>/etc/papersize</file>, please set the
+	  The Debian TeX Live packages do evaluate the
+          settings of <file>/etc/papersize</file>, please configure
+	  your preferred paper size with <prgn>paperconfig</prgn>.
+	  Alternatively, and more portable, thus recommended, set the
           paper geometry explicitly in the (La)TeX source, e.g. using
           the packages <tt>geometry</tt> or <tt>hyperref</tt>.
 	</p>
@@ -771,8 +760,8 @@
           <var>typeface</var> refers to the name of the font family (e.g.,
           <tt>marvosym</tt> or <tt>lm</tt>). If in doubt, you should have a
           look at the system trees managed by Debian packages,
-          <file>/usr/share/texmf</file>, <file>/usr/share/texmf-texlive</file>
-          and <file>/usr/share/texmf-texlive</file>; they follow the same
+          <file>/usr/share/texmf</file> and
+	  <file>/usr/share/texlive/texmf-dist</file>; they follow the same
           layout, called the TeX Directory Structure (which is documented at
           <url id="http://www.tug.org/tds/" name="&urlname">).
         </p>
@@ -797,38 +786,10 @@
                 explained above.
               </p>
 
-              <p>
-                Note: in teTeX 3 and current TeX Live (as opposed to teTeX 2):
-
-                <list compact>
-                  <item>
-                    <file>.map</file> files should go to
-                    <file><var>TEXMFLOCAL</var>/fonts/map/<var>syntax</var>/<var>foo</var>/</file>
-                  </item>
-
-                  <item>
-                    <file>.enc</file> files should go to
-                    <file><var>TEXMFLOCAL</var>/fonts/enc/<var>syntax</var>/<var>foo</var>/</file>
-                  </item>
-                </list>
-
-                where <var>syntax</var> indicates the syntax followed by the
-                files (it is often <tt>dvips</tt>). Please refer to the teTeX
-                Manual for details. You can read this manual with the command
-<example>
-texdoc TETEXDOC
-</example>
-              </p>
-            </item>
-
             <item>
               <p>
-                Create a configuration file
-                <file>/etc/texmf/updmap.d/10local-<var>foo</var>.cfg</file>
-                (the extension <file>.cfg</file> is important! You can also
-                use one <file>10local.cfg</file> for all your locally
-                installed fonts). The file should list the map files you
-                stored in step 1 under <var>TEXMFLOCAL</var>, with one line
+	        List the map files you stored in step 1 under 
+		<var>TEXMFLOCAL</var>, with one line
                 per file, as in:
 
 <example>
@@ -836,46 +797,31 @@
 Map <var>foo</var>.map
 Map other-map-file-from-package-<var>foo</var>.map
 </example>
-              </p>
+		
+		in the file
+		<file>/usr/local/share/texmf/web2c/updmap.cfg</file>.
+	      </p>
 
               <p>
                 If a font is available both as bitmap and outline, you should
                 use <tt>MixedMap</tt> instead of <tt>Map</tt>. Please refer to
-                the manual pages for <prgn>update-updmap</prgn> and
-                <prgn>updmap-sys</prgn> for details.
+                the manual pages for <prgn>updmap</prgn> for details.
               </p>
 
 	      <p>
+	        (not recommended, but possible)
 		You can also use <tt>updmap-sys --enable
-		Map <var>foo</var>.map</tt>; this will create
-		the <file>10local.cfg</file> file for you.
+		Map <var>foo</var>.map</tt>; this will create/edit
+		the <file>/etc/texmf/web2c/updmap.cfg</file> file for you.
+		But since the real files are stored in 
+		<var>TEXMFLOCAL</var> it is better to add the map directives
+		to the <file>updmap.cfg</file> in the same tree.
 	      </p>
             </item>
 
             <item>
               <p>
-                Run the program <prgn>update-updmap</prgn>. This will generate
-                an appropriate <file>updmap.cfg</file> file under
-                <file>/var/lib/texmf/web2c/</file> (not
-                <file>/etc/texmf/</file>!), containing the <tt>Map</tt> and/or
-                <tt>MixedMap</tt> lines taken from
-                <file>10local-<var>foo</var>.cfg</file>.
-              </p>
-    
-              <p>
-                Note: modifying <file>updmap.cfg</file> directly is not
-                supported in Debian, because Debian font packages need to
-                update it when they are installed or removed. This is why
-                <file>updmap.cfg</file> is not stored under <file>/etc</file>
-                and why you have to use <prgn>update-updmap</prgn> whenever
-                you want to modify it.
-              </p>
-            </item>
-
-            <item>
-              <p>
-                Run the program <prgn>mktexlsr</prgn> (or
-               <prgn>texhash</prgn>, which is the same). This will record all
+                Run the program <prgn>mktexlsr</prgn>. This will record all
                the newly created files in <file>ls-R</file> files (these are
                used by TeX-related programs as indices to find the files they
                need when operating).
@@ -917,12 +863,9 @@
             </item>
 
             <item>
-              <p>
-		The configuration file created in step 2 should be placed in
-		<var>TEXMFCONFIG</var> (<file>$HOME/.texmf-config</file> by
-		default). An appropriate place would be
-		<file><var>TEXMFCONFIG</var>/updmap.d/</file>. Note that most
-		likely you will have to create this directory first.
+	      <p>
+	      In step 2, edit <file><var>TEXMFHOME</var>/web2c/updmap.cfg</file>
+	      instead.
 	      </p>
 
 	      <p>
@@ -932,37 +875,13 @@
             </item>
 
             <item>
-              After updating the <file>ls-R</file> files with
-              <prgn>mktexlsr</prgn> or <prgn>texhash</prgn> (step 4), one has
-              to generate the map files in step 5. This is done by running the
-              program <prgn>updmap</prgn> instead of <prgn>updmap-sys</prgn>.
-              The generated files are created in directories below
-              <var>TEXMFVAR</var>.
+	      In step 3 run <prgn>updmap</prgn> instead of 
+	      <prgn>updmap-sys</prgn>. The generated files are created 
+	      in directories below <var>TEXMFVAR</var>.
             </item>
           </list>
         </p>
 
-        <p>
-          Note that <prgn>update-updmap</prgn> merges the configuration files
-          in <file>$HOME/.texmf-config/web2c/updmap.d</file> and in
-          <file>/etc/texmf/updmap.d</file>. Therefore, all system-wide
-          installed fonts are accessible without duplicating their
-          configuration files. Merging the configuration files is done on the
-          basis of file names: If a file exists in both directories, the
-          version in <var>TEXMFCONFIG</var> takes precedence. Thus, you can
-          also use this mechanism to change settings compared to the site-wide
-          configuration, e.g. by keeping a changed copy of
-          <file>00updmap.cfg</file> in
-          <file><var>TEXMFCONFIG</var>/updmap.d/</file>.
-        </p>
-
-        <p>
-          Keep in mind that you still have to call <prgn>update-updmap</prgn>
-          whenever the system-wide installation
-          changes. If you keep a changed copy of a file from the site-wide
-          directories, you need to manually merge any changes to this file, if
-          desired.
-        </p>
       </sect>
     </chapt>
 
@@ -992,7 +911,7 @@
 
           <item>
             Is <file>texmf.cnf</file> modified a lot? Please check
-            <file>/etc/texmf/texmf.d/</file>.
+            <file>/etc/texmf/web2c/texmf.d/</file>.
           </item>
 
           <item>

Deleted: tex-common/trunk/scripts/FileUtils.pm
===================================================================
--- tex-common/trunk/scripts/FileUtils.pm	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/FileUtils.pm	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,991 +0,0 @@
-# $Id: FileUtils.pm 2402 2006-11-08 01:45:28Z karl $
-# Written 2004, Fabrice Popineau.
-# Public domain.
-# 
-package FileUtils;
-
-BEGIN {
-  use Exporter ();
-  use Cwd;
-  use File::Path;
-  #  use File::Copy qw(copy);
-  use vars qw( @ISA @EXPORT_OK);
- if ($^O eq 'MSWin32')
-  { $Separator = "\\" ;}
- else
-  { $Separator = "/" ;}
-
-  @ISA = qw(Exporter);
-
-  @EXPORT_OK = qw(
-		  &basename
-		  &build_path
-		  &build_tree
-		  &calc_file_size
-		  &canon_dir
-		  &check_path
-		  &cleandir
-		  &set_file_time
-		  &copy
-		  &diff_list
-		  &dirname
-		  &globexpand
-		  &is_absolute
-		  &is_dirsep
-		  &look_for
-		  &make_link
-		  &member
-		  &min max
-		  &move
-		  &newer
-		  &newpath
-		  &normalize
-		  &print_tree
-		  &push_uniq
-		  &rec_copy
-		  &rec_mkdir
-		  &rec_rmdir
-		  &regexpify
-		  &remove_list
-		  &sort_uniq
-		  &start_redirection
-		  &stop_redirection
-		  &substitute_var_val
-		  &sync_dir
-		  &walk_dir
-		  &walk_tree
-		 );
-}
-
-# Is the character a directory separator ?
-sub is_dirsep {
-  my ($c) = @_;
-  if ($c =~ /[\/\\]/) {
-    return 1;
-  } else {
-    return 0;
-  }
-}
-
-# Is the path absolute ?
-sub is_absolute {
-  my ($d) = @_;
-  if ($d =~ m@^([A-Za-z]:)?[/\\]@) {
-    return 1;
-  } else {
-    return 0;
-  }
-}
-
-# Rewrite '\\' into '/' and deletes multiple ones/
-sub canon_dir {
-  my ($p, $rep) = @_;
-  if ($p =~ m@^(.*)[/\\]$@) {
-    $p = $1;
-  }
-  if (($rep eq '') || ($rep eq '\\')) {
-    $p =~ s@/@\\@g;
-    $p =~ s@\\[\\]+@\\@g;
-    $p =~ s@\\\.\\@\\@g;
-    while ($p =~ m/\\\.\./) {
-      $p =~ s@\\([^\\]+)\\\.\.@\\@g;
-      $p =~ s@\\[\\]+@\\@g;
-    }
-  } elsif ($rep eq '/') {
-    $p =~ s@\\@/@g;
-    $p =~ s@/[/]+@/@g;
-    $p =~ s@/\./@/@g;
-    while ($p =~ m/\/\.\./) {
-      $p =~ s@/([^/]+)/\.\.@/@g;
-      $p =~ s@/[/]+@/@g;
-    }
-  } else {
-    die ("canon_dir($p) : invalid separator $rep.\n");
-  }
-  return $p;
-}
-
-# Merges all elements in the list into a single path, adding
-# directory separators as needed.
-sub build_path {
-  my($p, $s);
-  # Concatenates the arguments, adding path separators as needed
-  $p = $_[0];
-  for ($i = 1; $i <= $#_; $i++) {
-    $p = $p . $Separator . $_[$i];
-  }
-  return &canon_dir($p);
-}
-
-sub sort_uniq {
-  my (@l) = @_;
-  my ($e, $f, @r);
-  @l = sort(@l);
-  foreach $e (@l) {
-    if ($e ne $f) {
-      $f = $e;
-      push @r, $e;
-    }
-  }
-  return @r;
-}
-
-sub remove_list {
-  local (*l, $e) = @_;
-  my (@r, $f);
-  foreach $f (@l) {
-    if ($f !~ m/$e/) {
-      push @r, $f;
-    }
-  }
-  @l = @r;
-}
-
-sub member {
-  my ($e, @l) = @_;
-  my ($f);
-  foreach $f (@l) {
-    if ($e eq $f) {
-      return 1;
-    }
-  }
-  return 0;
-}
-
-sub push_uniq {
-  local (*l, @le) = @_;
-  my ($e);
-  foreach $e (@le) {
-    if (! &member($e, @l)) {
-      push @l, $e;
-    }
-  }
-}
-
-sub dirname {
-  my ($f) = @_;
-  $f =~ m@(^.*)[\\/][^\\/]*$@;
-  return $1;
-}
-
-sub basename {
-  my ($f) = @_;
-  $f =~ m@([^\\/]*)$@;
-  return $1;
-}
-
-sub normalize {
-  my ($p, $sep) = @_;
-  if ($sep eq '/') {
-    $p =~ s@\\@/@g;
-    $p =~ s@/(/|\./)*@/@g;
-    return $p;
-  } elsif ((! $sep) || ($sep eq '\\')) {
-    $p =~ s@/@\\@g;
-    $p =~ s@\\(\\|\.\\)*@\\@g;
-    return $p;
-  } else {
-    print STDERR "normalize : invalid separator, $sep\n";
-    return $p;
-  }
-}
-
-sub walk_dir {
-  # Walks the directory, executing $proc for each file,
-  # until done is returned.
-  my ($dir, $proc, $prune) = @_;
-  my (@l, $f, $done, $src, $DIR);
-
-  #print " walking $dir with $proc, $prune\n" if $::opt_debug;
-
-  if ((! $prune) || ($prune && ! &{$prune}($dir))) {
-    $done = 0;
-    # Walk the directory tree
-    opendir (DIR, $dir) || die "opendir($dir) failed: $!";
-    while (my $d = readdir (DIR)) {
-      # do not forget to remove "." and ".."
-      next if $d =~ /^\.(\.?|svn)$/;
-      push (@l, $d);
-    }
-    closedir (DIR) || warn "closedir($dir) failed: $!";
-
-    # top-down
-    &{$proc}($dir, @l);
-
-    foreach $f (@l) {
-      my $try = $dir . $Separator . $f;
-      # Don't descend symlinks, since they are only used for generic
-      # architecture names in bin.  The tpm files use the real arch
-      # directory names (with system version numbers).
-      if (-d $try && ! -l $try) {
-	&walk_dir($try, $proc, $prune);
-      }
-    }
-  }
-}
-
-# Builds up a tree from pathes
-# $node is a reference to a hash
-sub build_tree {
-  my (@elts) = @_;
-  my $node = { };
-  foreach my $p (@elts) {
-    &add_path_to_tree($node, split("[/\\\\]", $p));
-  }
-  return $node;
-}
-
-sub add_path_to_tree {
-  my ($node, @path) = @_;
-  my ($current);
-
-  while (@path) {
-    $current = shift @path;
-    if ($$node{$current}) {
-      $node = $$node{$current};
-    } else {
-      $$node{$current} = { };
-      $node = $$node{$current};
-    }
-  }
-  return $node;
-}
-
-# walks the tree, calling the function at each node
-sub walk_tree {
-  local (@stack_dir);
-  walk_tree1(@_);
-}
-
-sub walk_tree1 {
-  my ($node, $pre_proc, $post_proc) = @_;
-  for $k (keys(%{$node})) {
-    push @stack_dir, $k;
-    $v = $node->{$k};
-    if ($pre_proc) { &{$pre_proc}($v, @stack_dir) }
-    walk_tree1 (\%{$v}, $pre_proc, $post_proc);
-    $v = $node->{$k};
-    if ($post_proc) { &{$post_proc}($v, @stack_dir) }
-    pop @stack_dir;
-  }
-}
-
-sub print_node {
-  my ($node, @stackdir) = @_;
-  if (! keys(%{$node})) {
-    print join("/", @stackdir) . "\n";
-  }
-}
-
-sub print_tree {
-  my ($node) = @_;
-  &walk_tree($node, \&print_node);
-}
-
-sub node2list {
-  my ($node, @stackdir) = @_;
-  if (! keys(%{$node})) {
-    push @list, join("/", @stackdir);
-  }
-}
-
-sub tree2list {
-  my ($node) = @_;
-  local @list;
-  &walk_tree($node, \&node2list);
-  return @list;
-}
-
-# Check that a path exists in a tree
-# exactly or as a subpath
-sub check_path {
-  my ($node, @path, $exact) = @_;
-  my ($current);
-  #  print "Checking for " . join('/', @path) . " exact = $exact\n";
-  while (@path) {
-    $current = shift @path;
-    if ($$node{$current} == undef) {
-      return 0;
-    } else {
-      $node = $$node{$current};
-    }
-  }
-  #  print "left " .  join('/', @path) . " leaf " .  $#{keys %{$node}} . "\n";
-  if ($exact) {
-    # We are at a leaf !
-    return ($#{keys %{$node}} == -1);
-  } else {
-    return 1;
-  }
-}
-
-
-
-# Removes everything in the directory
-# Can't use walk_dir because it could not remove directories.
-sub cleandir {
-  my ($dir)= @_;
-  my ($DIR, $f, @l, $name);
-
-  if (-d $dir) {
-    opendir DIR, "$dir";
-    # do not forget to remove "." and ".."
-    @l = readdir (DIR); shift @l; shift @l;
-    closedir DIR;
-    foreach $f (@l) {
-      $name = $dir . $Separator . $f;
-      if (-d $name) {
-	&rmtree($name);
-	print "rmdir $name\n" if $opt_verbose;
-	rmdir "$name";
-      } elsif (-f "$name") {
-	print "Removing $name\n" if $opt_verbose;
-	unlink "$name";
-      } else {
-	print "Can't remove $name!\n";
-      }
-    }
-  }
-}
-
-sub rec_rmdir {
-  my (@files) = @_;
-  map { &cleandir($_); rmdir($_) } @files;
-}
-
-# Builds up a new directory together with any of its parents
-sub rec_mkdir {
-  my ($path) = @_;
-  my $tmp;
-  my $old_dir = &getcwd;
-  my @l = split ("[/\\\\]", $path);
-  if ($path =~ m@[/\\]@) {
-    chdir "/"; shift @l;
-  }
-  elsif ($l[0] =~ m/[A-Za-z]:/) {
-    chdir "$l[0]/";
-    shift @l;
-  }
-  while (@l) {
-    $tmp = shift(@l);
-    mkdir($tmp, 755) if (! -d $tmp);
-    print "mkdir $tmp\n";
-    chdir $tmp;
-  }
-  chdir $old_dir;
-}
-
-sub copy {
-  my (@src, $dest, $l, $t);
-  @l = @_;
-  $dest = pop @l;
-
-  @src = ();
-  if ($#l == 0 && -f $l[0]) {
-    @src = @l;
-  }
-  else {
-    map { 
-      my @expand = ($_ =~ m/ / ? <"$_"> : <$_>);
-#      print "expanding $_ => @expand\n";
-      push @src, @expand; 
-    } @l;
-  }
-  my $target;
-  map {
-    if (! -d $_) {
-      open IN, "<$_";
-      $target = $dest;
-      if (-d $target) {
-	$target =  &newpath($dest, &basename($_));
-      }
-      open OUT, ">$target";
-
-#      print "Copying $_ to " . &newpath($dest, &basename($_)) . "\n";
-      binmode(IN);
-      binmode(OUT);
-      print OUT <IN>;
-      close(OUT);
-      close(IN);
-      &set_file_time($_, $target);
-    }
-  } @src;
-}
-
-sub set_file_time {
-  my ($from, $to) = @_;
-  @st = stat($from);
-  utime($st[8], $st[9], $to);
-}
-
-sub rec_copy {
-  my (@src, $dest, $l, $dir);
-  @l = @_;
-  $dest = pop @l;
-
-  @src = ();
-  map { 
-    my @expand = ($_ =~ m/ / ? <"${_}"> : <${_}>);
-#    print "expanding $_ => @expand\n";
-    push @src, @expand; 
-  } @l;
-
-  if (! -d $dest) {
-    mkdir ($dest, 777);
-  }
-
-  $dir = &getcwd;
-  if (! is_absolute($dest) ) {
-    $dest = &canon_dir("$dir/$dest");
-    print "new dest = $dest\n";
-  }
-
-  map {
-    $l = $_;
-    if (-d $l) {
-      chdir($l);
-      &rec_copy("*", "$dest/" . &basename($l));
-      chdir($dir);
-    } else {
-      &copy($l, "$dest/" . &basename($l));
-      &set_file_time($l, "$dest/" . &basename($l));
-    }
-  }  @src;
-}
-
-sub move {
-  my ($dest) = pop @_;
-  my ($src, $f, $l);
-
-  @l = @_;
-  foreach $f (@l) {
-    # Handle globbing
-    if ($f =~ m/[*?]/) {
-      my @expand = ($f =~ m/ / ? <"${f}"> : <${f}>);
-#      print "expanding $f => @expand\n";
-      push @src, @expand;
-    } else {
-      push @src, $f;
-    }
-  }
-  if (($#src > 2) && (! -d $dest)) {
-    print STDERR "*** Move : can't move to $dest, not a directory.\n";
-    return;
-  }
-
-  foreach $f (@src) {
-    if (-d $dest) {
-      rename($f, &newpath($dest, &basename($f)));
-    } else {
-      &copy($f, $dest);
-      &set_file_time($f, $dest);
-      unlink($f);
-    }
-  }
-}
-
-# Simulate links by copying
-sub make_link {
-  my ($to, $from) = @_;
-  $to = canon_dir($to);
-  $from = &newpath(dirname($to), $from);
-  print "linking $from -> $to ...";
-  if (-e $to) {
-    unlink($to);
-  }
-  if (-d $from) {
-    system("xcopy $from $to /f/r/i/e/d/k");
-  } else {
-    &copy($from, $to);
-    &set_file_time($from, $to);
-  }
-  print " done\n";
-}
-
-# Merges all elements in the list into a single path, adding
-# directory separators as needed.
-sub newpath {
-  return &canon_dir(join ($Separator, @_));
-}
-
-#
-# Search for $key = $val in $file
-#
-sub look_for {
-  my($key, $file) = @_;
-  my($ret);
-  open FIN, "<$file";
-  while (<FIN>) {
-    if ($_ =~ m/^$key\s*=\s*(\S*)/) {
-      $ret = $1;
-      last;
-    } elsif (/^\#define\s+$key\s+(\S*)/) {
-      $ret = $1;
-      last;
-    }
-  }
-  close FIN;
-  return $ret;
-}
-
-
-sub max {
-  $m = shift;
-  while ($_ = shift) {
-    $m = $_ if ($_ > $m);
-  }
-  return $m;
-}
-
-sub min {
-  $m = shift;
-  while ($_ = shift) {
-    $m = $_ if ($_ < $m);
-  }
-  return $m;
-}
-
-# Changes lines of the form:
-# $var=... to
-# $var='$val' in $file
-#
-sub substitute_var_val {
-  my($file, $var, $val) = @_;
-  my($success);
-
-  @success = ( );
-
-  if (! -f $file) {
-    print STDERR "$0: $file is not a file\n";
-    return $success;
-  }
-  open IN, "<$file";
-  open OUT, ">$file.bak";
-
-  while (<IN>) {
-    s/^$var\s*=\s*(.*)$/do {
-			    push @success, $1;
-			    #		   "\$" . $var . "=" . eval('$val') . ";" .
-			    "$var = $val"
-			   }/e;
-    print OUT;
-  }
-  close IN;
-  close OUT;
-
-  &copy("$file.bak", "$file");
-  unlink("$file.bak");
-
-  return @success;
-}
-
-#
-# Used by globexpand($recurse, $dir)
-#
-sub globexpand_push {
-  my ($dir, @l) = @_;
-  #print "globexpand_push($dir, @l)\n" if $::opt_debug;
-  my ($file);
-  $dir =~ s@\\@/@g;
-  foreach $file (@l) {
-    next if $file =~ /^\.(\.?|svn)$/;
-    my $path = "$dir/$file";
-    next if $path =~ m/^${Tpm::IgnoredFiles}$/;
-    if (-f $path) {
-      #print "    push $dir/$file\n" if $::opt_debug;
-      push @listglob, $path;
-    }
-  }
-}
-
-#
-# Returns the list of files that match $pattern
-# Recursively walking directories if $recurse
-#
-sub globexpand {
-  my ($recurse, $pattern) = @_;
-  local @listglob = ( );
-#  $opt_verbose = ($pattern =~ m/GsTools/i ? 1 : 0);
-  if (-f $pattern) {
-    push @listglob, $pattern;
-  }
-  else {
-    my @expand = ($pattern =~ m/ / ? <"${pattern}"> : <${pattern}>);
-    #print "  globexpanding $pattern => @expand\n" if $::opt_debug;
-    while ( @expand ) {
-      $_ = shift @expand;
-      #print "elt $_\n" if $::opt_debug;
-      if (-f $_) {
-	#print "    pushing $_\n" if $::opt_debug;
-	push @listglob, $_;
-      } elsif (($_ ne "") && (-d $_) && ($recurse)) {
-	&walk_dir($_, \&globexpand_push);
-      }
-    }
-  }
-  #print "  globexpanded $pattern => @listglob\n" if $::opt_debug;
-  return @listglob;
-}
-
-sub diff_list {
-  local ($l1, $l2, *l1_l2, *l2_l1) = @_;
-
-  #   print "Before sorting:\n";
-  #   map { print "$_\n"; } @$l1;
-  #   print "\n";
-  #   map { print "$_\n"; } @$l2;
-  #  $opt_verbose = 1;
-  #  $opt_debug = 1;
-
-  @l1 = sort(@$l1);
-  @l2 = sort(@$l2);
-
-  #   print "After sorting:\n";
-  #   map { print "$_\n"; } @l1;
-  #   print "\n";
-  #   map { print "$_\n"; } @l2;
-
-  while ($#l1 >= 0 || $#l2 >= 0) {
-    if ($#l1 == -1) {
-      print "No more elements in l1, over.\n" if $opt_debug;
-      push (@l2_l1, @l2);
-      @l2 = ();
-    } elsif ($#l2 == -1) {
-      print "No more elements in l2, over.\n" if $opt_debug;
-      push (@l1_l2, @l1);
-      @l1 = ();
-    } else {
-      my $comp = $l1[0] cmp $l2[0];
-
-      if ($comp == 0) {
-	print "Same element $l1[0], shifting both.\n" if $opt_debug;
-	shift @l1;
-	shift @l2;
-      } elsif ($comp > 0) {
-	print "Greater element $l1[0] than $l2[0], shifting l2.\n" if $opt_debug;
-	push (@l2_l1, shift @l2);
-      } else {
-	print "Smaller element $l1[0] than $l2[0], shifting l1.\n" if $opt_debug;
-	push (@l1_l2, shift @l1);
-      }
-    }
-  }
-
-  if ($opt_verbose) {
-    print "$#l1_l2, $#l2_l1\n";
-
-    print "Elts in l1 and not in l2 : \n";
-    map { print "$_\n"; } @l1_l2; print "\n";
-
-    print "Elts in l2 and not in l1 : \n";
-    map { print "$_\n"; } @l2_l1; print "\n";
-  }
-  return ($#l1_l2 == -1 && $#l2_l1 == -1);
-}
-
-sub sync_dir {
-  my ($src, $dst, $opt_proc, $opt_prune, $opt_dry, $opt_mirror, $opt_nomkdir) = @_;
-  local ($cwd, $dry, $mirror, $proc, $prune, $nomkdir);
-
-  $cwd = &getcwd;
-  $dry = $opt_dry;
-  $mirror = $opt_mirror;
-  $proc = $opt_proc;
-  $prune = $opt_prune;
-  $nomkdir = $opt_nomkdir;
-
-  print "src = $src\ndst = $dst\n";
-  if (! chdir($src)) {
-    print "Error: can't chdir to $src\n";
-    return;
-  }
-  sync_dir_1(".", $dst);
-  chdir($cwd);
-}
-
-sub newer {
-  my ($f1, $f2) = @_;
-  my (@t1, @t2, $t11, $t12);
-  @t1 = stat($f1);
-  @t2 = stat($f2);
-  $t11 = $t1[9];
-  $t12 = $t2[9];
-  return -1 if ($t11 < $t12);
-  return 1 if ($t11 > $t12);
-  return 0;
-}
-
-sub sync_dir_1 {
-  # Walks the directory, executing $proc for each file,
-  # until done is returned.
-  my ($dir, $dst) = @_;
-  my (@l, $f, $done, $src, $DIR);
-
-  print "Walking $dir\n" if $opt_verbose;
-
-  if (! -d $dst) {
-    if (-f $dst) {
-      # Clash
-      print "!!!Clash: $dir is a directory and $dst is a file.\n";
-      return;
-    } elsif (! $nomkdir) {
-      print "Creating missing directory $dst\n";
-      mkdir $dst if (! $dry);
-    }
-  }
-
-  if ((! $prune) || ($prune && ! &{$prune}($dir))) {
-    $done = 0;
-    # Walk the directory tree
-    opendir DIR, "$dir";
-    # do not forget to remove "." and ".."
-    @l = readdir (DIR); shift @l; shift @l;
-    closedir DIR;
-    # Apply the filter
-    @l = &{$proc}($dir, $dst, @l) if ($proc);
-
-    foreach $f (@l) {
-      if (-d $dir . $Separator . $f) {
-	# source is directory
-	&sync_dir_1($dir . $Separator . $f, $dst . $Separator . $f);
-      } elsif (-d $dst . $Separator . $f) {
-	# source is file and destination is directory
-	print "!!!Clash: $dir is a file and $dst is a directory.\n";
-	next;
-      } elsif (! -f $dst . $Separator . $f) {
-	# source is file and destination is missing
-	print "Copying missing file " . $dst . $Separator . $f . "\n";
-	if (! $dry) {
-	  &copy ($dir . $Separator . $f, $dst . $Separator . $f);
-	  &set_file_time($dir . $Separator . $f, $dst . $Separator . $f);
-	}
-      } else {
-	my $compare = &newer($dir . $Separator . $f, $dst . $Separator . $f);
-	if ($compare > 0 || ($mirror && $compare < 0)) {
-	  # source is file and destination is older than source
-	  print "Copying newer file " . $dir . $Separator . $f . " than " . $dst . $Separator . $f . "\n";
-	  if (! $dry) {
-	    &copy ($dir . $Separator . $f, $dst . $Separator . $f);
-	    &set_file_time($dir . $Separator . $f, $dst . $Separator . $f);
-	  }
-	}
-      }
-    }
-    # Look at the other side
-    opendir DIR, "$dst";
-    # do not forget to remove "." and ".."
-    @l = readdir (DIR); shift @l; shift @l;
-    closedir DIR;
-    # Apply the same filter procedure
-    @l = &{$proc}($dir, $dst, @l) if ($proc);
-    foreach $f (@l) {
-      # We should look only for things to remove on the destination side
-      next if (-e "$dir$Separator$f");
-      # If it does not exist on the source side, then remove it.
-      if (-d "$dst$Separator$f") {
-	print "Removing directory $dst$Separator$f\n";
-	&rmtree("$dst$Separator$f") if (! $dry);
-      } elsif (-f "$dst$Separator$f") {
-	print "Removing file $dst$Separator$f\n";
-	unlink("$dst$Separator$f") if (! $dry);
-      } else {
-	print "Unknown file type $f\n";
-      }
-    }
-  }
-}
-
-sub start_redirection {
-  local ($log) = @_;
-
-  # start redirection if asked
-  if ($log) {
-    print "Logging onto $log\n";
-    open(SO, ">&STDOUT");
-    open(SE, ">&STDERR");
-
-    close(STDOUT);
-    close(STDERR);
-
-    open(STDOUT, ">$log");
-    open(STDERR,">&STDOUT");
-
-    select(STDERR); $| = 1;
-    select(STDOUT); $| = 1;
-  }
-}
-
-sub stop_redirection {
-
-  local($log) = @_;
-
-  if ($log) {
-    close(STDOUT);
-    close(STDERR);
-    open(STDOUT, ">&SO");
-    open(STDERR, ">&SE");
-  }
-}
-
-sub calc_file_size {
-  my ($dir, @files) = @_;
-  my ($size, @st);
-
-  # print "calc_file_size : $dir, files = $#files\n"; # if $opt_debug;
-  if (! -d $dir) {
-    print STDERR "$0: $dir is not a directory!\n";
-    return 0;
-  }
-  $size = 0;
-  @files = map { &globexpand(1, "$dir/$_"); } @files;
-  map {
-    @st = stat($_);
-    $size += $st[7];
-  } @files;
-  # print "size = $size\n" if ($opt_debug);
-  return $size;
-}
-
-# sub globtest {
-#   my ($s1, $s2) = @_;
-#   my @l1 = reverse(split("\\/", $s1));
-#   my @l2 = reverse(split("\\/", $s2));
-#   my $match = 1;
-#   #  pop @l1; pop @l2;
-#   my $debug = 0;
-#   print "l1 = (@l1), l2 = (@l2)\n" if ($debug);
-
-#   while ($match) {
-#     my $e1 = pop @l1;
-#     my $e2 = pop @l2;
-#     print "e1 = $e1, e2 = $e2\n" if ($debug);
-#     last if ($e1 eq "" && $e2 eq "");
-
-#     next if ($e1 eq $e2);
-#     if ($e1  eq "*") {
-#       return 1 if ($#l1 < 0);
-#       $e1 = pop @l1;
-#       print "e1 = $e1 $#l1 " if ($debug);
-#       do {
-# 	$e2 = pop @l2;
-# 	print "e2 = $e2 " if ($debug);
-#       } while ($e1 ne $e2 && $#l2 >= 0);
-#       print "\n" if ($debug);
-#       return ($e1 eq $e2 ? 1 : 0) if ($#l2 < 0);
-#     }
-#     if ($e2  eq "*") {
-#       return 1 if ($#l2 < 0);
-#       $e2 = pop @l2;
-#       do {
-# 	$e1 = pop @l1;
-#       } while ($e2 ne $e1 && $#l1 >= 0);
-#       return ($e1 eq $e2 ? 1 : 0) if ($#l1 < 0);
-#     }
-#     $match = ($e1 eq $e2 ? 1 : 0);
-#   }
-#   print "returning $match\n" if ($debug);
-#   return $match;
-# }
-
-sub regexpify_node {
-  my ($node, @stackdir) = @_;
-  my $relative = join "/", @stackdir;
-
-  @l2 = keys(%{$node});
-  # remove directories
-  @l2 = grep { ! (keys %{$node->{$_}}) } @l2;
-  if (@l2) {
-    opendir DIR, "$dir/$relative";
-    # do not forget to remove "." and ".."
-    my @l = readdir (DIR); shift @l; shift @l;
-    closedir DIR;
-    @l = grep { ! -d "$dir/$relative/$_" } @l;
-    # compare @l and keys(%{$node})
-    my (@l3, @l4);
-    @l3 = ();
-    @l4 = ();
-    my $diff = &diff_list(\@l, \@l2, \@l3, \@l4);
-    if ($diff) {
-      foreach $k (keys(%{$node})) {
-	delete $$node{$k} if (! (keys %{$node->{$k}}));;
-      }
-      $$node{'*'} = { };
-    }
-  }
-  else {
-
-  }
-}
-
-sub regexpify_recursive_node {
-  my ($node, @stackdir) = @_;
-  my $relative = join "/", @stackdir;
-
-  @l2 = keys(%{$node});
-  if (@l2) {
-    opendir DIR, "$dir/$relative";
-    # do not forget to remove "." and ".."
-    my @l = readdir (DIR); shift @l; shift @l;
-    closedir DIR;
-    # compare @l and keys(%{$node})
-    my (@l3, @l4);
-    @l3 = ();
-    @l4 = ();
-    my $diff = &diff_list(\@l, \@l2, \@l3, \@l4);
-    if ($diff) {
-      my $test = 1;
-      foreach $k (keys(%{$node})) {
-	$test = $test && ! $node->{$k}->{'__noregexpify'};
-      }
-      if ($test) {
-	foreach $k (keys(%{$node})) {
-	  delete $$node{$k};
-	}
-	$$node{'*'} = { };
-      }
-    } else {
-      $node->{'__noregexpify'} = 1;
-    }
-  }
-  else {
-
-  }
-}
-
-sub regexpify_cleanup {
-  my ($node, @stackdir) = @_;
-  if ($node->{'__noregexpify'}) {
-    delete $node->{'__noregexpify'};
-  }
-}
-
-sub regexpify {
-  my ($recursive, $texdir, @files) = @_;
-  my ($node);
-  local $dir = $texdir;
-
-  $node = &FileUtils::build_tree(@files);
-
-  if ($recursive) {
-    &FileUtils::walk_tree($node, '', \&regexpify_recursive_node);
-    &FileUtils::walk_tree($node, '', \&regexpify_cleanup);
-  }
-  else {
-    &FileUtils::walk_tree($node, '', \&regexpify_node);
-  }
-  return &FileUtils::tree2list($node);
-}
-
-# Print Perl backtrace, for debugging.
-sub backtrace {
-  my $subr;
-  my $stackframe = 0;
-  while (($pkg,$filename,$line,$subr) = caller ($stackframe)) {
-    print "$filename:$line: $pkg::$subr called\n";
-    $stackframe++;
-  }
-}
-
-END { }
-
-1;

Deleted: tex-common/trunk/scripts/Tpm.pm
===================================================================
--- tex-common/trunk/scripts/Tpm.pm	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/Tpm.pm	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,1875 +0,0 @@
-# $Id: Tpm.pm 3719 2007-01-23 01:44:19Z karl $
-# Written 2004, Fabrice Popineau.
-# Public domain.
-# 
-package Tpm;
-
-BEGIN {
-
- # $Exporter::Verbose = 1;
- use Exporter ();
- use Carp;
- use XML::DOM;
- use File::Path;
- use FileUtils;
- use Cwd;
- @ISA = qw( Exporter );
- @EXPORT_OK = qw (
-		  new 
-		  $MasterDir 
-		  %TexmfTreeOfType %TypeOfTexmfTree
-		  $FtpDir $CurrentArch
-		  @TpmCategories
-		  @TexmfTrees
-		  @ArchList
-		  @StandAlonePackages
-		  $IgnoredFiles
-		  &toRDF &toString
-		  &setAttribute &getAttribute
-		  &setList &getList
-		  &setHash &getHash
-		  &patternsExpand 
-		  &patternsUpdate
-		  &buildPatternsPackage 
-		  &buildPatternsDocumentation
-		  &getPatterns
-		  &fixDate
-		  &fixRequires
-		  &patternsAuto
-		  &completeUsingCatalogue
-		  &getAllFileList
-		  &getRequiredFileList
-		  &getRequiredTpm
-		  &getFilesFromPatterns
-		  &writeFile
-		  &testSync
-		  &Tpm2Zip
-		  &Clean
-		  &Remove
-		  $Verbose
-		 );
-
- use vars (@ISA);
-
-}
-
-$MasterDir = "c:/Source/TeXLive/Master";
-$ZipDir = "c:/InetPub/ftp/fptex/0.7";
-$CurrentArch = "all";
-$Editor = ($^O =~ m/win32/i ? "notepad": "vi");
-
-#print "$MasterDir $CurrentArch\n";
-
-%TexmfTreeOfType = ( "TLCore" => "texmf",
-		     "Documentation" => "texmf-doc",
-		     "Package" => "texmf-dist");
-%TypeOfTexmfTree = &reverse_hash(%TexmfTreeOfType);
-
- at TpmCategories = keys %TexmfTreeOfType;
- at TexmfTrees = values %TexmfTreeOfType;
-
-# must match subdir names in Master/bin/ directory.
- at ArchList = (
-	     "alpha-linux",
-	     "alpha-osf",
-	     "hppa-hpux",
-	     "i386-darwin",
-	     "i386-freebsd",
-	     "i386-linux",
-	     "i386-openbsd",
-	     "i386-solaris",
-	     "mips-irix",
-	     "powerpc-aix",
-	     "powerpc-darwin",
-	     "powerpc-linux",
-	     "sparc-solaris",
-	     "sparc-linux",
-	     "win32",
-	     "win32-static",
-	     "x86_64-linux"
-	    );
-
- at StandAlonePackages = (
-		       "TLCore/bin-afm2pl",
-		       "TLCore/bin-aleph",
-		       "TLCore/bin-dvipdfm",
-		       "TLCore/bin-dvipdfmx",
-		       "TLCore/bin-dvipsk",
-		       "TLCore/bin-gsftopk",
-		       "TLCore/bin-lcdftypetools",
-		       "TLCore/bin-omega",
-		       "TLCore/bin-pdftex",
-		       "TLCore/bin-metapost",
-		       "TLCore/bin-t1utils",
-		       "TLCore/bin-tex4htk",
-		       "TLCore/bin-windvi"
-		      );
-
-# this list is not up to date, therefore I think it is not needed.
-#  . "bin/i386-freebsd|bin/i386-openbsd|bin/i386-solaris|bin/mips-irix"
-#  . "|bin/powerpc-aix|bin/powerpc-darwin|bin/sparc-solaris"
-
-# used both to ignore whole tpm's (?) and individual files?
-# must match whole path
-$IgnoredFiles = "("
-  . 'source/.*'
-  . '|texmf/tpm/(collection-binaries|texlive|xemtex|scheme-.*|.*-static)\.tpm'
-  . '|texmf(-doc|-dist)?/(ls-R|aliases|lists/.*|README|tpm/tpm.dtd)'
-  . '|.*/\.svn.*'
-  . ")";
-
-# The so-called engines
-my @engines = (
-               "aleph", "enctex", "eomega", "metafont", "metapost",
-               "omega", "pdftex", "pdfetex", "tex", "vtex", 
-	       "bibtex", "context", "dvipdfm", "dvips", "ispell",
-	       "makeindex","mft", "psutils", "tex4ht", "texdoctk",
-	       "ttf2pk");
-# The so called formats
-my @formats = (
-	       "alatex", "amstex", "context", "cslatex", "csplain", "enctex",
-	       "eplain", "fontinst", "generic", "jadetex", "lambda",
-	       "latex", "latex3",
-	       "mex", "physe", "phyzzx", "plain", "psizzl", 
-	       "startex", "texinfo", "texsis", "xetex", "xelatex",
-               "xmltex", "ytex", );
-# Kind of font files
-my @fonttypes = (
-		 "afm", "misc", "ofm", "opentype", "ovf", "ovp", "pfb",
-		 "pfm", "pk", "sfd", "source", "tfm", "truetype", "type1", "vf"
-		);
-# Font vendors
-my @vendors = (
-	       "adobe", "amsfonts", "arabi", "archaic", "arphic",
-               "bakoma", "bh", "bitstrea", "bluesky",
-               "cg", "cns", "cspsfonts-adobe", "groff",
-	       "hoekwater", "ibm", "itc", "jknappen", "jmn", "korean", "lh",
-	       "mathdesign", "misc", "monotype", "paragrap",
-	       "public", "uhc", "urw", "urw35vf", "vntex", "wadalab",
-	       "xetex", "yandy");
-my @fontmodes = (
-		 "ljfour", "ljfive", "cx"
-		); 
-my @languages = ("bulgarian", "chinese", "czechslovak", "dutch", "english",
-                 "finnish", "french", "general", 
-		 "german", "greek", "italian", "japanese", "korean",
-		 "mongolian",
-		 "polish", "portuguese", "russian", "slovak", "spanish",
-		 "thai", "turkish", "ukrainian", "vietnamese");
-
-my %dotfiles = (
-		"texmf-dist/tex/latex/tools/*" => ( "texmf-dist/tex/latex/tools/.tex" ),
-		"texmf/chktex/*" => ( "texmf/chktex/.chktexrc" )
-		);
-
-my $CatalogueDir = "${MasterDir}/texmf-doc/doc/english/catalogue";
-my $Catalogue;
-
-#
-# %Tpm2Catalogue gives a mapping from tpm names to Catalogue entries
-#
-# missing entries
-# ? bengali:pandey
-# ? grotesq:urwvf
-# ? helvetic:urwvf
-# ? knuthotherfonts:halftone
-# makedtx:makedtx not working!
-# ? oberdiek:twoopt, tabularht, tabularkv, settobox, refcount, alphalph, chemar
-# r, classlist, dvipscol, engord, hypbmsec, hypcap, ifdraft, ifpdf, ifvtexm pagese
-# l, pdfcolmk pdfcrypt, pdflscape (somehing missing???)
-my %Tpm2Catalogue = (
-      "ctib" => "ctib4tex",
-      "CJK" => "cjk",
-      "bayer" => "universa",
-      "bigfoot" => "suffix",
-      "cb" => "cbgreek",
-      "cd-cover" => "cdcover",
-      "cmex" => "cmextra",
-      "cs" => "csfonts", 
-      "cyrplain" => "t2",
-      "devanagr" => "devanagari",
-      "eCards" => "ecards",
-      "ESIEEcv" => "esieecv",
-      "euclide" => "pst-eucl",
-      "GuIT" => "guit",
-      "HA-prosper" => "prosper",
-      "ibycus" => "ibycus4",
-      "ibygrk" => "ibycus4",
-      "IEEEconf" => "ieeeconf",
-      "IEEEtran" => "ieeetran",
-      "iso" => "isostds",
-      "iso10303" => "isostds",
-      "jknapltx" => "jknappen",
-      "kastrup" => "binhex",
-      "le" => "frenchle",
-      "mathtime" => "mathtime-ltx",
-      "omega-devanagari" => "devanagari-omega",
-      "pdftexdef" => "pdftex-def",
-      "procIAGssymp" => "prociagssymp",
-      "resume" => "res",
-      "SIstyle" => "sistyle",
-      "SIunits" => "siunits",
-      "syntax" => "syntax2",
-      "Tabbing" => "tabbing" );
-
-my $Verbose = 0;
-
-sub reverse_hash {
-{
-  my (%direct) = @_;
-  my %reversed;
-  my ($key, $value);
-  foreach $key (keys %direct) { 
-    $reversed{$direct{$key}} = $key;
-  }
-  return %reversed;
-}
-
-
-
-}
-#----------------------------------------------------------------------
-# Helper functions
-sub getTextField {
-  my ($doc, $f) = @_;
-  my $nodelist = $doc->getElementsByTagName("TPM:$f");
-
-  my %s = ( );
-  return %s if ($nodelist->getLength <= 0);
-  my $node = $nodelist->item(0);
-  return %s if (! $node);
-  foreach my $k (@{$node->getAttributes->getValues}) {
-    $k = $k->getName;
-    $s{$k} = $node->getAttribute($k);
-  }
-  $node = $node->getFirstChild();
-  return %s  if (! $node);
-  my $str = $node->toString;
-  $str = $node->expandEntityRefs($str);
-  $s{"text"} = $str;
-  return %s;
-}
-
-sub getListField {
-  my ($doc, $f) = @_;
-
-  my %s = getTextField($doc, $f);
-  my $str = $s{"text"};
-  $str = "" if (!defined($str));
-  $str =~ s/^\n*//;
-  $str =~ s/\n*$//;
-  $str =~ s/\n/ /gomsx;
-  @{$s{"text"}} = split(" ", $str);
-  return %s;
-}
-
-sub getMultipleTextField {
-  my ($doc, $f) = @_;
-  my $nodelist = $doc->getElementsByTagName("TPM:$f");
-  my @stringlist = ( );
-
-  for (my $i = 0; $i < $nodelist->getLength; $i++) {
-    my $node = $nodelist->item($i);
-    my %s = ( );
-    foreach my $k (@{$node->getAttributes->getValues}) {
-      $k = $k->getName;
-      $s{$k} = $node->getAttribute($k);
-    }
-    $node = $node->getFirstChild();
-    if ($node) {
-      my $text = $node->toString;
-      $text =~ s/\n/ /gomsx;
-      push @{$s{"text"}}, split(" ", $text);
-    }
-    push @stringlist, \%s;
-  }
-
-  return @stringlist;
-}
-
-sub getAttributes {
-  my ($doc, $f) = @_;
-  my $nodelist = $doc->getElementsByTagName("TPM:$f");
-  my %attr = ( );
-  return %attr if ($nodelist->getLength <= 0);
-  my $node = $nodelist->item(0);
-
-  foreach my $k (@{$node->getAttributes->getValues}) {
-    $k = $k->getName;
-    $attr{$k} = $node->getAttribute($k);
-  }
-  return %attr;
-}
-#----------------------------------------------------------------------
-
-sub new {
-  my $type = shift;
-  my ($filename) = @_;
-  my $self = { };
-  bless $self, $type;
-  if ($filename) {
-    $filename =~ s@\\@/@g;
-    $filename .= ".tpm" if ($filename !~ m@\.tpm$@);
-    if (! &FileUtils::is_absolute($filename)) {
-      $filename = "${Tpm::MasterDir}/${filename}";
-    }
-    if (! -f $filename) {
-      $filename =~ m@^.*/(.*)/(.*)$@;
-      if (&FileUtils::member($1, @TpmCategories)) {
-	$filename = "${Tpm::MasterDir}/" . $TexmfTreeOfType{$1} . "/tpm/$2";
-      }
-    }
-	die (`pwd` . "$filename not found!\n") if (! -f $filename);
-    my $parser = new XML::DOM::Parser;
-    $doc = $parser->parsefile($filename);
-    my ($type, $name);
-    $filename =~ m@^(.*/|)([^/]+)[/\\]tpm[/\\]([^/\.]+)\.tpm$@;
-    $type = $TypeOfTexmfTree{$2}; $name = $3;
-    $self->initialize($type,$name,$doc);
-  }
-  return $self;
-}
-
-sub initialize {
-  my ($self, $type, $name, $doc) = @_;
-  my $parser = new XML::DOM::Parser;
-
-  my $text;
-  my @list;
-  my %field;
-  
-  %field = &getTextField($doc, "Name");
-  $text = $field{"text"};
-  if ($text ne $name) {
-    print "Warning: $filename has wrong Name attribute ($text should be $name) ... fixing it.\n";
-  }
-  $self->setAttribute("Name", $name);
-  
-  %field = &getTextField($doc, "Type");
-  $text = $field{"text"};
-  if ($text ne $type) {
-    print "Warning: $filename has wrong Type attribute ($text should be $type) ... fixing it.\n";
-  }
-  $self->setAttribute("Type", $type);
-  
-  for my $tag ("Date", "Version", "Creator", "Size", "Author", "Title", "Description", "Provides") {
-    %field =  &getTextField($doc, "$tag");
-    $text = $field{"text"};
-    $self->setAttribute("$tag", $text);
-  }
-  
-  $text = $self->getAttribute("Provides");
-  if ("$type/$name" ne $text) {
-    print "Warning: $filename has wrong Provides attribute ($text should be $type/$name) ... fixing it.\n";
-  }
-  $self->setAttribute("Provides", "$type/$name");
-  
-  %field = &getAttributes($doc, "Flags");
-  $self->setHash("Flags", %field);
-  #    map { print "$_ = $field{$_}\n"; } (keys %field);
-  
-  for my $tag ("BinPatterns", "RunPatterns", "DocPatterns", "SourcePatterns", "RemotePatterns") {
-    %field = &getListField($doc, "$tag");
-    @list = @{$field{"text"}};
-    $self->setList("$tag", @list);
-  }
-  
-  # FIXME ! several architectures !
-  @list = &getMultipleTextField($doc, "BinFiles");
-  $self->setList("BinFiles", @list);
-  
-  for my $tag ("RunFiles", "DocFiles", "SourceFiles", "RemoteFiles") {
-    %field = &getListField($doc, "$tag");
-    $self->setHash("$tag", %field);
-  }
-  
-  my %requires = ();
-  for my $tag (@TpmCategories) {
-    my $nodelist = $doc->getElementsByTagName("TPM:$tag");
-    for (my $i = 0; $i < $nodelist->getLength; $i = $i+1) {
-      my $package = $nodelist->item($i)->getAttribute("name");
-      push @{$requires{$tag}}, $package;
-    }
-  }
-  $self->setHash("Requires",%requires);
-  
-  # Installation instructions
-  my @instructions = ();
-  $nodelist = $doc->getElementsByTagName("TPM:Installation");
-  if ($nodelist->getLength > 0) {
-    my $executelist = $doc->getElementsByTagName("TPM:Execute");
-    for (my $i = 0; $i < $executelist->getLength; $i++) {
-      my $inst = $executelist->item($i);
-      my %execute = ();
-      foreach my $attr (@{$inst->getAttributes->getValues}) {
-	$attr = $attr->getName;
-	$execute{$attr} =  $inst->getAttribute($attr);
-      }
-      push @instructions, \%execute;
-    }
-  }
-  
-  $self->setList("Installation", @instructions);
-  
-}
-
-#
-# Create a fresh package of $name and $type
-#
-sub fresh {
-  my $type = shift;
-  my $self = { };
-  bless $self, $type;
-  my ($provides) = @_;
-  my $name;
-  $provides =~ m@^([^/]+)[/\\]([^/\.]+)$@;
-  $type = $1; $name = $2;
-  my $texmf = $TexmfTreeOfType{$type};
-  print "Creating new $type $name tpm file\n";
-  my $parser = new XML::DOM::Parser;
-  chomp (my $user = `whoami`);  # for Creator field.
-  my $doc = $parser->parse("\
-<!DOCTYPE rdf:RDF SYSTEM \"../../support/tpm.dtd\">\
-<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:TPM=\"http://texlive.dante.de/\">\
-  <rdf:Description about=\"http://texlive.dante.de/texlive/tlcore/${name}.zip\">\
-    <TPM:Name>${name}</TPM:Name>\
-    <TPM:Type>${type}</TPM:Type>\
-    <TPM:Date>1970/01/01 01:00:00</TPM:Date>\
-    <TPM:Version></TPM:Version>\
-    <TPM:Creator>$user</TPM:Creator>\
-    <TPM:Author></TPM:Author>\
-    <TPM:Title>The ${name} package.</TPM:Title>\
-    <TPM:Size>314</TPM:Size>\
-    <TPM:Description></TPM:Description>\
-    <TPM:Build>\
-      <TPM:RunPatterns>${texmf}/tpm/${name}.tpm</TPM:RunPatterns>\
-    </TPM:Build>\
-    <TPM:RunFiles size=\"270\">${texmf}/tpm/${name}.tpm</TPM:RunFiles>\
-    <TPM:Provides>${type}/${name}</TPM:Provides>\
-  </rdf:Description>\
-</rdf:RDF>\
-");
-  $self->initialize($type, $name, $doc);
-  return $self;
-}
-
-sub toRDF {
-  my ($self) = @_;
-  my $parser = new XML::DOM::Parser;
-
-  $doc = $parser->parse("<!DOCTYPE rdf:RDF\n\
-  SYSTEM \"../../support/tpm.dtd\">\n\
-<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns\#\"\n\
- xmlns:TPM=\"http://texlive.dante.de/\">\n</rdf:RDF>\n");
-
-  my ($node, $child, $father, $nodelist, %attr);
-  # Add an 'about' field
-  my $tpmdesc = $doc->createElement("rdf:Description");
-
-  my $name = $self->getAttribute("Name");
-  my $type = $self->getAttribute("Type");
-  if ($name) {
-    # Add an about node
-    $node = $doc->createAttribute("about", "http://texlive.dante.de/texlive/" . $type . "/" . $name . ".zip");
-    #  my $tpmhref = $doc->createAttribute("href", $href);
-    $tpmdesc->setAttributeNode($node);
-    #  $tpmdesc->setAttributeNode($tpmhref);
-  }
-  else {
-    warn " toRDF(), no Name found!\n" if (! $name);
-  }
-
-  for my $tag ("Name", "Type", "Date", "Version", "Creator", "Title",
-               "Description", "Author", "Size", "License") { 
-    my $attribute = $self->getAttribute("$tag");
-    # None of these are optional
-    $node = $doc->createElement("TPM:$tag");
-    $child = $doc->createTextNode($attribute);
-    $node->appendChild($child);
-    $tpmdesc->appendChild($node);
-    warn " toRDF($name), no $tag found\n" if ! $attribute && $::opt_warnings;
-  }
-
-  # Flags are optional
-  $node = $doc->createElement("TPM:Flags");
-  %attr = $self->getHash("Flags");
-  if (%attr) {
-    foreach $key (keys %attr) {
-      $child = $doc->createAttribute($key, ${attr}{$key});
-      $node->setAttributeNode($child);
-    }
-    # Only if there are attributes
-    $tpmdesc->appendChild($node);
-  }
-
-  # Globbed expressions
-  $father = $doc->createElement("TPM:Build");
-
-  for my $tag ("BinPatterns", "RunPatterns", "DocPatterns", "SourcePatterns", "RemotePatterns") {
-    $node = $doc->createElement("TPM:$tag");
-    $text = $self->getList("$tag");
-    if ($text ne "" && $text !~ m/^[\s\n]+$/sx) {
-      $child = $doc->createTextNode($text);
-      $node->appendChild($child);
-      $father->appendChild($node);
-    }
-  }
-
-  $tpmdesc->appendChild($father);
-  # End of globbed expressions
-
-  my @binfiles = $self->getList("BinFiles");
-  if (@binfiles) {
-    for (my $i = 0; $i <= $#binfiles; $i++) {
-      $node = $doc->createElement("TPM:BinFiles");
-      my %archbin = %{$binfiles[$i]};
-      my $tpmattr = $doc->createAttribute("arch", $archbin{"arch"});
-      $node->setAttributeNode($tpmattr);
-      $tpmattr = $doc->createAttribute("size", $archbin{"size"});
-      $node->setAttributeNode($tpmattr);
-      my @files = @{$archbin{"text"}};
-      if (@files) {
-	my $strfiles = (join "\n", @files) . "\n";
-	$child = $doc->createTextNode($strfiles);
-	$node->appendChild($child);
-	$tpmdesc->appendChild($node);
-      }
-    }
-  }
-
-  for my $tag ("RunFiles", "DocFiles", "SourceFiles", "RemoteFiles") {
-    $node = $doc->createElement("TPM:$tag");
-    %field = $self->getHash("$tag");
-    if (%field) {
-      my $tpmattr = $doc->createAttribute("size", $field{"size"});
-      $node->setAttributeNode($tpmattr);
-      my @files = @{$field{"text"}};
-      if (@files) {
-	my $strfiles = (join "\n", @files) . "\n";
-	$child = $doc->createTextNode($strfiles);
-	$node->appendChild($child);
-	$tpmdesc->appendChild($node);
-      }
-    }
-  }
-
-  $node = $doc->createElement("TPM:Requires");
-  my %requires = $self->getHash("Requires");
-  if (%requires) {
-    foreach my $k (sort @TpmCategories) {
-      my @taglist = @{$requires{$k}};
-      for my $tag (sort @taglist) {
-        my $tpmbin = $doc->createElement("TPM:$k");
-        my $a = $doc->createAttribute("name", $tag);
-        $tpmbin->setAttributeNode($a);
-        $node->appendChild($tpmbin);
-      }
-    }
-    $tpmdesc->appendChild($node);
-  }
-
-  $node = $doc->createElement("TPM:Installation");
-  my @installation = $self->getList("Installation");
-  if (@installation) {
-    for(my $i = 0 ; $i <= $#installation; $i++) {
-      my $tpmexec = $doc->createElement("TPM:Execute");
-      my %execute = %{$installation[$i]};
-      my $attr = $doc->createAttribute("function", $execute{"function"});
-      $tpmexec->setAttributeNode($attr);
-      print " kfunc = $execute{function}\n" if ($::opt_debug);
-      
-      foreach my $kparam (sort keys %execute) {
-        print "  kparam = $kparam\n" if $::opt_debug;
-        if ($kparam ne "function") {
-	  $attr = $doc->createAttribute($kparam, $execute{$kparam});
-          $tpmexec->setAttributeNode($attr);
-        }
-      }
-      $node->appendChild($tpmexec);
-    }
-    $tpmdesc->appendChild($node);
-  }
-
-  $node = $doc->createElement("TPM:Provides");
-  $text = $self->getAttribute("Provides");
-  $text = $name if (! $text);
-  if ($text) {
-    $child = $doc->createTextNode($text);
-    $node->appendChild($child);
-    $tpmdesc->appendChild($node);
-  }
-
-  # Set the fragment
-  $doc->getElementsByTagName("rdf:RDF")->item(0)->appendChild($tpmdesc);
-
-  return $doc;
-}
-
-sub toString {
-  my ($self) = @_;
-  return $self->toRDF()->toString();
-}
-
-sub writeFile {
-  my ($self, $name) = @_;
-  if (! $name) {
-    $name = "${MasterDir}/" . $TexmfTreeOfType{$self->getAttribute("Type")} . "/tpm/" . $self->getAttribute("Name") . ".tpm";
-  }
-  open (OUT, ">$name") || die "open(>$name) failed: $!";
-  # rewrite them without ^M
-  binmode(OUT) if ($^O =~ /MSWin32/);
-  print OUT $self->toString();
-  close (OUT) || warn "close(>$name) failed: $!";
-}
-
-sub setAttribute {
-  my ($self, $n, $v) = @_;
-  $self->{$n} = $v;
-}
-
-sub getAttribute {
-  my ($self, $n) = @_;
-  return ($self->{$n});
-}
-
-sub setList {
-  my ($self, $n, @v) = @_;
-  @{$self->{$n}} = @v;
-}
-
-sub getFileList {
-  my ($self, $n) = @_;
-  my @l = ();
-  if ($n eq "BinFiles") {
-    foreach $v (@{$self->{$n}}) {
-      if (($CurrentArch eq "all" && FileUtils::member(${$v}{"arch"}, @Tpm::ArchList))
-	  || ${$v}{"arch"} eq ${CurrentArch}) {
-        my @val = @{${$v}{"text"}};
-	#print "getfilelist pushing for $v: @val\n";
-        push @l, @val;
-      }
-    }
-  }
-  elsif ($n =~ /^(Run|Doc|Source|Remote)Files$/) {
-    my %v = %{$self->{$n}};
-    @l = @{$v{"text"}};
-  }
-  else {
-    @l = @{$self->{$n}};
-  }
-
-  if (wantarray) {
-    #print "getfilelist($n) returning list: @l\n";
-    #&debug_hash ($n, $self->{$n});
-    #print "$n {text} = " . @{$n{text}} . "\n";
-    return @l;
-  }
-  else {
-    #print "getfilelist($n) returning scalar: @l\n";
-    if (@l) {
-      return (join "\n", @l);
-    }
-    else {
-      return "";
-    }
-  }
-}
-
-# Need to test forcycles !
-sub getRequiredFileList {
-  my ($self, $n) = @_;
-  my @l = ();
-#  print "name = " . $self->getAttribute('Name') . "\n";
-  if ($n eq 'all') {
-    push @l, $self->getAllFileList();
-  }
-  else {
-    push @l, $self->getFileList($n);
-  }
-
-  my %requires = $self->getHash("Requires");
-  my @reqlist = ();
-  foreach my $k (keys %requires) {
-    foreach my $e (@{$requires{$k}}) {
-      push @reqlist, ${Tpm::TexmfTreeOfType}{$k} . "/tpm/$e.tpm";
-    }
-  }
-  map {
-    my $tpm = Tpm->new($_);
-    push @l, $tpm->getRequiredFileList($n);
-  } @reqlist;
-  return @l;
-}
-
-sub getRequiredTpm {
-  my ($self, $recursive) = @_;
-
-  my %requires = $self->getHash("Requires");
-  my @reqlist = ();
-  foreach my $k (keys %requires) {
-    foreach my $e (@{$requires{$k}}) {
-      push @reqlist, "$k/$e";
-    }
-  }
-
-  my @l = ();
-
-  if ($recursive) {
-    while (@reqlist) {
-      my $tpmname = pop @reqlist;
-      &FileUtils::push_uniq(\@l, $tpmname);
-      my $tpm = Tpm->new($tpmname);
-      print "tpmname = $tpmname\n";
-      %requires = $tpm->getHash("Requires");
-      foreach my $k (keys %requires) {
-	foreach my $e (@{$requires{$k}}) {
-	  &FileUtils::push_uniq(\@reqlist, "$k/$e");
-	}
-      }
-    }
-  }
-  else {
-    @l = @reqlist;
-  }
-  print $self->getAttribute("Name") . " requires @l\n";
-  return @l;
-
-}
-
-sub getList {
-  my ($self, $n) = @_;
-  my @l = @{$self->{$n}};
-  if ($n eq "BinFiles") {
-    # the elements of BinFiles are hash references; we want to sort by
-    # the arch name, so the output will be stable.
-    @l = sort { $a->{"arch"} cmp $b->{"arch"} } @l;
-
-  } elsif ($n eq "Installation") {
-    # Need these alphabetically, too, e.g.,
-    @l = sort tpm_inst_sort @l;
-
-  } else {
-    @l = sort @l;
-  }
-
-  if (wantarray) {
-    return @l;
-  } elsif (@l) {
-    return (join "\n", @l);
-  } else {
-    return "";
-  }
-}
-
-# This function is used to sort the TPM:Installation elements for
-# getList.  Include both key names and values, e.g.,
-# <TPM:Execute function="addMap" mode="mixed" parameter="cm-super-t1.map"/>
-# <TPM:Execute function="addMap" mode="mixed" parameter="cm-super-x2.map"/>
-# should be sorted in that order.
-# 
-sub tpm_inst_sort
-{
-  $astr = join (" ", map { $_ . "=" . $a->{$_} } keys %$a);
-  $bstr = join (" ", map { $_ . "=" . $b->{$_} } keys %$b);
-  return $astr cmp $bstr;
-}
-
-sub setHash {
-  my ($self, $n, %v) = @_;
-  %{$self->{$n}} = %v;
-}
-
-sub getHash {
-  my ($self, $n) = @_;
-  return %{$self->{$n}};
-}
-
-sub getPatterns {
-  my ($self, $recurse) = @_;
-  my @patterns = ();
-
-  warn "Doing " . $self->getAttribute("Name") . "\n";
-  my $type = $self->getAttribute("Type");
-  if ($type =~ m/tlcore/i) {
-    # already there
-#    push @patterns, $self->getList("RunPatterns");
-#    push @patterns, $self->getList("DocPatterns");
-#    push @patterns, $self->getList("SourcePatterns");
-  }  
-  elsif ($type =~ m/package/i) {
-    $self->buildPatternsPackage();
-    # Add them
-    push @patterns, $self->getList("RunPatterns");
-    push @patterns, $self->getList("DocPatterns");
-    push @patterns, $self->getList("SourcePatterns");
-
-    $self->setList("RunPatterns", () );
-    $self->setList("DocPatterns",  () );
-    $self->setList("SourcePatterns", () );
-
-  }  
-  elsif ($type =~ m/documentation/i) {
-    $self->buildPatternsDocumentation();
-    push @patterns, $self->getList("RunPatterns");
-    push @patterns, $self->getList("DocPatterns");
-    push @patterns, $self->getList("SourcePatterns");
-    
-    $self->setList("RunPatterns", () );
-    $self->setList("DocPatterns",  () );
-    $self->setList("SourcePatterns", () );
-  }
-  if ($recurse) {
-    my %requires = $self->getHash("Requires");
-    my @reqlist = ();
-    foreach my $k (keys %requires) {
-      foreach my $e (@{$requires{$k}}) {
-	push @reqlist, ${Tpm::TexmfTreeOfType}{$k} . "/tpm/$e.tpm";
-      }
-    }
-    map {
-      print "testing $_\n";
-      if (&FileUtils::member("$_", @patterns)) {
-	print "Already done: $_\n";
-      }
-      else {
-	my $tpm = Tpm->new("${MasterDir}/$_");
-	push @patterns, $tpm->getPatterns($recurse);
-      }
-    } @reqlist;
-  }
-  return @patterns;
-}
-
-sub getFilesFromPatterns {
-  my ($self, $n, $recurse) = @_;
-  my @patterns = ();
-  if ($n eq "BinFiles") {
-    if ($CurrentArch eq "all") {
-      my @l = $self->getList("BinPatterns");
-      my @lgen = ();
-      my @lwin32 = ();
-      my @lothers = ();
-      while (@l) {
-	my $f = shift @l;
-	if ($f =~ m/\/\$\{ARCH\}\//) {
-	  push @lgen, $f;
-	}
-	elsif ($f =~ m/\/win32(-static)?\//) {
-	  push @lwin32, $f;
-	}
-	else {
-	  push @lothers, $f;
-	}
-      }
-
-      foreach my $a (@ArchList) {
-	# Skip win32, since they are processed separately anyway
-	next if ($a =~ m/^win32(-static)?/);
-	my @l = @lgen;
-	map { $_ =~ s/\$\{ARCH\}/${a}/sxo } @l;
-	push @patterns, @l;
-      }
-      push @patterns, @lwin32;
-      push @patterns, @lothers;
-    }
-    elsif ($CurrentArch =~ m/win32/) {
-      my @l = grep { /\/${CurrentArch}\// } $self->getList("BinPatterns");
-      push @patterns, @l;
-    }
-    else {
-      push @patterns, (map {s/\$\{ARCH\}/$CurrentArch/ } $self->getList("BinPatterns"));
-      push @patterns, (grep { /\/${CurrentArch}\// } $self->getList("BinPatterns"));
-
-    }
-  }
-  else {
-    $n =~ s/Files/Patterns/;
-    my @files = $self->getList($n);
-    push @patterns, @files;
-  }
-  my @files = ();
-  if (@patterns) {
-    @files = ();
-    map { 
-      push @files, $dotfiles{$_};
-      $_ = "$MasterDir/" . $_ ; 
-    } @patterns;
-    for my $p (@patterns) {
-      push @files, &FileUtils::globexpand ($recurse, $p);
-      #print "  files after $p: @files\n" if $::opt_debug;
-    }
-    map { $_ =~ s/^${MasterDir}\///; } @files;
-    @files = &FileUtils::sort_uniq(@files);
-  }
-  return @files;
-}
-
-sub patternsExpand {
-  my ($self, $recurse) = @_;
-  my (%v, $size);
-  my @allbinfiles = $self->getFilesFromPatterns("BinFiles", 0);
-  my @files = ();
-  my $file_number = $#allbinfiles + 1;
-
-  foreach my $a (@ArchList) {
-    my @archbinfiles = grep { /\/$a\// } @allbinfiles;
-    if (@archbinfiles) {
-      $size = &FileUtils::calc_file_size($MasterDir, @archbinfiles);
-      my %v = ( );
-      $v{"arch"} = $a;
-      $v{"size"} = $size;
-      push @{$v{"text"}}, @archbinfiles;
-      push @files, \%v;
-    }
-  }
-  $self->setList("BinFiles", @files);
-  #print "binfiles = @files\n";
-
-  for my $tag ("RunFiles", "DocFiles", "SourceFiles", "RemoteFiles") {
-    #print ($self->getAttribute("Name") . ", tag $tag\n") if $::opt_debug;
-    my %v = ( );
-    @files = $self->getFilesFromPatterns($tag, $recurse);
-    #print "  files = @files\n" if $::opt_debug;
-    $file_number += $#files + 1;
-    $size = &FileUtils::calc_file_size($MasterDir, @files);
-    $v{"arch"} = $a;
-    $v{"size"} = $size;
-    @{$v{"text"}} = @files;
-    $self->setHash($tag, %v);
-  }
-
-  if ($file_number == 1) {
-    # No need to complain about the collection tpm's,
-    # they aren't intended to have files.
-    my $name = $self->getAttribute("Provides");
-    print "Package $name has no files !\n"
-      unless $name =~ m!/(collection-*|scheme-*|xemtex|texlive)!;
-  }
-}
-
-sub compress_bin {
-  my (@files) = @_;
-  my @result = ();
-  # Compute architectures list without win32
-  my @al = @ArchList;
-  @al = grep { $_ !~ m at win32(-static)?@ } @al;
-  
-  # Process patterns one by one
-  while (@files) {
-    # First file in the list
-    my $f = $files[0];
-
-    # If it is a win32 file, nothing to do
-    if ($f =~ m@/win32(-static)?/@) {
-      push @result, $f;
-      shift @files;
-      next;
-    }
-    # Else, try to match an architecture in its path
-    my $re = $f;
-    my $a;			# Keep the architecture that matched
-    for my $arch (@al) {
-      # Replace the architecture by a catch all pattern
-       if ($re =~ s@/(${arch})/@/[^\/]*/@x) {
-	 $re = "^${re}\$";
-	 $a = $1; last;
-       }
-    }
-    # Because of bg5+latex
-    $re =~ s/\+/\\\+/;
-
-    # Compute how many files in the list will match this pattern
-    my @match = grep {$_ =~ m@${re}@ } @files;
-    # If all the architectures are present, then do the replacement
-    if (@match == @al) {
-      @files = grep { $_ !~ m@${re}@ } @files;
-      $f =~ s@/${a}/@/\${ARCH}/@;
-    }
-    else {
-      shift @files;
-    }
-    push @result, $f;
-  }
-
-  return @result;
-}
-
-sub patternsUpdate {
-  my ($self) = @_;
-
-  my @patterns = &compress_bin(&FileUtils::regexpify(0, $MasterDir, $self->getFileList("BinFiles")));
-  $self->setList("BinPatterns", @patterns);
-  @patterns = &FileUtils::regexpify(0, $MasterDir, $self->getFileList("DocFiles"));
-  $self->setList("DocPatterns", @patterns);
-  @patterns = &FileUtils::regexpify(0, $MasterDir, $self->getFileList("RunFiles"));
-  $self->setList("RunPatterns", @patterns);
-  @patterns = &FileUtils::regexpify(0, $MasterDir, $self->getFileList("SourceFiles"));
-  $self->setList("SourcePatterns", @patterns);
-  @patterns = &FileUtils::regexpify(0, $MasterDir, $self->getFileList("RemoteFiles"));
-  $self->setList("RemotePatterns", @patterns);
-}
-
-sub testSync {
-  my ($self) = @_;
-
-  my @files_from_patterns = () ;
-  push @files_from_patterns, $self->getFilesFromPatterns("BinFiles");
-  push @files_from_patterns, $self->getFilesFromPatterns("RunFiles");
-  push @files_from_patterns, $self->getFilesFromPatterns("DocFiles");
-  push @files_from_patterns, $self->getFilesFromPatterns("SourceFiles");
-  push @files_from_patterns, $self->getFilesFromPatterns("RemoteFiles");
-
-  my @files = ();
-  push @files, $self->getFileList("BinFiles");
-  push @files, $self->getFileList("RunFiles");
-  push @files, $self->getFileList("DocFiles");
-  push @files, $self->getFileList("SourceFiles");
-  push @files, $self->getFileList("RemoteFiles");
-  my @l1 = (); 
-  my @l2 = ();
-  &FileUtils::diff_list(@files_from_patterns, @files, \@l1, \@l2);
-  if ($#l1 < 0 && $#l2 < 0) {
-    return 1;
-  }
-  else {
-    print $self->getAttribute("Name") . ": patterns and file lists not in sync\n";
-    print "Files in patterns not in lists :\n";
-    map { print "$_\n"; } @l1;
-    print "Files in lists not in patterns :\n";
-    map { print "$_\n"; } @l2;
-    return 0;
-  }
-}
-
-
-sub formatdate {
-  return sprintf("%4d/%02d/%02d %02d:%02d:%02d", 
-	       $_[5]+1900, $_[4]+1, $_[3], $_[2], $_[1], $_[0]);
-}
-
-sub printdate {
-  my ($strDate) = @_;
-  my @mytime;
-  my ($s, $strTime);
-
-  ($strDate, $strTime) = split " ", $strDate;
-  # print "strDate = $strDate; strTime = $strTime\n";
-  if ($strDate =~ m@(\d\d\d\d|\d\d)/(\d\d)/(\d\d)@) {
-    $mytime[5] = eval $1;
-    $mytime[4] = eval $2;
-    $mytime[3] = eval $3;
-    if ($strTime =~ m@(\d\d):(\d\d):(\d\d)@) {
-      $mytime[2] = eval $1;
-      $mytime[1] = eval $2;
-      $mytime[0] = eval $3;
-    }
-    $mytime[5] -= 1900 if ($mytime[5] > 1900);
-    $mytime[4] -= 1;
-  }
-  else {
-    @mytime = gmtime;
-  }
-
-  return &formatdate(@mytime);
-}
-
-sub debug_date
-{
-  my ($str,$date) = @_;
-  #warn "$str " . &formatdate(gmtime($date)) . "\n";
-}
-
-# if any of FILES are newer than OLDDATE, return the newest mtime.
-# 
-sub max_date
-{
-  my ($olddate, @files) = @_;
-  my $tpmdate = 0;
-  &debug_date ("  max_date files=@files, olddate=", $olddate);
-  for my $f (@files) {
-    # although the texmf/tpm/*.tpm files are mostly hand-maintained, it
-    # still seems best for the TPM:Date to reflect the newest date of
-    # the actual files in the package; the sizes and such might still
-    # get autoupdated.
-    if ($f =~ m,/tpm/.*\.tpm$,) {
-      $tpmdate = (stat("$MasterDir/$f"))[9];
-      &debug_date ("   tpm itself, found ", $tpmdate);
-    }
-    elsif (-f "$MasterDir/$f") {
-      my @st = stat("$MasterDir/$f");
-      &debug_date ("   file $f is ", $st[9]);
-      if ($st[9] > $olddate) {
-	&debug_date ("    replacing olddate ", $olddate);
-        $olddate = $st[9];
-      }
-    }
-  }
-  if ($olddate == 0 && $tpmdate) {
-    &debug_date ("  max_date using tpm date", $tpmdate);
-    $olddate = $tpmdate;
-  }
-  &debug_date ("  max_date returning ", $olddate);
-  return $olddate;
-}
-
-sub fixDate {
-  my ($self) = @_;
-  my $newdate = 0;
-  my @binfiles = $self->getFileList("BinFiles");
-  #warn "binfiles=@binfiles";
-  if ($CurrentArch ne "all") {
-    @binfiles = grep { m@/${CurrentArch}/@ } @binfiles;
-    warn "arch-filtered for $CurrentArch binfiles=@binfiles";
-  }
-  $newdate = &max_date($newdate, @binfiles);
-  &debug_date (" newdate after bin: ", $newdate);
-  #
-  $newdate = &max_date($newdate, $self->getFileList("DocFiles"));
-  &debug_date (" newdate after doc: ", $newdate);
-  #
-  $newdate = &max_date($newdate, $self->getFileList("SourceFiles"));
-  &debug_date (" newdate after source: " , $newdate);
-  #
-  $newdate = &max_date($newdate, $self->getFileList("RemoteFiles"));
-  &debug_date (" newdate after remote: " , $newdate);
-  #
-  # Check the RunFiles last, because it includes the tpm itself, and we
-  # only want to use that as a last resort.
-  $rundate = &max_date($newdate, $self->getFileList("RunFiles"));
-  &debug_date (" newdate after run: ", $newdate);
-  $self->setAttribute("Date", &formatdate(gmtime($newdate)));
-}
-
-
-sub fixRequires {
-  my ($self, $test) = @_;
-
-  my %requires = $self->getHash("Requires");
-  if (%requires) {
-    foreach my $k (@TpmCategories) {
-      my @taglist = @{$requires{$k}};
-      my $texmf = $TexmfTreeOfType{$k};
-      my @newtaglist = ( );
-      for my $tag (@taglist) {
-	if (-f "${MasterDir}/${texmf}/tpm/${tag}.tpm") {
-	  push @newtaglist, $tag;
-	}
-	elsif ($test == 0) {
-	  print "Requirement ${MasterDir}/${texmf}/tpm/${tag}.tpm is not found.\n";
-	}
-      }
-#      @{$requires{$k}} = @newtaglist;
-    }
-#    if ($test >= 1) {
-#      $self->setHash("Requires",%requires);
-#    }
-  }
-}
-#
-# This function will print every text node under given nodes
-# and catenate the result.
-#
-sub myToText {
-  my (@nodes) = @_;
-  return
-    join '', ( map { 
-      if ($_->isTextNode) {
-	my $s =$_->toString; chomp($s); $s;
-      } 
-      else {
-	if ($_->hasChildNodes) { 
-	  myToText($_->getChildNodes) . " "; 
-	} 
-	else { 
-	  ''; 
-	} 
-      }
-    } @nodes ) ;
-}
-
-sub trim {
-  my ($str) = @_;
-  $str =~ s/^[\n\s]+//;
-  $str =~ s/[\n\s]+$//;
-  return $str;
-}
-
-#
-# Look into the Catalogue to find any supplementary information
-# Get the license information, version and release numbers
-#
-sub completeUsingCatalogue {
-  my ($self) = @_;
-  my($author, $version, $license, $title, $description);
-
-  my $pkgname = $self->getAttribute("Name");
-  $pkgname =~ s/^(bin-|lib-|tex-)//;
-
-  # handle several cases where the Catalogue name
-  # is not the package name...
-  if (defined($Tpm2Catalogue{$pkgname})) {
-    $pkgcat = $Tpm2Catalogue{$pkgname};
-  } else {
-    $pkgcat = $pkgname;
-  }print STDERR "Looking for $pkgname (as $pkgcat) in the Catalogue.\n" if $Verbose;
-  my $fletter = substr($pkgcat, 0, 1);
-  my $catname = "${CatalogueDir}/entries/$fletter/${pkgcat}.xml"; 
-  return if (! -f $catname);
-#  print "catname = $catname\n";
-  my $parser = new XML::DOM::Parser;
-  my $catdoc = $parser->parsefile($catname);
-
-  my $nodelist = $catdoc->getElementsByTagName("author");
-  $author = '';
-  for (my $i = 0; $i < $nodelist->getLength; $i++) {
-    if ($nodelist->item($i)->getElementsByTagName("name")->item(0)->getFirstChild) {
-      $author .= ($i == 0 ? "" : " and ") . $nodelist->item($i)->getElementsByTagName("name")->item(0)->getFirstChild->toString;
-    }
-  }
-#  print "author = $author \n";
-  $nodelist = $catdoc->getElementsByTagName("version")->item(0);
-  if ($nodelist && $nodelist->getElementsByTagName("number")->item(0)) {
-    $version = $nodelist->getElementsByTagName("number")->item(0)->getFirstChild;
-    if ($version) {
-      $version = $version->toString;
-#      print "version = $version\n";
-    }
-  }
-  my $node = $catdoc->getElementsByTagName("license")->item(0);
-  if ($node) {
-    $license = $node->getAttribute("type");
-  }
-  $node = $catdoc->getElementsByTagName("caption")->item(0);
-  if ($node) {
-    $title = &trim($node->getFirstChild->toString);
- }
- 
-  $node = $catdoc->getElementsByTagName("description")->item(0);
-  if ($node) {
-    my $abstract = $node->getElementsByTagName("abstract")->item(0);
-    $node = $abstract if ($abstract);
-    $description = myToText( $node );
-#    $description = join '', (map { ($_->isTextNode ? $_->toString : '') } $node->getChildNodes);
-    $description = &trim($node->expandEntityRefs($description));
-#    print "description = |$description|\n";
-  }
-  my $old_author = &trim($self->getAttribute("Author"));
-  my $old_version = &trim($self->getAttribute("Version"));
-  my $old_title = &trim($self->getAttribute("Title"));
-  my $old_description = &trim($self->getAttribute("Description"));
-  my $old_license = &trim($self->getAttribute("License"));
-
-  if ($author && $author ne $old_author) {
-    $self->setAttribute("Author", $author);
-    print "Replacing $old_author by $author\n";
-  }
-  if ($version && $version ne $old_version) {
-    $self->setAttribute("Version", $version);
-    print "Replacing $old_version by $version\n";
-  }
-  if ($title && $title ne $old_title) {
-    $self->setAttribute("Title", $title);
-    print "Replacing $old_title by $title\n";
-  }
-  if ($description && ($description ne $old_description)) {
-    $self->setAttribute("Description", $description);
-    print "Replacing $old_description by $description\n";
-  }
-  if ($license && ($license ne $old_license)) {
-    $self->setAttribute("License", $license);
-    print "Replacing $old_license by $license\n";
-  }
-}
-
-sub buildPatternsPackage {
-  my ($self) = @_;
-
-  my $type = $self->getAttribute("Type");
-  return unless $type eq 'Package';
-
-  my $name = $self->getAttribute("Name");
-  my $texmf = $TexmfTreeOfType{$type};
-
-  # set run patterns
-  my @run_patterns = ( );
-  my @doc_patterns = ( );
-  my @source_patterns = ( );
-
-  # 
-  # Usually the package name and the directory name match.
-  # Here are the special cases when they don't.
-  if (&FileUtils::member(${name}, @engines)) {
-    print "special engine patterns for $name\n" if $::opt_debug;
-    # If our $name is one of the engines
-    push @run_patterns, (
-			 $texmf . "/${name}/base/*",
-			 $texmf . "/${name}/data/*",      # for context
-			 $texmf . "/${name}/misc/*",
-			 $texmf . "/${name}/config/*",
-			 $texmf . "/metapost/${name}/*",  # also for context
-			 $texmf . "/tex/${name}/*"
-			);	
-    push @doc_patterns, ( $texmf . "/doc/${name}/base/*" );
-    push @source_patterns, ( $texmf . "/source/${name}/base/*" );
-    # Shouldn't we chose between the previous patterns
-    # and these ones?
-    map {
-      push @run_patterns, $texmf . "/tex/$_/${name}/*";
-      push @doc_patterns, ( $texmf . "/doc/$_/${name}/*" );
-      push @source_patterns, ( $texmf . "/source/$_/${name}/*" );
-    } @formats;
-
-    # Exception for dvips and ttf2pk !
-    if (${name} eq 'dvips' || ${name} eq 'ttf2pk') {
-      push @run_patterns, 
-	( $texmf . "/fonts/map/${name}/base/*", $texmf . "/fonts/map/${name}/config/*",
-	  $texmf . "/fonts/enc/${name}/base/*", $texmf . "/fonts/enc/${name}/config/*" );
-
-    # exception for context doc, since everything belongs to context.tpm.
-    } elsif (${name} eq 'context') {
-      push (@doc_patterns, "$texmf/doc/context/*");
-
-    # Exception for metapost !
-    } elsif (${name} eq 'metapost') {
-      push @run_patterns, $texmf . "/metapost/support/*";
-
-    # Exception for tex4ht, since we just want everything.
-    } elsif (${name} eq 'tex4ht') {
-      push @run_patterns,
-           ("$texmf/tex4ht/bin/*",
-            "$texmf/tex4ht/ht-fonts/*",
-            "$texmf/tex4ht/xttl/*",
-           );
-
-    # Exception for omega !
-    } elsif (${name} eq 'omega') {
-      push @run_patterns, 
-	( $texmf . "/tex/generic/encodings/*",
-	  $texmf . "/tex/generic/omegahyph/*",
-	  $texmf . "/omega/otp/char2uni/*",
-	  $texmf . "/omega/otp/uni2char/*",
-	  $texmf . "/omega/ocp/char2uni/*",
-	  $texmf . "/omega/ocp/uni2char/*" );
-
-    # Exception for vtex -- extra map files.
-    } if (${name} eq 'vtex') {
-      push @run_patterns, $texmf . "/fonts/map/${name}/*";
-
-    }
-
-  # 
-  } elsif (&FileUtils::member(${name}, @formats)) {
-    print "special format patterns for $name\n" if $::opt_debug;
-    # if our $name is one of the formats
-    map {
-      my $e = $_;
-      push @run_patterns, (  $texmf . "/$e/${name}/base/*",
-			     $texmf . "/$e/${name}/config/*",
-			  );
-      push @run_patterns, $texmf . "/$e/${name}/*"
-        unless ($_ eq 'tex' || $_ eq 'omega')
-    } @engines;
-
-    map {
-      push @run_patterns, $texmf . "/tex/$_/${name}/*";
-    } @formats;
-
-    # for xetex
-    push @run_patterns, "$texmf/fonts/misc/$name/*";
-    push @doc_patterns, ( $texmf . "/doc/$name/*" ) if $name eq "xetex";
-
-    push @doc_patterns, ( $texmf . "/doc/${name}/base/*" );
-
-    push @source_patterns, ( $texmf . "/source/${name}/base/*" );
-
-    # exception for texinfo since it has no subdirs.
-    if (${name} eq 'texinfo') {
-      push @run_patterns, $texmf . "/tex/texinfo/*";
-
-    # exception for eplain since it has no subdirs either.
-    } elsif (${name} eq 'eplain') {
-      push @run_patterns, "$texmf/tex/eplain/*";
-      push @doc_patterns, "$texmf/doc/eplain/*";
-      push @source_patterns, "$texmf/source/eplain/*";
-
-    # Exception for fontinst, since it has lots of subdirs, including misc.
-    # cyrfinst is really a separate package, but let's not clean that up now.
-    } elsif (${name} eq 'fontinst') {
-      push @run_patterns, $texmf . "/tex/fontinst/*/*";
-    }
-    
-  # 
-  } elsif (&FileUtils::member(${name}, @vendors)) {
-    print "special vendor patterns for $name\n" if $::opt_debug;
-    push @run_patterns, $texmf . "/dvips/${name}/*";
-    
-    if ($name eq "groff") {
-      # Exception for groff: we do not want subdirectories (e.g.,
-      # times), we only want actual files (psyrgo.tfm).  Let groff/times
-      # end up in times.tpm.
-      map { push @run_patterns, "$texmf/fonts/$_/${name}/*.*"; }
-      @fonttypes;      
-    } else {
-      # Everything but groff:
-      map { push @run_patterns, "$texmf/fonts/$_/${name}/*"; }
-      @fonttypes;
-    }
-
-    map { 
-      my $e = $_;
-      map {
-	push @run_patterns, $texmf . "/$e/$_/${name}/*"
-            # keep fontinst/misc in fontinst:
-          unless ($name eq "misc" && $_ eq "fontinst");
-      } @formats;
-    } @engines;
-    
-    # Exception for lh: also have source/latex/lh.
-    push @source_patterns, ( $texmf . "/source/latex/$name/*" );  # lh
-    
-    # Exception for mathdesign: doc is in doc/latex instead of doc/fonts.
-    push @doc_patterns, ( $texmf . "/doc/latex/$name/*" );  # mathdesign
-
-    # Exception for vntex: doc is in doc/generic instead of doc/fonts.
-    push @doc_patterns, ( $texmf . "/doc/generic/$name/*" );  # vntex
-
-  # 
-  } else {
-    print "normal patterns for $name\n" if $::opt_debug;
-    map {
-      my $e = $_;
-      push @run_patterns, $texmf . "/$e/${name}/*";
-      push @doc_patterns, $texmf . "/doc/$e/${name}/*";
-      push @source_patterns, $texmf . "/source/$e/${name}/*";
-      map {
-	push @run_patterns, $texmf . "/$e/$_/${name}/*"
-	  # keep tex/context/pgf in context.
-	  unless $name eq "pgf" && $_ eq "context" && $e eq "tex";
-      } @formats;
-      #warn "run_patterns after engine $e = @run_patterns\n";
-    } @engines;
-
-    map {
-      push @run_patterns, $texmf . "/tex/$_/${name}/*"
-        # keep tex/context/pgf in context.
-	unless $name eq "pgf" && $_ eq "context";
-      #warn "run_patterns after format $_ = @run_patterns\n";
-
-      push @doc_patterns, $texmf . "/doc/$_/${name}/*";
-      push @source_patterns, $texmf . "/source/$_/${name}/*";
-    } @formats;
-    
-    push @doc_patterns, $texmf . "/doc/${name}/*";
-    push @source_patterns, $texmf . "/source/${name}/*";
-    
-    # Exceptions for fontname and glyphlist: their own odd map files.
-    if ($name eq 'fontname') {
-      push @run_patterns, "$texmf/fonts/map/${name}/*";
-    } elsif ($name eq 'glyphlist') {
-      push @run_patterns, "$texmf/fonts/map/${name}/*";
-    }
-  }
-  
-  #  common to all.
-  map {
-    my $v = $_;
-    map {
-      push @run_patterns, $texmf . "/fonts/$_/$v/${name}/*";
-    } @fonttypes;
-    map {
-      push @run_patterns, $texmf . "/fonts/pk/$_/$v/${name}/*";
-    } @fontmodes;
-  } @vendors;
-  
-  push @run_patterns, $texmf . "/scripts/${name}/*";
-  push @run_patterns, $texmf . "/dvips/${name}/*";
-  
-  my $bibe = (${name} eq 'bibtex' ? 'base' : ${name});
-  push @run_patterns, 
-    ( $texmf . "/bibtex/bib/${bibe}/*",
-      $texmf . "/bibtex/bst/${bibe}/*",
-      $texmf . "/bibtex/csf/${bibe}/*" );
-  
-  push @run_patterns, 
-    ( $texmf . "/fonts/map/dvips/${name}/*", 
-      $texmf . "/fonts/map/dvipdfm/${name}/*", 
-      $texmf . "/fonts/map/pdftex/${name}/*", 
-      $texmf . "/fonts/map/ttf2pk/${name}/*",
-      $texmf . "/fonts/enc/dvips/${name}/*", 
-      $texmf . "/fonts/enc/dvipdfm/${name}/*", 
-      $texmf . "/fonts/enc/pdftex/${name}/*", 
-      $texmf . "/fonts/enc/ttf2pk/${name}/*" );
-  
-  push @run_patterns, "usergrps/$name/*";
-  
-  push @doc_patterns, $texmf . "/doc/fonts/${name}/*";
-  
-  push @run_patterns, $texmf . "/omega/ocp/${name}/*";
-  push @run_patterns, $texmf . "/omega/otp/${name}/*";
-  
-  push @source_patterns, $texmf . "/source/fonts/${name}/*";
-  push @run_patterns, $texmf. "/tpm/$name.tpm";
-  
-  #warn "final run_patterns for $name: @run_patterns\n";
-  $self->setList("RunPatterns", @run_patterns);
-  $self->setList("DocPatterns", @doc_patterns);
-  $self->setList("SourcePatterns", @source_patterns);
-}
-
-
-sub autoPatternsCore {
-  my ($self) = @_;
-
-  return if ($self->getAttribute("Type") ne 'TLCore');
-  my $type = $self->getAttribute("Type");
-  my $name = $self->getAttribute("Name");
-  my $texmf = $TexmfTreeOfType{$type};
-
-}
-
-sub buildPatternsDocumentation {
-  my ($self) = @_;
-
-  return if ($self->getAttribute("Type") ne 'Documentation');
-  my $type = $self->getAttribute("Type");
-  my $name = $self->getAttribute("Name");
-  my $texmf = $TexmfTreeOfType{$type};
-
-  # set run patterns
-  my @run_patterns = ( );
-  my @doc_patterns = ( );
-  my @source_patterns = ( );
-
-  map {
-    push @doc_patterns, $texmf . "/doc/$_/${name}/*";
-    push @source_patterns, $texmf . "/source/$_/${name}/*";
-  } @languages;
-    
-  push @run_patterns, $texmf. "/tpm/$name.tpm";
-
-  $self->setList("RunPatterns", @run_patterns);
-  $self->setList("DocPatterns", @doc_patterns);
-  $self->setList("SourcePatterns", @source_patterns);
-
-}
-
-sub autoPatternsPackage {
-  my ($self) = @_;
-
-  # map { print "$_\n"; } @run_patterns;
-  # map { print "$_\n"; } @doc_patterns;
-  # map { print "$_\n"; } @source_patterns;
-
-  $self->buildPatternsPackage();
-  $self->patternsExpand(1);
-
-  $self->setList("RunPatterns", () );
-  $self->setList("DocPatterns",  () );
-  $self->setList("SourcePatterns", () );
-}
-
-sub autoPatternsDocumentation {
-  my ($self) = @_;
-
-  $self->buildPatternsDocumentation();
-  $self->patternsExpand(1);
-  
-  $self->setList("RunPatterns", () );
-  $self->setList("DocPatterns",  () );
-  $self->setList("SourcePatterns", () );
-}
-
-sub patternsAuto {
-  my ($self) = @_;
-  my $type = $self->getAttribute("Type");
-  if ($type =~ m/tlcore/i) {
-    $self->autoPatternsCore();
-  }  
-  elsif ($type =~ m/package/i) {
-    $self->autoPatternsPackage();
-  }  
-  elsif ($type =~ m/documentation/i) {
-    $self->autoPatternsDocumentation();
-  }
-}
-
-#
-# Get all files, optionnaly only for architecture $arch
-#
-sub getAllFileList {
-  my ($self, $arch) = @_;
-  my @files = ();
-#  print "Getting all file list for " . $self->getAttribute("Name") . "\n";
-  ($arch = $CurrentArch) if (undef $arch);
-
-  push @files, $self->getFileList("BinFiles");
-  push @files, $self->getFileList("RunFiles");
-  push @files, $self->getFileList("DocFiles");
-  push @files, $self->getFileList("SourceFiles");
-  push @files, $self->getFileList("RemoteFiles");
-
-  return @files;
-}
-
-sub fixSize {
-  my ($self, $arch) = @_;
-  my $size = 0;
-  my @files = $self->getList("BinFiles");
-
-  foreach my $f (@files) {
-    $size += ${$f}{"size"};
-  }
-
-  foreach my $tag ("RunFiles", "DocFiles", "SourceFiles", "RemoteFiles") {
-    my %v = $self->getHash("$tag");
-    $size += $v{"size"};
-  }
-  if ($size != $self->getAttribute("Size")) {
-    my $name = $self->getAttribute("Name");
-    my $old_size = $self->getAttribute("Size");
-    print " $name\t size=$size\t old size=$old_size\t diff=" 
-          . ($size - $old_size) . "\n";
-    $self->setAttribute("Size", $size);
-  }
-  return $size;
-}
-
-sub Tpm2Zip {
-  my ($self, $destdir, $full, $standalone) = @_;
-  if (! $destdir) {
-    $destdir = $ZipDir;
-  }
-  my $name = $self->getAttribute("Name");
-  my $type = $self->getAttribute("Type");
-  my $version = $self->getAttribute("Version");
-
-  my @files = (); 
-  if ($full eq "full") {
-    push @files, $self->getRequiredFileList("RunFiles");
-    push @files, $self->getRequiredFileList("DocFiles");
-    push @files, $self->getRequiredFileList("SourceFiles");
-  }
-  else {
-    push @files, $self->getFileList("RunFiles");
-    push @files, $self->getFileList("DocFiles");
-    push @files, $self->getFileList("SourceFiles");
-  }
-
-  my ($zipname, $tpmname, $zipcmd, $nul);
-
-  # Create zip files for all $arch if type = binary
-
-  # First, common files
-  if ($#files >=0) {
-
-#    if ($name =~ m/-static$/) {
-    if ($standalone && &FileUtils::member("$type/$name", @StandAlonePackages)) {
-      # static packages are expected to have more complete names
-      if ($full eq "full") {
-	push @files, $self->getRequiredFileList("BinFiles");
-      } else {
-	push @files, $self->getFileList("BinFiles");
-      }
-      $zipname = "$destdir/../standalone/$name";
-      $zipname .= "-${version}-${CurrentArch}.zip";
-    }
-    else {
-      $tpmname = "$destdir/$type/$name.tpm";
-      $zipname = "$destdir/$type/$name.zip";
-    }
-  if ($^O =~ /MSWin32/) {
-    $nul = "nul";
-  }
-  else {
-    $nul = "/dev/null";
-  }
-    @files = &FileUtils::sort_uniq(@files);
-
-  if ($zipname =~ /\/binary/ && $^O !~ /MSWin32/) {
-    $zipcmd = "| zip -9\@ory "
-  }
-  else {
-    $zipcmd = "| zip -9\@or "
-  }
-
-    &mkpath(&FileUtils::dirname($zipname)) if (! -d &FileUtils::dirname($zipname));
-    my $cwd = &getcwd;
-    chdir($MasterDir);
-    unlink $zipname;
-    print $zipcmd . $zipname . " > $nul\n" if ($::opt_debug);
-    open ZIP, $zipcmd . $zipname . " > $nul";
-    map { 
-      if (! -f $_) {
-	print STDERR "!!!Error: non-existent $_\n";
-      } else {
-	print ZIP "$_\n";
-      }
-    } @files;
-    close ZIP;
-    print "Done $zipname\n" if ($::opt_debug);
-  }
-
-  if (! $standalone) {
-    # Binaries
-    my $DoCurrentArch = ${CurrentArch};
-    foreach my $arch (@{ArchList}) {
-      if (${DoCurrentArch} eq "all" || ${DoCurrentArch} eq ${arch}) {
-	${CurrentArch} = $arch;
-	my @binfiles;
-	if ($full eq "full") {
-	  @binfiles = $self->getRequiredFileList("BinFiles");
-	}
-	else {
-	  @binfiles = $self->getFileList("BinFiles");
-	}
-	$zipname = "$destdir/$type/$name-$arch.zip";
-	
-	if ($#binfiles >=0) {
-	  &mkpath(&FileUtils::dirname($zipname)) if (! -d &FileUtils::dirname($zipname));
-	  my $cwd = &getcwd;
-	  chdir($MasterDir);
-	  unlink $zipname;
-	  print $zipcmd . $zipname . " > $nul\n" if ($::opt_debug);
-	  open ZIP, $zipcmd . $zipname . " > $nul";
-	  map { 
-	    if (! -f $_) {
-	      print STDERR "!!!Error: non-existent $_\n";
-	    } else {
-	      print ZIP "$_\n";
-	    }
-	  } @binfiles;
-	  close ZIP;
-	  print "Done $zipname\n" if ($::opt_debug);
-	}
-      }
-    }
-    ${CurrentArch} = ${DoCurrentArch};
-  }
-
-  # Write the tpm file together with the zip file in the current scheme
-  $self->writeFile($tpmname) if ($tpmname);
-  chdir($cwd);
-
-}
-
-sub Clean {
-  my ($self, $patterns, $fixreq) = @_;
-
-  # Update the Date to the date of the latest file in the package
-  $self->fixDate();
-
-  # Find missing information in the Catalogue if possible
-  $self->completeUsingCatalogue();
-
-  # Compute the overall size
-  $self->fixSize();
-
-  # Fix the tpm file
-  my @run_patterns = $self->getList("RunPatterns");
-
-  # First remove all tpm file present in the package
-  #print "run_patterns before remove_list = @run_patterns\n";
-  &FileUtils::remove_list(\@run_patterns, "\.tpm\$");
-  #print "run_patterns after remove_list = @run_patterns\n";
-
-  # Second, add the right one
-  my $name = $self->getAttribute("Name");
-  my $type = $self->getAttribute("Type");
-  push @run_patterns, ${Tpm::TexmfTreeOfType}{$type} . "/tpm/$name.tpm";
-  $self->setList("RunPatterns", @run_patterns);
-
-  # Fix the Title
-  if (! $self->getAttribute("Title")) {
-    $self->setAttribute("Title", "The " . $self->getAttribute("Name") . " package.");
-  }
-
-  # Big step, get fiels from patterns.
-  if ($patterns eq 'auto') {
-    $self->patternsAuto();
-  } elsif ($patterns eq 'to') {
-    # Update patterns
-    $self->patternsUpdate();
-  } elsif ($patterns eq 'from') {
-    $self->patternsExpand(0);
-  }
-
-  # Fix Requires field
-  $self->fixRequires(undef $fixreq || $fixreq == 0 || $fixreq eq '' ? 0 : 1);
-
-  $self->setList("RunPatterns", &FileUtils::sort_uniq($self->getList("RunPatterns")));
-  $self->setList("DocPatterns", &FileUtils::sort_uniq($self->getList("DocPatterns")));
-  $self->setList("SourcePatterns", &FileUtils::sort_uniq($self->getList("SourcePatterns")));
-
-  # Alternatively you could expand patterns if for example you have just edited them
-  # See the 'process2_tpm' function below
-  # Test that patterns and files list are n sync
-  if ($self->testSync()) {
-    print "Writing $type/$name\n";
-    $self->writeFile();
-  }
-  else {
-    print "ERROR: out of sync between patterns and files in $tpmname (not written).\n";
-  }
-}
-
-
-sub Remove {
-  my ($self, $patterns, $dry) = @_;
-  my @run_patterns = $self->getList("RunPatterns");
-  # First remove all tpm file present in the package
-  # print "run_patterns = @run_patterns\n";
-  &FileUtils::remove_list(\@run_patterns, "\.tpm\$");
-  # print "run_patterns = @run_patterns\n";
-  # Second, add the right one
-  my $name = $self->getAttribute("Name");
-  my $type = $self->getAttribute("Type");
-  push @run_patterns, ${Tpm::TexmfTreeOfType}{$type} . "/tpm/$name.tpm";
-  $self->setList("RunPatterns", @run_patterns);
-  if ($patterns eq 'auto') {
-    $self->patternsAuto();
-  }
-  elsif ($patterns eq 'to') {
-    # Update patterns
-    $self->patternsUpdate();
-  }
-  elsif ($patterns eq 'from') {
-    $self->patternsExpand(0);
-  }
-  $self->setList("RunPatterns", &FileUtils::sort_uniq($self->getList("RunPatterns")));
-  $self->setList("DocPatterns", &FileUtils::sort_uniq($self->getList("DocPatterns")));
-  $self->setList("SourcePatterns", &FileUtils::sort_uniq($self->getList("SourcePatterns")));
-
-  map {
-    my $file = "${MasterDir}/$_";
-    if ($dry) {
-      print "would unlink $file\n";
-    } else {
-      unlink($file) || warn "unlink($file) failed: $!";
-      print "unlinked $file\n";
-    }
-  } $self->getAllFileList();
-}
-
-
-# Log LABEL followed by hash elements, all on one line.
-#
-sub debug_hash
-{
-  my ($label) = shift;
-  my (%hash) = (ref $_[0] && $_[0] =~ /.*HASH.*/) ? %{$_[0]} : @_;
-
-  my $str = "$label: {";
-  my @items = ();
-  for my $key (sort keys %hash) {
-    my $val = $hash{$key};
-    $key =~ s/\n/\\n/g;
-    $val =~ s/\n/\\n/g;
-    push (@items, "$key:$val");
-  }
-  $str .= join (",", @items);
-  $str .= "}";
-
-  print "$str\n";
-}
-
-1;

Deleted: tex-common/trunk/scripts/debianize-updmap
===================================================================
--- tex-common/trunk/scripts/debianize-updmap	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/debianize-updmap	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,582 +0,0 @@
-# This file, debianize-updmap, is meant to be sourced by updmap and
-# enhance the --enable and --disable options with the functionality
-# needed to deal with Debian's generated updmap.cfg.
-# $Id$
-
-# This is the planned scheme how it works
-# 
-# A for disableMap:
-#   1. create a list of files to act on (either in sysconfdir only, or in user dirs too)
-#   2. grep for not-commented lines in these files that contain $map
-#   CHANGE 3. for each of these files, run configReplace appropriately
-#   3. if in syswide-mode, for each of these files, run configReplace appropriately;
-#      if not in syswide mode, for each of these files,
-#             test whether it is in the syswide dir
-#   3.a if not, run configReplace appropriately
-#   3b. if yes, create copy in user dir and run configReplace appropriately
-#
-# B for enableMap:
-#   1. create a list of files to act on (either in sysconfdir only, or in user dirs too)
-#   2. grep for commented lines in these files that contain $map
-#   2.1. if any are found, check whether it is only one
-#   2.1.1 if there is only one, run configReplace on that file appropriately
-#   2.1.2 if there is more than one, the precedence is 
-#         20tetex-extra.cfg > XX*local*.cfg > 10tetex-base.cfg > any
-#	  (extra has maximum priority because 
-#   2.1.2.1 if it's clear on which file to act, run configReplace on that file
-#           appropriately
-#   2.1.2.2 if unclear (i.e. only "any"), exit with an error
-#   2.2 if none are found, act on 10local.cfg (could be made configurable)
-#       - if 10local.cfg does not exist, create it (with an explanatory comment)
-#       - run configReplace on it appropriately
-#
-# C for syncwithtrees (and even more?)
-# ?
-#
-# After that, update-updmap must be run (in the appropriate mode!), and then updmap
-# must reexecute itself.  Since disableMap is called by enableMap, we need a wrapper
-# for it.  An alternative would be to do this just before the creation of the output
-# files, but I think it's easier this way, and currently updmap only enables one Map
-# file per run.
-
-###############################################################################
-# DebianSyswideMode ()
-#   determine whether we are running in syswide mode (or user-specific)
-###############################################################################
-DebianSyswideMode(){
-  test "$(id -u)" -eq 0 && return 0 || return 1
-}
-
-###############################################################################
-# FindDebianUserdir ()
-#   find the directory containing user-specific updmap snippets
-###############################################################################
-FindDebianUserdir(){
-#  verboseMsg "entering FindDebianUserdir"
-
-  texmfconfig=$(kpsewhich --expand-path '$TEXMFCONFIG')
-  OLDIFS="$IFS"
-  IFS=:
-  count=0
-  for d in "$texmfconfig"; do
-    count=$(($count+1))
-    : ${cnfdir:=$d}
-    if [ -d "$d/updmap.d" ]; then
-      defaultuserdir="$d/updmap.d"
-      break
-    fi
-  done
-  IFS="$OLDIFS"
-  # still empty?  Pick one
-  if [ -z "$defaultuserdir" ]; then
-    if [ $count -eq 1 ]; then
-      defaultuserdir="$cnfdir/updmap.d"
-    else
-      echo "TEXMFCONFIG contains more than one directory, and none of them" >&2
-      echo "already contains a updmap.d/ subdirectory." >&2
-      return
-    fi
-  fi
-
-  /usr/share/texmf/web2c/mktexdir $defaultuserdir
-
-  if [ -d $defaultuserdir ]; then
-    echo $defaultuserdir
-  fi
-}
-
-
-###############################################################################
-# createDebianConffilelist
-#   create a list of configuration files containing updmap snippets;
-#   we are going to act on these
-###############################################################################
-createDebianConffilelist(){
-#  verboseMsg "entering createDebianConffilelist"
-
-  userFiles=""
-  local DebianConffilelist=""
-  syswideFiles=`find /etc/texmf/updmap.d -maxdepth 1 -type f -name '*.cfg'`
-  if ! DebianSyswideMode; then
-    debianuserdir=`FindDebianUserdir`
-    if [ -n "$debianuserdir" ]; then
-      userFiles=`find "$debianuserdir" -maxdepth 1 -type f -name '*.cfg'`
-    fi
-  fi
-  if [ -n "$userFiles" ]; then
-    for sysfile in $syswideFiles; do
-      for userfile in $userFiles; do
-	if [ ! "`basename $userfile`" = "`basename $sysfile`" ]; then
-	  DebianConffilelist="$DebianConffilelist $sysfile"
-	fi
-      done
-    done
-    DebianConffilelist="$DebianConffilelist $userFiles"
-  else
-    DebianConffilelist="$syswideFiles"
-  fi
-  echo $DebianConffilelist
-}
-
-###############################################################################
-# runUpdate
-#   run update-updmap
-###############################################################################
-runUpdate(){
-  updOptions=""
-  if [ -n "$cfgparam" ]; then
-    # --conffile option was given on the command line
-      updOptions="--output-file $orig"
-  fi
-  # here we could check for an alternative user dir, or output file
-  # but as long as FindDebianUserdir only reports the default location, 
-  # it doesn't make sense
-
-  verboseMsg "Running update-updmap to merge the changed files"
-  update-updmap --quiet $updOptions
-}
-###############################################################################
-# cleanupNoExit()
-#   clean up the temp area, but don't exit
-###############################################################################
-cleanupNoExit()
-{
-  rc=$?
-  $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \
-    && { cd / && rm -rf "$tmpdir"; }
-}
-
-###############################################################################
-# reExecSelf
-#   execute ourselves again - the confile has changed after an enable or disable
-#   command has been processed
-###############################################################################
-reExecSelf(){
-  # remove the temporary directory
-  cleanupNoExit
-  
-  # if we need not remake map files, we are done here
-  if [ "$mkmapEnabled" = "false" ]; then exit 0; fi
-
-  # pass ourselves the right options.  
-  repeatOptions=""
-  for option in dvipsoutputdir pdftexoutputdir dvipdfmoutputdir; do
-    # strange that I can't do the same with eval test -n
-    if eval [ ! -z  "\$$option" ]; then
-      repeatOptions="$repeatOptions `eval echo --$option \\$$option`"
-    fi
-  done
-  if [ -n "$cfgparam" ]; then
-    # --conffile option was given on the command line
-    repeatOptions="$repeatOptions --cnffile=$orig"
-  fi
-  if [ "texhashEnabled" = "false" ]; then
-    repeatOptions="$repeatOptions --nohash"
-  fi
-  if [ "$verbose" = "false" ]; then
-    repeatOptions="$repeatOptions --quiet"
-  fi
-  
-  verboseMsg "Now running $progname again to generate output files"
-  echo $progname $repeatOptions
-  exec $progname $repeatOptions
-}
-
-###############################################################################
-# grepType (map,file)
-#   grep in file for entry map, and return the mapType
-###############################################################################
-grepType()
-{
-  map=$1
-  file="$2"
-
-  if egrep -q "^(MixedMap|Map)[ 	]*$map( |	|$)" "$file" ; then
-    egrep "^(MixedMap|Map)[ 	]*$map( |	|$)" "$file" | awk '{print $1}' | sort | uniq
-  else
-    return 1
-  fi
-}
-
-
-###############################################################################
-# findUserfiles (filelist)
-#   pick user-specific files out of a filelist of configuration files
-###############################################################################
-findUserfiles(){
-  userfiles=""
-  while [ $# -gt 0 ]; do
-    file="$1"
-    if [ "$file" = "${file#/etc/texmf/updmap.d}" ]; then
-      # doesn't start with /etc/texmf/updmap.d: must be user-specific
-      userfiles="$userfiles $file"
-    fi
-    shift;
-  done
-  echo $userfiles
-}
-
-###############################################################################
-# snippetFileIsWritable (debCnfFile)
-#   checks whether we are (supposed to be) able to write to a file
-###############################################################################
-snippetFileIsWritable(){
-  local file=$1
-
-  if DebianSyswideMode; then
-    return 0
-  else
-    # /etc/texmf/updmap.d shouldn't be hardcoded
-    if [ "${file#/etc/texmf}" = "${file}" ]; then
-      # file is not in systemwide dir
-      return 0
-    else
-      return 1
-    fi
-  fi
-}
-
-###############################################################################
-# makeUserCopy (filename)
-#   create a copy in the user dir
-###############################################################################
-makeUserCopy(){
-  local debCnfFile="$1"
-
-  # create a copy of that file in the user dir
-  debianuserdir=`FindDebianUserdir`
-  if [ -z "$debianuserdir" ]; then
-    echo "I don't know how to proceed here, stopping." >&2
-    exit 1
-  fi
-  newdebCnfFile="$debianuserdir/`basename $debCnfFile`"
-  verboseMsg "Not allowed to handle $map in $debCnfFile."
-  verboseMsg "Creating copy in $debianuserdir instead."
-  cp $debCnfFile $newdebCnfFile
-  echo "$newdebCnfFile"
-}
-
-###############################################################################
-# findRightMatchfile (mapname,filelist)
-#   find the right file from filelist to enable mapname 
-###############################################################################
-findRightMatchfile(){
-  mapName=$1; shift
-  matchfiles="$@"
-  local debCnfFile=""
-
-  if [ $# -eq 1 ]; then
-    # it is only one, enable map in it.  May we write it?
-    debCnfFile=$matchfiles
-    if ! snippetFileIsWritable $debCnfFile; then
-      debCnfFile=`makeUserCopy $debCnfFile`
-    fi
-    echo $debCnfFile
-    verboseMsg "Enabling map file in $debCnfFile."
-    return 0
-  else
-    # there are more than one; 
-    if ! DebianSyswideMode; then
-      # can only change files in the user's dir
-      usermatchfiles=`findUserfiles $matchfiles`
-      if [ `(set $usermatchfiles; echo $#)` -eq 1 ]; then
-        # exactly one of them is a user-specific file
-	echo $usermatchfiles
-	verboseMsg "Enabling map file in user-specific file $usermatchfiles."
-	return 0
-      else
-        # two files in the user directory (as bad as two in the site-wide
-        # dir), or no user-specific files.  If there are two user-specific
-	# files, report about them:
-	test -n "$usermatchfiles" && matchfiles="$usermatchfiles" || true
-      fi
-    fi
-    # for now, we exit with an error.  Any sensible choice would have to 
-    # check whether teTeX or texlive is installed, and I want to save me
-    # that hazzle.
-    cat >&2 <<EOF
-Entries for map file $mapName found in several files:
-$matchfiles
-
-Since updmap.cfg is a generated file in Debian, I don't know how to proceed.
-Please refer to the manpage of update-updmap(1)
-
-EOF
-  fi
-}
-
-###############################################################################
-# pickLocalFile (mapname,directory)
-#   pick the right local file in directory
-###############################################################################
-pickLocalFile(){
-  mapName=$1
-  debDirname=$2
-  debDirname=${debDirname%/}
-  # Is there a file with "local" in the name?
-  localfile=""
-  localfile="`ls $debDirname/*local*cfg 2>/dev/null`"
-  if [ -n "$localfile" ]; then
-    # there is at least one
-    if [ `(set $localfile; echo $#)` -eq 1 ]; then
-      # exactly one
-      verboseMsg "Using local configuration file $localfile"
-      echo $localfile
-      return 0
-    else
-      # more than one local file? Brrrr.
-      cat >&2 <<EOF
-While trying to enable $mapName locally, I found several user-specific map files:
-$localfile
-
-I don't know how to proceed here. Please refer to the manpage of update-upmdap(1)
-
-EOF
-    fi
-  else
-    # no user config file yet
-    echo $debDirname/10local.cfg
-    return 0
-  fi
-}
-
-###############################################################################
-# findRightLocalfile (mapname)
-#   find the right file to enable mapname, site-wide or user-specific
-###############################################################################
-findRightLocalfile(){
-  mapName=$1
-  # Do we know about a user-specific directory?
-  if DebianSyswideMode; then
-    DebCnfFile=`pickLocalFile $mapName /etc/texmf/updmap.d`
-  else
-    debianuserdir=`FindDebianUserdir`
-    if [ -z "$debianuserdir" ]; then
-      echo "I don't know how to proceed here, stopping." >&2
-      exit 1
-    fi
-    test -w $debianuserdir || (
-      echo "Target directory $debianuserdir not writable."
-      echo "Exiting"
-      exit 1
-    )
-    DebCnfFile=`pickLocalFile $mapName $debianuserdir`
-  fi
-  # configReplace will try to grep in the file: touch it to prevent a error message
-  touch $DebCnfFile
-  verboseMsg "Using local configuration file $DebCnfFile"
-  echo $DebCnfFile
-}
-
-###############################################################################
-# disableMapInner (map)
-#   disables map in config file (any type) (real command)
-###############################################################################
-disableMapInner()
-{
-#  verboseMsg "entering disableMapInner"
-  map=$1
-  local debCnfFile
-
-  noverbose="$2"
-  oldverbose="$verbose"
-  if [ -n "$noverbose" ]; then
-    # don't confuse users with disable messages when they called --enable
-#     verboseMsg "disabling verbosity"
-    verbose=false
-  fi
-
-  local mapType
-
-  if [ -z "$DebianConffilelist" ]; then
-    DebianConffilelist=`createDebianConffilelist`
-  fi
-
-  # create list of all files that contain an entry
-  for debCnfFile in $DebianConffilelist; do
-    if mapType=`grepType $map "$debCnfFile"`; then
-      if ! snippetFileIsWritable $debCnfFile; then
-	debCnfFile=`makeUserCopy $debCnfFile`
-      fi
-      # although it's a bug, there might be two types enabled - we disable both
-      for type in $mapType; do
-	verboseMsg "Disabling $map in $debCnfFile."
-	configReplace "$debCnfFile" "^$type[[:space:]]*$1" "#! $type $1"
-      done
-    fi
-  done
-  
-  verbose="$oldverbose"
-}
-
-###############################################################################
-# disableMap (map)
-#   disables map in config file (any type) (Debian wrapper)
-###############################################################################
-disableMap()
-{
-  disableMapInner $1
-  runUpdate
-  reExecSelf
-}
-###############################################################################
-# enableMap (type, map)
-#   enables an entry in the config file for map with a given type.
-###############################################################################
-enableMap()
-{
-  mapType=$1
-  mapName=$2
-  local debCnfFile=""
-  case $1 in
-    Map|MixedMap)
-      ;;
-    *)
-      abort "invalid mapType $mapType"
-      ;;
-  esac
-
-  if [ -z "$DebianConffilelist" ]; then
-    DebianConffilelist=`createDebianConffilelist`
-  fi
-
-  # a map can only have one type, so we carefully disable everything
-  # about map here:
-  disableMapInner "$mapName" noverbose
-
-  # now enable with the right type.
-  # But we have to determine where to enable.
-  # is there already a file that contains a (commented) entry?
-  matchfiles=""
-  for file in $DebianConffilelist; do
-    if egrep "^#![[:blank:]]*(MixedMap|Map)[[:blank:]]*$map([[:blank:]]|$)" "$file" >/dev/null ; then
-      matchfiles="$matchfiles $file"
-    fi
-  done
-  if [ -n "$matchfiles" ]; then
-    # there is already (at least) one file that has a commented entry for our map
-    debCnfFile=`findRightMatchfile $mapName $matchfiles`
-    test -w "$debCnfFile" || debCnfFile=""
-  fi
-  if [ -z "$debCnfFile" ]; then
-    # still none, there is no (commented) entry in any writable file yet. 
-    debCnfFile=`findRightLocalfile $mapName`
-    test -n "$debCnfFile" || abort "Cannot proceed. Exiting"
-    verboseMsg "Creating new entry for map file $mapName in $debCnfFile"
-  fi
-
-  configReplace "$debCnfFile" "^#![ 	]*$mapType[ 	]*$mapName" "$mapType $mapName"
-  runUpdate
-  reExecSelf
-}
-
-###############################################################################
-# setOption (option, value)
-#   sets option to value in the config file (replacing the existing setting
-#   or by adding a new line to the config file).
-###############################################################################
-setOption()
-{
-  opt=$1
-  val=$2
-  case "$opt" in
-    LW35)
-      case "$val" in
-        URWkb|URW|ADOBE|ADOBEkb)
-          ;;
-        *)
-          abort "invalid value $val for option $opt"
-          ;;
-      esac
-      ;;
-    dvipsPreferOutline|dvipsDownloadBase35|pdftexDownloadBase14|dvipdfmDownloadBase14)
-      case "$val" in
-        true|false)
-          ;;
-        *)
-          abort "invalid value $val for option $opt"
-      esac
-      ;;
-    *)
-      abort "unsupported option $opt"
-      ;;
-  esac
-
-  DebNullCnfFile=""
-  DebianSyswideMode || debianuserdir=`FindDebianUserdir`
-  if (! DebianSyswideMode) && [ -f "$debianuserdir/00updmap.cfg" ]; then
-    DebNullCnfFile=$debianuserdir/00updmap.cfg
-  else
-    DebNullCnfFile=/etc/texmf/updmap.d/00updmap.cfg
-  fi
-
-  configReplace "$DebNullCnfFile" "^$opt[ 	]" "$opt $val"
-  runUpdate
-  reExecSelf
-}
-
-###############################################################################
-# syncWithTreesInner()
-#   update the config file: uncomment all lines which refer to map files that
-#   are unavailabe in the texmf trees
-###############################################################################
-syncWithTreesInner()
-{
-  for i in `egrep '^(Mixed)?Map' "$cnfFile" | sed 's at .* @@'`; do
-    kpsewhich --format=map "$i" >/dev/null || echo "$i"
-  done > $tmp1
-  {
-    sed 's@/@\\/@g; s@^@/^MixedMap[ 	]*@; s@$@$/s/^/#! /@' <$tmp1
-    sed 's@/@\\/@g; s@^@/^Map[ 	]*@; s@$@$/s/^/#! /@' <$tmp1
-  } > $tmp2
-  sed -f $tmp2 "$cnfFile" > $tmp3 && cat $tmp3 > "$cnfFile"
-}
-
-
-
-###############################################################################
-# syncWithTrees()
-#   Print a big fat warning.
-###############################################################################
-syncWithTrees(){
-  echo "Warning!"
-  echo ""
-  echo "In Debian, updmap.cfg, the font configuration file, is a generated file."
-  echo "Therefore, using --syncwithtrees will not work, since changes will be"
-  echo "overwritten."
-  echo ""
-  echo "If you know what you are doing, you can proceed, e.g. in order to compare"
-  echo "the synchronized file with the old generated one."
-  echo ""
-  echo "If you do want to proceed, type 'Yes, I know what I am doing!'."
-  echo "Otherwise, press Enter to abort."
-
-  read line
-  if [ "$line" = "Yes, I know what I am doing!" ]; then
-    syncWithTreesInner
-  else
-    echo ""
-    echo "Exiting."
-    exit 1
-  fi
-}
-
-###############################################################################
-# debianEditWarnAndShow()
-#   warn that this won't work
-###############################################################################
-debianEditWarnAndShow(){
-  echo "Warning!"
-  echo ""
-  echo "In Debian, updmap.cfg, the font configuration file, is a generated file."
-  echo "The actual configuration files are in /etc/texmf/updmap.d."
-  echo "Please read the update-updmap(1) manpage and edit those files."
-  echo ""
-  echo "Instead of editing, you will now be shown updmap.cfg in a pager."
-  echo ""
-  echo "Press enter to continue."
-  read dummy
-  
-  sensible-pager $cnfFile
-
-}

Modified: tex-common/trunk/scripts/dh_installtex
===================================================================
--- tex-common/trunk/scripts/dh_installtex	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/dh_installtex	2012-03-24 07:13:14 UTC (rev 5285)
@@ -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, 2009, 2010, 2011 Norbert Preining
+# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Norbert Preining
 # Copyright (C) 2006, 2007 Frank Küster
 #
 # This program is free software; you can redistribute it and/or modify
@@ -37,6 +37,7 @@
 [B<--flavor=>I<flavor>[,I<flavor>]]
 [B<map=MixedMap,>I<file.map>]
 [B<map=Map,>I<file.map>]
+[B<map=KanjiMap,>I<file.map>]
 [B<mapfile=>I<file.cfg>[=I<n>]]
 [B<hyphen=>I<lang>,I<file>[,lhm=I<n>][,rhm=I<n>][,synonym=I<syn>,...]]
 [B<hyphenfile=>I<file.cnf>[=I<n>]]
@@ -83,8 +84,8 @@
 
         dh_installtex mapfile=foo.cfg formatfile=debian/bar.cnf=42
 
-would install foo.cfg as /etc/texmf/updmap.d/20foo.cfg, and debian/bar.cnf
-as /etc/texmf/fmt.d/42bar.cnf.
+would install foo.cfg as /var/lib/tex-common/fontmap-cfg/texmf/foo.cfg, 
+and debian/bar.cnf as /etc/texmf/fmt.d/42bar.cnf.
 
 
 2) B<Directly on the cmd line:>
@@ -93,15 +94,15 @@
 
 Example:
 
-        dh_installtex map=Map,foo.map hyphen=french,loadhyph-fr.tex,lhm=2,rhm=3,synonym=patois,synonym=francais
+        dh_installtex map=Map,foo.map hyphen=ngerman-x-2011-07-01,dehyphn-x-2011-07-01.tex,hyph-de-1996.pat.txt,lhm=2,rhm=2,synonym=ngerman-x-latest,exceptions=hyph-de-1996.hyp.txt
 
-would install a file /etc/texmf/updmap.d/20package.cfg containing the line
+would install a file /var/lib/tex-common/fontmap-cfg/texmf/package.cfg containing the line
 
         Map foo.map
 
 and a file /etc/texmf/hyphen.d/20package.cnf containing the lines
 
-	name=french file=loadhyphen-fr.tex lefthyphenmin=2 righthyphenmin=3 synonyms=patois,francais
+    name=ngerman-x-2011-07-01 file=dehyphn-x-2011-07-01.tex file_patterns=hyph-de-1996.pat.txt lefthyphenmin=2 righthyphenmin=2 synonym=ngerman-x-latest file_exceptions=hyph-de-1996.hyp.txt
 
 3) B<Package files:>
 You create a file debian/package.maps or debian/maps,
@@ -117,8 +118,8 @@
 
         dh_installtex
 
-would install a present debian/package.maps file as
-/etc/texmf/updmap.d/20package.cfg.
+would install a present debian/package.formats file as
+/etc/texmf/fmt.d/20package.cnf.
 
 
 =head2 Mixing the different variants
@@ -157,13 +158,18 @@
 
 =item B<--flavor=>I<flavor>[,I<flavor>]
 
-This option will be used to switch additional options on. The argument
+This option is used to select a different tree then the default
+/usr/share/texmf, and to switch on additional options. The argument
 specify a list from flavors to be selected.
 At the moment you can select from the following list of flavors:
+B<tree:texlive>,
 B<map:config_for_active_maps>, B<map:config_for_all_maps>, 
 B<format:build_all>, B<format:add_one:I<formatname>>, and
 B<lsr:full>.
 
+B<tree:texlive> will select the tree /usr/share/texlive/texmf-dist and
+should only be used for files installed into this tree.
+
 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
 three methods described above. These files are installed in
@@ -197,7 +203,8 @@
 message, even if this option is not given.
 
 B<lsr:full>: Recreate the lsr database not only for the standard trees,
-but also the distribution tree C</usr/share/texmf-texlive>.
+but also the distribution tree C</usr/share/texlive/texmf> and
+C</usr/share/texlive/texmf-dist>.
 
 =back
 
@@ -229,6 +236,7 @@
 my @addbuildformats = (); # additional formats to be build
 my $priority=20;	# priority with which files are installed
 my $doformatlinks = 1;
+my $texmftree = "texmf";
 my %cmdlineargs;
 my %cmdlinefiles;
 my %cmdlinefilespriority;
@@ -310,7 +318,7 @@
 sub extract_map {
 	my ($line,$mapdoconfig) = @_;
 	if ($mapdoconfig == 0) { return ""; }
-	if ($line =~ m/^[[:space:]]*([#[:space:]]*)[[:space:]]*(Mixed)?Map[[:space:]]*(.*\.map)[[:space:]]*(#.*)?$/) {
+	if ($line =~ m/^[[:space:]]*([#[:space:]]*)[[:space:]]*(Mixed|Kanji)?Map[[:space:]]*(.*\.map)[[:space:]]*(#.*)?$/) {
 		my $comment = $1;
 		my $map = $3;
 		if (($comment eq "") || ($mapdoconfig == 2)) {
@@ -326,7 +334,7 @@
 sub build_line {
 	my ($type,$line) = @_;
 	if ($type eq "map") {
-		if ($line =~ m/^(Map|MixedMap),(.*)$/) {
+		if ($line =~ m/^(Map|MixedMap|KanjiMap),(.*)$/) {
 			return("$1 $2");
 		} else {
 			error("$line is neither of the form Map filename.map, nor MixedMap filename.map.");
@@ -336,11 +344,12 @@
 		my $ret = "$format\t$engine\t$pat\t" . join(",", at rest);
 		return($ret);
 	} elsif ($type eq "hyphen") {
-		my ($lang,$pat, at rest) = split(",",$line);
-		my $ret="name=$lang file=$pat";
+		my ($lang,$loader,$pat, at rest) = split(",",$line);
+		my $ret="name=$lang file=$loader file_patterns=$pat";
 		my @synonyms = ();
 		my $lhm;
 		my $rhm;
+		my $exceptions;
 		foreach (@rest) {
 			my ($a,$b) = split("=", $_, 2);
 			if ($a eq "lhm") {
@@ -349,12 +358,15 @@
 				$rhm = $b;
 			} elsif ($a eq "synonym") {
 				push @synonyms, $b;
+			} elsif ($a eq "exceptions") {
+				$exceptions = $b;
 			} else {
 				error("$line is not well formed.");
 			}
 		}
 		$ret .= " lefthyphenmin=$lhm" if defined($lhm);
 		$ret .= " righthyphenmin=$rhm" if defined($rhm);
+		$ret .= " file_exceptions=$exceptions" if defined($exceptions);
 		if ($#synonyms >= 0) {
 			$ret .= " synonyms=" . join(",", at synonyms);
 		}
@@ -419,6 +431,8 @@
 			$doformatlinks = 0;
 		} elsif ($fl eq "lsr:full") {
 			$dofulllsr = 1;
+		} elsif ($fl eq "tree:texlive") {
+			$texmftree = "texlive";
 		} else {
 			error("Specified flavor $fl not supported.\nPlease see man page for supported flavors!\n");
 		}
@@ -483,8 +497,12 @@
 			error("This call would create multiple copies of $priority$package.$configfileext{$_}.\nPlease read the man page on how this should be fixed!\n");
 		}
 
-		if ( ! $dh{ONLYSCRIPTS} && ! -d "$tmp/etc/texmf/$configdir{$type}/") {
-			doit("install","-d","$tmp/etc/texmf/$configdir{$type}/");
+		my $targetdir = "$tmp/etc/texmf/$configdir{$type}";
+		if ($type eq "map") {
+			$targetdir = "$tmp/var/lib/tex-common/$managedir{$type}/$texmftree";
+		}
+		if ( ! $dh{ONLYSCRIPTS} && ! -d $targetdir) {
+			doit("install", "-d", $targetdir);
 		};
 		#
 		# the cmd line cfg files
@@ -492,14 +510,18 @@
 		foreach (@cmdlineconfigfiles) {
 			$bn=basename($_);
 			$pr=$cmdlinefilespriority{$type}{$_};
-			$dofilen = "$tmp/etc/texmf/$configdir{$type}/$pr$bn";
+			if ($type eq "map") {
+				$dofilen = "$targetdir/$bn";
+			} else {
+				$dofilen = "$targetdir/$pr$bn";
+			}
 			WRITECMDLINECFGFILE: do {
 				-r $dofilen &&
 					error("The config file $dofilen already exists! Cannot recreate it, please call dh_clean -k!");
 				open(CFGFILE, ">$dofilen") ||
 					error("Cannot open $dofilen for writing!");
 				verbose_print("Writing $dofilen");
-				if (!magic_comment_present($_)) {
+				if (($type ne "map") && !magic_comment_present($_)) {
 					print CFGFILE "$commentchar{$type} $pr$bn\n";
 					foreach $i (@magicheader) {
 						print CFGFILE "$commentchar{$type} $i\n";
@@ -521,15 +543,18 @@
 		# merge in the cmd line arguments
 		#
 		if ( ! $dh{ONLYSCRIPTS} && ( $pkgprovidedfile || ($#cmdlinearguments >= 0) )) {
-			$dofilen = "$tmp/etc/texmf/$configdir{$type}/$priority$package.$configfileext{$type}";
+			my $basefile = "$priority$package.$configfileext{$type}";
+			$basefile = "$package.$configfileext{$type}" if ($type eq "map");
+			$dofilen = "$targetdir/$basefile";
 			-r $dofilen && 
 				error("The config file $dofilen already exists! Cannot recreate it, please call dh_clean -k!");
 			open(CFGFILE, ">$dofilen") || 
 				error("Cannot open $dofilen for writing!");
 			verbose_print("Writing $dofilen");
-			if (($pkgprovidedfile && !magic_comment_present($pkgfilename)) ||
+			if (($pkgprovidedfile && ($type ne "map") && 
+				 !magic_comment_present($pkgfilename)) ||
 				(!$pkgprovidedfile && ($#cmdlinearguments >= 0))) {
-				print CFGFILE "$commentchar{$type} $priority$package.$configfileext{$type}\n";
+				print CFGFILE "$commentchar{$type} $basefile\n";
 				foreach (@magicheader) {
 					print CFGFILE "$commentchar{$type} $_\n";
 				}
@@ -562,7 +587,7 @@
 				@fmtconffiles = @listlines;
 			}
 			close(LISTFILE);
-		}  unless ($dh{ONLYSCRIPTS});
+		}  unless (($type eq "map") || $dh{ONLYSCRIPTS});
 	}
 	
 	my @mapdata = ();
@@ -643,7 +668,7 @@
 
 	# for trigger support
 	addsubstvar($package, "misc:Depends", "dpkg", ">= 1.14.18");
-	addsubstvar($package, "misc:Depends", "tex-common", ">= 2.00");
+	addsubstvar($package, "misc:Depends", "tex-common", ">= 3");
 }
 
 =head1 SEE ALSO
@@ -663,4 +688,4 @@
 ### tab-width: 4
 ### indent-tabs-mode: t
 ### End:
-# vim:set tabstop=4 fileencoding=utf-8: #
+# vim:set tabstop=4 autoindent fileencoding=utf-8: #

Deleted: tex-common/trunk/scripts/language.dat.header
===================================================================
--- tex-common/trunk/scripts/language.dat.header	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/language.dat.header	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,29 +0,0 @@
-% header of the configuration file for language.dat
-%
-% In Debian, language.dat is a file that is generated from
-% configuration files in /etc/texmf/hyphen.d/.  
-%
-% The text of the comments is Copyright 1998, 1999 by Thomas Esser, it
-% is in the Public domain.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%  To make it possible for package scripts to parse this file, 
-%%  please use only "%! " to comment out hyphenation patterns!
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% CAUTION: the first language will be the default if no style-file
-%          (e.g. german.sty) is used.
-% Since version 3.0 of TeX, hyphenation patterns for multiple languages are
-% possible. Unless you know what you are doing, please let the american
-% english patterns be the first ones. The babel system allows you to
-% easily change the active language for your texts. For more information,
-% have a look to the documentation in texmf/doc/generic/babel.
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% The hyphenation pattern files are in the directory:
-%       texmf/tex/generic/hyphen
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-

Deleted: tex-common/trunk/scripts/language.def.header
===================================================================
--- tex-common/trunk/scripts/language.def.header	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/language.def.header	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,25 +0,0 @@
-%% e-TeX V2.0;2
-
-% Note: the first line of this file must match the corresponding line
-% in "etex.src" and "etexdefs.lib", otherwise fallback will be used.
-
-% This is the header for "language.def", e-TeX's language definition file.
-% $Id: language.us.def 9250 2008-07-04 21:15:23Z karl $
-
-% header of the configuration file for language.dat
-%
-% In Debian, language.dat is a file that is generated from
-% configuration files in /etc/texmf/hyphen.d/.  
-
-% It is explicitly permitted to augment this file by adding additional
-% \addlanguage ... commands AFTER the first (\addlanguage {USenglish})
-% which must remain as the first language added to ensure total document
-% portability for pre-\language documents.  The last line of the file
-% MUST be left as \uselanguage {USenglish} for the sane reason.
-
-% Additional languages, patterns, exceptions and left- and right-hyphen
-% minima may be added here, and an example is given for German.
-
-% The five parameters for \addlanguage are:
-% language, patterns file, exceptions file, left- and right-hyphen minima
-

Modified: tex-common/trunk/scripts/postinst-tex
===================================================================
--- tex-common/trunk/scripts/postinst-tex	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/postinst-tex	2012-03-24 07:13:14 UTC (rev 5285)
@@ -15,7 +15,7 @@
 #
 
 TEXMFTREES="/usr/share/texmf /var/lib/texmf"
-FULLTEXMFTREES="$TEXMFTREES /usr/share/texmf-texlive"
+FULLTEXMFTREES="$TEXMFTREES /usr/share/texlive/texmf /usr/share/texlive/texmf-dist"
 
 # Tell if kpsewhich works. If this is the case:
 #
@@ -138,7 +138,11 @@
                 fi
                 if [ "$i" = format ] ; then
                     for fmt in #FORMATSFILES# ; do
-                        dhit_build_format --all --cnffile "/etc/texmf/fmt.d/$fmt.cnf"
+                        if [ -r "/etc/texmf/fmt.d/$fmt.cnf" ] ; then
+                            dhit_build_format --all --cnffile "/etc/texmf/fmt.d/$fmt.cnf"
+                        else
+                            echo "config file /etc/texmf/fmt.d/$fmt.cnf not available"
+                        fi
                     done
                 fi
                 if [ "$i" = hyphen ] ; then
@@ -148,10 +152,6 @@
         fi
     ;;
 
-    *)
-        echo "postinst called with unknown argument '$1'" >&2
-        exit 1
-    ;;
 esac
 
 # Let vim know that we don't want tabs

Modified: tex-common/trunk/scripts/postrm-tex
===================================================================
--- tex-common/trunk/scripts/postrm-tex	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/postrm-tex	2012-03-24 07:13:14 UTC (rev 5285)
@@ -93,10 +93,6 @@
     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

Deleted: tex-common/trunk/scripts/tpm2licenses
===================================================================
--- tex-common/trunk/scripts/tpm2licenses	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/tpm2licenses	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,459 +0,0 @@
-#!/usr/bin/perl -w
-#
-# tpm2licenses.pl
-# (c) 2005-2006 Norbert Preining
-# (c) 2006 Frank Küster
-#
-# Lists for every filename.tpm the license as specified in the catalogue
-#
-# usage:
-# perl tpm2licenses.pl <options> [tpm file]
-# where <options> =
-# 	--catalogue
-#       --nocheckcatalogue
-#       --tpmdir
-#       --package
-#       --listallfiles
-#       --nocoverage
-#       --nosourcefiles
-# optional tpm file: check only that one
-#
-
-BEGIN {   # get our other local perl modules.
-  ($mydir = $0) =~ s,/[^/]*$,,;
-  if ($mydir eq $0) { $mydir = `pwd` ; chomp($mydir); }
-  if (!($mydir =~ m,/.*,,)) { $mmydir = `pwd`; chomp($mmydir); $mydir = "$mmydir/$mydir" ; }
-  unshift (@INC, $mydir);
-#  unshift (@INC, "$mydir/..");
-}
-
-use strict;
-use Data::Dumper;
-#use Getopt::Long;
-use File::Basename;
-use File::Copy;
-use File::Path;
-use File::Temp qw/ tempfile tempdir /;
-use AppConfig;
-#use XML::DOM;
-use Cwd;
-#use FileUtils qw(canon_dir cleandir make_link newpath member
-#		 normalize substitute_var_val dirname diff_list remove_list
-#		 rec_rmdir sync_dir walk_dir start_redirection stop_redirection);
-#use Tpm;
-
-
-# initialize AppConfig
-my $config = AppConfig->new("catalogue=s", "nocheckcatalogue", "tpmdir=s", "package=s", "what=s", "listallfiles", "texmfPath=s", "nocoverage", "nosourcefiles");
-
-# parse configurationfile, if present
-my @cfgDirs = (".","./debian","..","~");
-my $cfgName = ".tpm2license.cfg";
-
-for my $cfgDir (@cfgDirs) {
-    if ( -r "$cfgDir/$cfgName" ) {
-	print STDERR "Using configuration file $cfgDir/$cfgName\n";
-	$config->file("$cfgDir/$cfgName");
-      };
-  };
-# now parse commandline
-$config->getopt();
-
-# assign conffile, commandline or default values:
-my $Catalogue = $config->catalogue() ? $config->catalogue() : "/src/TeX/texcatalogue/" ;
-my $what = $config->what() ? $config->what() : "files";
-my $debian_package = $config->package() ? $config->package() : "tetex-base";
-my $tpmdir = $config->tpmdir() ? $config->tpmdir() : "./debian/tpm";
-my $nocatalogue = $config->nocheckcatalogue() ? $config->nocheckcatalogue() : '';
-my $listallfiles = $config->listallfiles() ? 1 : 0;
-my $texmfPathString = $config->texmfPath() ? $config->texmfPath() : ".";
-my @texmfPath = split ' ', $texmfPathString;
-my $nocoverage = $config->nocoverage() ? $config->nocoverage() : '';
-my $nosourcefiles = $config->nosourcefiles() ? 1 : 0;
-
-if ($debian_package) {
-  die "Unknown Debian package: $debian_package." unless
-      ( $debian_package =~ /^tetex-base$/    || 
-	$debian_package =~ /^tetex-src$/     ||
-	$debian_package =~ /^texlive$/       ||
-	$debian_package =~ /^texlive-base$/  ||
-	$debian_package =~ /^texlive-extra$/ ||
-	$debian_package =~ /^texlive-lang$/  ||
-	$debian_package =~ /^texlive-doc$/   ||
-	$debian_package =~ /^texlive-bin$/     );
-};
-
-# texlive
-# my $TpmDirGlob = $Master . "./texmf-dist/tpm/*.tpm";
-# teTeX
-my $TpmDirGlob = "$tpmdir/*.tpm";
-
-# only needed if we're in the sourcedir, so no need to bother
-my $sourceDir;
-chomp( $sourceDir = `pwd`); 
-$sourceDir .= "/";
-
-# require Strict;
-require XML::DOM;
-require FileUtils;
-import FileUtils qw(canon_dir cleandir make_link newpath member
-		    normalize substitute_var_val diff_list remove_list
-		    rec_rmdir sync_dir walk_dir start_redirection stop_redirection);
-require Tpm;
-#
-# what the hell, how do I import this array from Tpm.pm ???
-#
-my %Tpm2Catalogue = (
-		     "ctib" => "ctib4tex",
-		     "CJK" => "cjk",
-		     "bayer" => "universa",
-		     "bigfoot" => "suffix",
-		     "cb" => "cbgreek",
-		     "cd-cover" => "cdcover",
-		     "cmex" => "cmextra",
-		     "cs" => "csfonts",
-		     "cyrplain" => "t2",
-		     "devanagr" => "devanagari",
-		     "eCards" => "ecards",
-		     "ESIEEcv" => "esieecv",
-		     "euclide" => "pst-eucl",
-		     "GuIT" => "guit",
-		     "HA-prosper" => "prosper",
-		     "ibycus" => "ibycus4",
-		     "ibygrk" => "ibycus4",
-		     "IEEEconf" => "ieeeconf",
-		     "IEEEtran" => "ieeetran",
-		     "iso" => "isostds",
-		     "iso10303" => "isostds",
-		     "jknapltx" => "jknappen",
-		     "kastrup" => "binhex",
-		     "le" => "frenchle",
-		     "mathtime" => "mathtime-ltx",
-		     "omega-devanagari" => "devanagari-omega",
-		     "pdftexdef" => "pdftex-def",
-		     "procIAGssymp" => "prociagssymp",
-		     "resume" => "res",
-		     "SIstyle" => "sistyle",
-		     "SIunits" => "siunits",
-		     "syntax" => "syntax2",
-		     "Tabbing" => "tabbing",
-# the following were added in tpm2licenses
-		     "avantgar" => "urw-base35",
-		     "bookman" => "urw-base35",
-		     "courier" => "urw-base35",
-		     "helvetic" => "urw-base35",
-		     "palatino" => "urw-base35",
-		     "symbol" => "urw-base35",
-		     "times" => "urw-base35",
-		     "zapfchan" => "urw-base35",
-		     "zapfding" => "urw-base35"
-		     );
-
-my $parser = new XML::DOM::Parser;
-my $startdir=getcwd();
-chdir($startdir);
-File::Basename::fileparse_set_fstype('unix');
-
-my @TpmList;
-my @coveredfiles;
-
-if (@ARGV) {
-  # we have a (list of) packages on the command line
-  @TpmList = @ARGV;
-}
-else {
-  create_tpmlist();
-};
-
-list_licenses();
-
-1;
-
-my $LocalTPM;
-my $licline;
-my $bn;
-my $pkgcat;
-my $node;
-my $printfiles = '';
-
-sub create_tpmlist {
-  foreach (<$TpmDirGlob >) {push(@TpmList,$_)};
-};
-
-sub list_licenses {
-  foreach $LocalTPM (@TpmList) {
-    $printfiles = '';
-    $licline = "";
-    $bn = &basename($LocalTPM,".tpm");
-    next if ($bn =~ m/bin-|collection-/);
-    if (defined($Tpm2Catalogue{$bn})) {
-      $pkgcat = $Tpm2Catalogue{$bn};
-    } else {
-      $pkgcat = $bn;
-    }
-    $licline .= "$bn: ";
-    if ($Catalogue =~ m/file:(.*)$/) {
-      # use the precompiled list of liclines extracted from the Catalogue
-      $licline = `grep ^${bn}: $1`;
-      chomp $licline;
-      if ($licline eq "") { $licline = "tpm $bn not found in $1, strange"; }
-      $printfiles = 1;
-    } else {
-      my $fletter = substr($pkgcat, 0, 1);
-      my $catname = "${Catalogue}/entries/$fletter/${pkgcat}.xml";
-      if (! -r $catname) {
-        $catname = "$tpmdir/${pkgcat}.xml";
-        if (! -r $catname) {
-	  $licline .= "not-in-catalogue";
-        };
-      }
-      my $ltype;
-      unless ($nocatalogue  || (! -r $catname) || $pkgcat =~ m/^individual.*/) { 
-        #don't try to parse the xml file if we don't have a catalogue
-        my $cat = $parser->parsefile($catname);
-        my ($version, $lversion, $lchecked, $luser, $lfile);
-        $node = $cat->getElementsByTagName("version")->item(0);
-        if ($node) {
-	  $version = $node->getAttribute("number");
-        }
-        $node = $cat->getElementsByTagName("license")->item(0);
-        if ($node) {
-	  # ok we have a license entry in there
-	  $ltype = $node->getAttribute("type");
-	  $lversion = $node->getAttribute("version");
-	  $lchecked = $node->getAttribute("checked");
-	  $luser = $node->getAttribute("username");
-	  $lfile = $node->getAttribute("file");
-        }
-        if ("$lversion$lchecked$luser" eq "") {
-	  if ("$ltype" eq "") {
-	    $licline .= "unknown";
-	  } else {
-	    $licline .= "$ltype (unverified)";
-	    # we know the license, it makes sense to output the files
-	    $printfiles = '1';
-	  }
-        } else {
-	  $version ||= ''; # make sure we have no uninitialized string values
-	  $lversion ||= '';
-	  $licline .= "$ltype (verification data:$version:$lversion:$lchecked:$luser:$lfile)";
-	  $printfiles = '1';
-        }
-      }
-      if ( $pkgcat =~ m/^individual.*/ ) {
-        $ltype = $pkgcat;
-        $ltype =~ s/individual_(.*)/$1/;
-        $licline = "$pkgcat $ltype (verification data:::::header)";
-        $printfiles = '1';
-      };
-    } # else part of Catalogue = file:...
-    $what eq "license" && print "$licline\n";
-    # we know the license, it makes sense to output the files
-    $what eq "files" && print "\n% $licline\n";
-    if ($what eq "files" && ($printfiles || $nocatalogue || $listallfiles)) {
-      printFiles($LocalTPM,$licline);
-    }
-  }
-  $what eq "files" && ! $nocoverage && CheckCoverage();
-}
-
-sub printFiles {
-  my ($LocalTPM,$licline)= @_;
-  my $pkg_header = "";
-  my $dom_parser = new XML::DOM::Parser;
-  my $doc = $dom_parser->parsefile($LocalTPM);
-  my %SourceFiles = Tpm::getListField($doc, "SourceFiles");
-  my %RunFiles = Tpm::getListField($doc, "RunFiles");
-  my %DocFiles = Tpm::getListField($doc, "DocFiles");
-
-  #
-  # NORBERT
-  # getListField returns a hash, and s{text} SHOULD be an array reference
-  # why isn't it like this???
-  # If it would be an array reference one could easily check whether
-  # sourcefile(text) is empty or not!!!
-  # Trick: If it was emtpy there is not size key!
-  #
-  if (!defined($SourceFiles{"size"})) { 
-    $SourceFiles{"text"} = ""; 
-  }
-  if (!defined($DocFiles{"size"})) { 
-    $DocFiles{"text"} = ""; 
-  }
-  if (!defined($RunFiles{"size"})) { 
-    $RunFiles{"text"} = ""; 
-  }
-  
-  foreach ($RunFiles{"text"}, $DocFiles{"text"}, $SourceFiles{"text"}) { 
-    # this is already done in Tpm.pm, why isn't that sufficient?
-    $_ =~ s/^\n*// ;
-    # remove the texmf-dist/ etc we don't need
-    $_ =~ s at texmf-dist/@@g;
-    $_ =~ s at texmf-doc/@@g;
-    $_ =~ s at texmf/@@g;
-    # make sure there's exactly one newline at the end
-    chomp;
-    $_ =~ s/$/\n/ ;
-  };
-
-  # we don't want the tpm file which isn't installed
-  $RunFiles{"text"} =~ s/\n.*\.tpm$//m;
-
-  my @SourceFiles = split(/\n/m,$SourceFiles{"text"});
-  my @RunFiles = split(/\n/m,$RunFiles{"text"});
-  my @DocFiles = split(/\n/m,$DocFiles{"text"});
-  foreach (@SourceFiles) { 
-    s/^\s//;
-    s@^[\s\n]*(.*)[\s\n]*$@$1 at so;
-    s@\n\s*@\n at gm;
-  };
-  foreach (@RunFiles) { 
-    s/\s//;
-    s@^[\s\n]*(.*)[\s\n]*$@$1 at so;
-    s@\n\s*@\n at gm;
-  };
-  foreach (@DocFiles) { 
-    s/\s//;
-    s@^[\s\n]*(.*)[\s\n]*$@$1 at so;
-    s@\n\s*@\n at gm;
-  };
-  @DocFiles = grep(!/^$/, at DocFiles);
-  @RunFiles = grep(!/^$/, at RunFiles);
-  @SourceFiles = grep(!/^$/, at SourceFiles);
-
-  # fake case statement
-  for ($debian_package) {
-    #my @texmfPath;
-    if ( /^texlive/ ) { 
-      #@texmfPath = ("texmf","texmf-dist","texmf-doc");
-      #
-      # DocFiles are installed into /u/s/d/pkg/...
-      # do we have to strip the first doc/ part
-      @DocFiles = map { $_ =~ s,^doc/,, ; $_; } @DocFiles ;
-      foreach (@RunFiles) {CheckFileExistence($_)};
-      foreach (@DocFiles) {CheckFileExistence($_)};
-      if (!$nosourcefiles) {
-        foreach (@SourceFiles) {CheckFileExistence($_)};
-      }
-      MergeDirectories(\@RunFiles);
-      MergeDirectories(\@DocFiles) if (@DocFiles);
-      if (!$nosourcefiles) {
-        MergeDirectories(\@SourceFiles) if (@SourceFiles);
-      }
-      print @RunFiles;
-      print @DocFiles;
-      print @SourceFiles if (!$nosourcefiles);
-    };
-    if ( /^tetex-base$/ ) {
-      #@texmfPath = (".");
-      foreach (@RunFiles) {CheckFileExistence($_)};
-      foreach (@DocFiles) {CheckFileExistence($_)};
-
-      MergeDirectories(\@RunFiles);
-      MergeDirectories(\@DocFiles) if (@DocFiles);
-      print @RunFiles;
-      print @DocFiles;
-    };
-    if ( /^tetex-src$/ ) {
-      #@texmfPath = (".");
-      foreach (@SourceFiles) {CheckFileExistence($_)};
-      MergeDirectories(\@SourceFiles);
-      unless (! @SourceFiles) {
-	print @SourceFiles;
-      }
-    };
-  };
-}
-
-sub CheckCoverage {
-  my @allfilesinpackage;
-  my @notcoveredfiles;
-  foreach my $tmf (@texmfPath) {
-    push @allfilesinpackage, `find $tmf -type f`;
-  }
-  chomp @allfilesinpackage;
-  foreach (@allfilesinpackage) {
-    next if (m/\.tpm$/);
-    if (!(in_list($_, at coveredfiles))) {
-      push @notcoveredfiles, $_;
-    }
-  }
-  print "\n\nCOVERAGE CHECK:";
-  if ($#notcoveredfiles < 0) {
-    print "OK\n";
-  } else {
-    print "NOT COVERED FILES:\n";
-    foreach (@notcoveredfiles) {
-      print $_,"\n";
-    }
-  }
-}
-
-sub in_list {
-  my ($what, @list) = @_;
-  foreach (@list) { 
-    if ($what eq $_) { return 1; }
-  }
-  return 0;
-}
-
-sub CheckFileExistence {
-  my ($file) = @_;
-  my $found = 0;
-  foreach my $texmfDir (@texmfPath) {
-    -f $texmfDir . "/" . $file && ($found =1) && push @coveredfiles , "$texmfDir/$file" ;
-  };
-  print STDERR "$file: Does not exist!\n" if ! $found;
-}
-
-sub MergeDirectories {
-  my ($filelist) = @_; # filelist is actually a pointer
-  # create a list of dirnames, and remove duplicates
-  my @dirnames = map {dirname($_) } @{$filelist};
-  my %UniqueHash = map { $_ , 1 } @dirnames;
-  @dirnames = keys %UniqueHash;
-
-  # For searching, we create a hash that contains the filenames as keys:
-  my %SearchHash;
-  %SearchHash = map { $_, 1 } @{$filelist} ;
-
-  my %DirComplete = map { $_, 1 } @dirnames;
-  for (@dirnames) {
-    my $dirname = $_;
-    my $fullDir;
-    my $rootDir;
-    for (@texmfPath) {
-      if ( -d ( $_ . "/" . $dirname )) { 
-	$rootDir = $_;
-	$fullDir =  ( $_ . "/" . $dirname );
-	last;
-      };
-    };
-    if (!$fullDir) {
-      printf STDERR "This should not happen: no directory $dirname, nowhere.\n";
-      next;
-    }
-    my @AllInstalledFiles = `find $fullDir -maxdepth 1 -type f 2>/dev/null`;
-    if ($#AllInstalledFiles == -1) { next; }
-    my  @InstalledFiles = `find $fullDir -maxdepth 1 -type f 2>/dev/null | grep -v tetex` 
-	or die "Calling find for $dirname, expanded to $fullDir, failed.";
-    for (@InstalledFiles) {
-      chomp;
-      s@^$rootDir/@@;
-      $DirComplete{$dirname} = 0 unless $SearchHash{$_};
-    };
-    if ( $DirComplete{$dirname} ) {
-      for (@{$filelist} ) {
-	# replace the file by its directory name
-	s@$dirname/.*@$dirname/*@;
-      };
-    };
-# 	print STDERR "Directory $_ is $DirComplete{$dirname}\n";
-  };
-
-  # now the complete directories occur multiple times, remove duplicates again
-  %UniqueHash = map { ("$_\n" , 1) } @{$filelist} ;
-  @{$filelist} = sort keys %UniqueHash;
-}
-
-

Deleted: tex-common/trunk/scripts/tpm2licenses.README
===================================================================
--- tex-common/trunk/scripts/tpm2licenses.README	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/tpm2licenses.README	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,330 +0,0 @@
-README file for tpm2licenses
-*****************************
-
-This README file explains what the script tpm2licenses is meant for,
-and how it can be used.
-
-1. Purpose
-2. Requirements
-3. Usage of the script
-4. License verification procedure
-
-1. Purpose
-===========
-
-TeXlive is a big collection, itself a distribution put together from
-individual packages on CTAN (ftp://cam.ctan.org/tex-archive/).
-Upstream (the TeXLive team) do share Debian's view on Free Software
-(except maybe for documentation issues), but there might still be
-files included that are non-free or are intended to be free, but don't
-have a proper license statement.  The reason is mostly historical - in
-the old days, both upstream and individual package authors didn't care
-about these things as they should have.  And TeX has grown for a long
-time...
-
-In the past, the Debian teTeX packages (the predecessor of TeXLive)
-have been audited for license freeness at least once.  However, this
-has been done on a per-CTAN- package basis (and even that, perhaps,
-not too systematically), not on a per-file basis.  Furthermore, the
-process of auditing has not been documented.  Therefore, it is not
-possible today to check which parts were included and checked back
-then.
-
-As a consequence, we have decided to do it systematically this time,
-and to keep information about which files are associated with a
-particular package, which license they're under, and where this
-information can be found.
-
-This information will ultimately end up in debian/copyright in a very
-condensed form.  For maintaining the information, we use different,
-more structured files at different locations, re-using already
-existing infrastructure in the TeXlive package building mechanisms and
-the TeX Catalogue.  This script is used to verify whether this
-existing information is correct and applies to the current TeXLive
-packages, and to merge the information into the copyright file.
-
-2. Requirements
-======================
-
-- installed packages
-
-  tpm2licenses is installed with the tex-common package, as an
-  executable in /usr/share/tex-common, but since it is not at the core
-  of tex-common's functionality, two additional packages are needed
-  that tex-common does not depend upon: 
-
-	libxml-dom-perl, libappconfig-perl.
-
-- Available sources
-
-  Obviously, you need the tetex-base[1] source package.  You also need
-  the tetex-src package - either the installed binary package or,
-  better, the source package.
-
-  Having TeXlive sources installed is not strictly needed, but it
-  makes your contribution much more valuable
-
-  Finally, the script can access a local checkout of the TeX Catalogue
-  sources, but this is not needed to do the auditing, only for the
-  final copyright file generation (and even here an intermediate file
-  can be used)
-
-3. Usage of the script
-========================
-
-SYNTAX:
-
-  /usr/share/tex-common/tpm2licenses [ options ] [ tpm file(s) ]
-
-The script must be run from the root directory of an unpacked source
-package (e.g. tetex-base-3.0/) [FIXME: texlive runs it on installed
-files?] and understands the following options:
-
-   --catalogue <directory>
-   --catalogue file:<file>
-
-	Path to a local checkout of the TeX Catalogue sources, or in
-	the second form the path to a file that contains a precompiled
-	list of "license lines" for CTAN packages.
-
-   --nocheckcatalogue
-
-	Do not try to check the catalogue
-
-   --tpmdir
-
-	The directory where tpm files can be found.  Not necessary
-	when auditing single tpm files
-
-   --package [tetex-base|tetex-src|texlive-*]
-
-	Assume we are in a source tree of this package (affects
-	whether sources or runtime files are searched for, or both)
-
-   --listallfiles
-
-	list the files even in the tpm files for which we do not have
-	Catalogue information, even if a Catalogue location is given
-
-   --nocoverage
-
-	Do not list files in the source package that are not listed in
-	any of the tpm files.  Useful if you're giving tpm files on
-	the command line.
-
-The options can also be written into a configuration file, like this:
-
-Catalogue = /home/frank/src/Upstream-source/texcatalogue
-nocoverage
-
-The file should be named .tpm2license.cfg and will be searched for in
-the current directory, it's subdirectory debian, the parent directory
-and the user's home directory (in this order).  If multiple
-configuration files exist, all are read, and later entries override
-earlier ones.  Thus, you can e.g. specify "nocheckcatalogue" in your
-home directory.
-
-The script will do the following things:
-
-- Extract filenames with path information from a tpm file, one tpm
-  file after the other.
-
-- Check whether all files in the tpm do in fact exist in the source
-  tree, and warn if some are missing.
-
-- Extract license information from the TeX Catalogue, if available,
-  and print it.
-
-- For each directory mentioned in the tpm file, check whether the
-  directory is complete with the files from that tpm.  If there are
-  additional files in it, only the files listed in the tpm are
-  returned.  If the directory is complete (not counting subdirectories
-  and their contents), only the directory name with a * appended is
-  printed.
-
-If more than one tpm file is given, or the whole tpmdir is acted on,
-this sequence is repeated multiple times, separately for each tpm file.
-
-- After that, unless nocoverage is given, the script complains about any
-  files that are in the source tree but not in the tpm files used in
-  this run.  The coverage should be complete for TeXLive, but it isn't
-  for teTeX - therefore tetex-base and tetex-src should have noocoverage
-  in their configuration files currently.
-
-4. License verification procedure
-===================================
-
-We suggest that everybody follows the procedure outlined below.
-
-a) coordinate on debian-tetex-maint and/or in the Wiki at
-   http://wiki.debian.org/LicenseAuditing which parts you are going to
-   check, to prevent duplicate work.
-
-b) copy a tpm file from texlive to tetex-base's debian/tpm/ directory.
-   Of course, if you've got SVN write access, use "svn copy".  In
-   texlive's SVN repository, the tpm files are alltogether in
-   LocalTPM/texmf-dist/tpm/.  In the individual source packages, they
-   are in texmf-dist/tpm.
-
-   The tpm files consist of some general information about the
-   package, and three lists of RunFiles, DocFiles and SourceFiles.
-   Any of these may be empty.  Run and Doc files should be in
-   tetex-base, Source files in tetex-src.
-
-c) Change directory to the tetex-base source tree and run
-
-/usr/share/tex-common/tpm2licenses debian/tpm/<your_new>.tpm >/dev/null
-
-   The redirection makes sense because this time, you're only
-   interested in the error messages about missing files.  There are
-   many possible reasons for missing files, for example:
-
-   1. TeXLive has a newer version of the package, and the newer
-      version has additional files.  Of course, other files may also
-      have vanished, see below.
-
-   2. TeXlive often installs files into the documentation tree
-      (DocFiles) that are in tetex-src.  
-
-   3. Different file extensions, e.g. DVI files instead of PDF, or a
-      file "packagename.readme" has been renamed to "readme.txt" since
-      it's installed in the packagename directory, anyway
-
-   4. Packaging errors by teTeX's upstream, the file *should* be
-      there. 
-
-   Therefore, for any file missing in the RunFiles or DocFiles sections,
-   don't delete the line in the tpm file.  Instead, move it to
-   SourceFiles and change "doc" to "source", "tex" to "source" etc.
-
-   Proceed to the next step if there are no more error messages
-
-d) Change to the tetex-src source tree and run 
-
-/usr/share/tex-common/tpm2licenses path/to/<your_new>.tpm >/dev/null
-
-   In many cases, files moved to SourceFiles from RunFiles or DocFiles
-   will be reported as missing again - sometimes because they are
-   really missing, sometimes because the paths or names don't fit
-   completely. 
-
-e) Now come two technically distinct steps which can conveniently be
-   done at once: On the one hand, we have to check whether any files
-   exist in the source trees that should be in the tpm file we're
-   looking at.  On the other hand, we need to verify whether the
-   license the package is under actually covers all the files listed
-   in its tpm file.
-
-   1. Adding files
-
-   To check for files you can possibly add to the tpm file, rerun the
-   above commands without the redirection.  In the ideal case, you'll
-   get a list of directories, like this:
-
-% acronym: lppl (verification data:1.25:1.17:2006-03-07:frank:header)
-tex/latex/acronym/*
-doc/latex/acronym/*
-
-   This indicates that all files in these two directories are already
-   listed in acronym.tpm - no need to add any.  However, if you get a
-   list of many individual files in the same directory, chances are
-   that one or two are missing:  It might be that the file no longer
-   exists in TeXlive's newer version, an error in TeXlive, or
-   whatever. 
-
-   Furthermore, in many cases files need to be copied from DocFiles to
-   SourceFiles.  This is because in TeXlive, where the tpms have been
-   developed, every file exists only once.  In teTeX, on the other
-   hand, the source directories in tetex-src just mirror what is on
-   CTAN: Some of these files are source files, others are
-   documentation which has also been copied to the tetex-base source
-   tree by teTeX's upstream. They are therefore in two source trees
-   and need to be in two sections in the tpm file.
-
-   2. Checking Licenses
-
-   Of course, we cannot have files in a package's tpm file that in
-   fact is not covered by the same license!  Therefore you have to
-   carefully check the license.  First of all, find out where the
-   license is specified and whether it is free; then find out which
-   files are covered.
-
-   Some packages have a file "manifest.txt" or similar which lists all
-   files included, and is referenced from the file that specifies the
-   license.  Others have the license statement in the header of every
-   source file, or also in extracted TeX input files.  In any case,
-   there may be files which are not indicated as belonging to the
-   package, being licensed under its license, and still belong to the
-   tpm.  These fall into two categories:
-
-   - trivial files
-
-     Very simple readme files, simple Makefiles and their TeX
-     counterparts, *.ins files, don't need a license statement.  They
-     still should have one, so if we're contacting upstream, we can as
-     well request to add them to the list of covered files.  But it's
-     not required.
-
-     Also, pure license files, including manifest.txt-style files,
-     don't need a license statement.
-
-   - generated files
-
-     The files that can be autogenerated from a *.dtx file are usually
-     listed in an *.ins file (which might have a different name) in a
-     command starting with \generate on a line containing
-     \file{<filename>}.  Some distributions also contain the generated
-     file <dtx-basename>.drv.  Both from the *.dtx file itself and
-     from tex input files generated by the *.ins file, documentation
-     in PDF, PS or DVI format can be generated (and in other formats
-     using appropriate converters). 
-
-   Most tpm files refer to only one subdirectory in the tetex-src
-   tree, and all files in that directory should be covered by the tpm
-   file (except any additions by teTeX upstream, usually indicated by
-   "tetex" in their name).  In tetex-base, however, files in a
-   particular subdirectory *may* also come from a different tpm file.
-   If you are unsure, just ignore them, they will be found in the end
-   by the coverage check.
-
-f) Reporting success and problems
-
-   If all is well, just submit the following information to
-   debian-tetex-maint at lists.debian.org:
-
-   - the working tpm file
-
-   - the license text, or a name if it is LPPL or in
-     /usr/share/common-licenses 
-
-   - The name of the file where the license information is given, the
-     version in teTeX and, if you also checked that, versions in
-     TeXlive and on CTAN.
-
-   If you found incomplete license information, or non-free license
-   texts, please report as much info as you have to the mailing list
-   and to the Wiki at http://wiki.debian.org/LicenseAuditing.  Steps
-   to perform now can include:
-
-   - Check whether problematic files exist elsewhere on CTAN (some
-     files are only in zip or tar.gz archives!) and have other,
-     hopefully newer license information
- 
-   - Check whether any license discussion is archived by Google or
-     other search engines
-
-   - Find out the responsible upstream author and contact them.
-
-     When contacting upstream, please be careful.  Remind yourself
-     that most of the time, upstream authors want their work to be
-     free and think they have already done enough.  Explain in some
-     detail and with polite words what should be done and why.  If
-     upstream has been inactive in the TeX community, it might make
-     sense to offer that you do an upload on behalf of them.  Maybe
-     not in the initial mail, but later in the conversation.
-   
- 
-
-
-[1] Eventually, tetex-bin will have to be checked, too, but currently
-we're concentrating on tetex-base.
\ No newline at end of file

Copied: tex-common/trunk/scripts/update-fmtlang (from rev 5258, tex-common/branches/v3/scripts/update-fmtlang)
===================================================================
--- tex-common/trunk/scripts/update-fmtlang	                        (rev 0)
+++ tex-common/trunk/scripts/update-fmtlang	2012-03-24 07:13:14 UTC (rev 5285)
@@ -0,0 +1,847 @@
+#!/bin/bash -e
+#
+# update-fmtlang --- Generate updmap.cfg, language.dat, fmtutil.cnf etc
+#                     from a set of files
+# Copyright (C) 2002 Atsuhito Kohda
+# Copyright (C) 2004, 2005, 2006, 2007 Florent Rougon
+# Copyright (C) 2005, 2006, 2009, 2010, 2011, 2012 Norbert Preining
+# Copyright (C) 2007 Frank Küster
+#
+# 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.
+
+version="1.0"
+progname=$(basename "$0")
+
+SYSPATH_BASE=/var/lib/texmf
+
+HYPHENMODE=nohyphen
+HEADFILE=/not/a/real/file/we/ever/will/see/on/a/system
+
+if [ "$progname" = "update-language" ] ; then
+    update-language-dat
+    update-language-def
+    update-language-lua
+    exit 0
+elif [ "$progname" = "update-language-lua" ] ; then
+    CNFDIR=hyphen.d
+    HEADFILE=/usr/share/texlive/texmf/tex/generic/config/language.us.lua
+    HYPHENMODE=luatex
+    # System-wide configuration directory
+    SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
+    CHECKFILE="$SYSWIDE_CONFDIR/00tex.cnf"
+    EXT="cnf"
+    MEMORY_DIR=/var/lib/tex-common/hyphen-cnf
+    PATH_COMPONENT=tex/generic/config
+    SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT"
+    DEFAULT_OUTPUTFILE_BASENAME=language.dat.lua
+    SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME"
+    READCC="%"                      # for COMMENTCHAR
+    WRITECC="--"
+    # in printf, %% is one %
+    PCC="\055\055"                    # for printfCOMMENTCHAR
+    SHORT_DESC="Generate language.dat.lua, the hyphenation configuration file for luaTeX and friends"
+elif [ "$progname" = "update-language-def" ] ; then
+    CNFDIR=hyphen.d
+    HEADFILE=/usr/share/texlive/texmf/tex/generic/config/language.us.def
+    HYPHENMODE=etex
+    # System-wide configuration directory
+    SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
+    CHECKFILE="$SYSWIDE_CONFDIR/00tex.cnf"
+    EXT="cnf"
+    MEMORY_DIR=/var/lib/tex-common/hyphen-cnf
+    PATH_COMPONENT=tex/generic/config
+    SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT"
+    DEFAULT_OUTPUTFILE_BASENAME=language.def
+    SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME"
+    READCC="%"                      # for COMMENTCHAR
+    WRITECC="%"
+    # in printf, %% is one %
+    PCC="%%"                    # for printfCOMMENTCHAR
+    SHORT_DESC="Generate language.def, the hyphenation configuration file for eTeX and friends"
+elif [ "$progname" = "update-language-dat" ] ; then
+    CNFDIR=hyphen.d
+    HEADFILE=/usr/share/texlive/texmf/tex/generic/config/language.us
+    HYPHENMODE=latex
+    # System-wide configuration directory
+    SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
+    CHECKFILE="$SYSWIDE_CONFDIR/00tex.cnf"
+    EXT="cnf"
+    MEMORY_DIR=/var/lib/tex-common/hyphen-cnf
+    PATH_COMPONENT=tex/generic/config
+    SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT"
+    DEFAULT_OUTPUTFILE_BASENAME=language.dat
+    SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME"
+    READCC="%"                      # for COMMENTCHAR
+    WRITECC="%"
+    # in printf, %% is one %
+    PCC="%%"                    # for printfCOMMENTCHAR
+    SHORT_DESC="Generate language.dat, the hyphenation configuration file for LaTeX"
+elif [ "$progname" = "update-updmap" ] ; then
+    echo "I should NOT be called this way, there is something wrong!!! ... good bye!" >&2
+    exit 1
+    CNFDIR=updmap.d
+    # System-wide configuration directory
+    SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
+    CHECKFILE="$SYSWIDE_CONFDIR/00updmap.cfg"
+    EXT="cfg"
+    MEMORY_DIR=/var/lib/tex-common/fontmap-cfg
+    PATH_COMPONENT=web2c
+    SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT"
+    DEFAULT_OUTPUTFILE_BASENAME=updmap.cfg
+    SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME"
+    READCC="#"
+    WRITECC="#"
+    PCC="#"                     # for printfCOMMENTCHAR
+    SHORT_DESC="Generate an updmap configuration file"
+elif [ "$progname" = "update-fmtutil" ] ; then
+    CNFDIR=fmt.d
+    # System-wide configuration directory
+    SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
+    CHECKFILE="$SYSWIDE_CONFDIR/00tex.cnf"
+    EXT="cnf"
+    MEMORY_DIR=/var/lib/tex-common/fmtutil-cnf
+    PATH_COMPONENT=web2c
+    SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT"
+    DEFAULT_OUTPUTFILE_BASENAME=fmtutil.cnf
+    SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME"
+    READCC="#"
+    WRITECC="#"
+    PCC="#"                     # for printfCOMMENTCHAR
+    SHORT_DESC="Generate an fmtutil configuration file"
+else
+    echo "Please call me either as update-updmap, update-language, or update-fmtutil!"
+    exit 1
+fi
+
+usage="Usage: $progname [OPTION...]
+${SHORT_DESC}.
+
+Options:
+  -c, --conf-dir=DIR     directory where the user-specific configuration is
+                         looked for in user-specific mode
+  -o, --output-file=FILE file to write the output to (default is
+                         $SYSWIDE_DEFAULT_OUTPUTFILE in system-wide-mode,
+                         and depends on your Kpathsea settings in
+                         user-specific mode)
+      --checks           perform sanity checks on the generated config file
+      --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"
+
+
+DebPkgProvidedMaps_magic_comment="^[#%] -_- DebPkgProvidedMaps -_-"
+
+# This ensures that if $tempfile is in the *environment*, we won't erase
+# the file it could point to in case the script is killed by a signal before
+# it has had a chance to even create its temporary file.
+tempfile=""
+
+
+cleanup()
+{
+    rc=$?
+    [ -n "$tempfile" ] && rm -f "$tempfile"
+    exit $rc
+}
+
+do_one_hyphen_line()
+{
+    line="$1"
+    case "$line" in
+        ${READCC}*) echo "$line" | sed -e "s!^$READCC!$WRITECC !" >> "$tempfile" ; return ;;
+    esac
+    set -- $line
+    name=""
+    lhm=""
+    rhm=""
+    synonyms=""
+    f=""
+    while [ ! "$1" = "" ] ; do
+        case "$1" in
+            name=*) name="${1#name=}" ;;
+            lefthyphenmin=*) lhm="${1#lefthyphenmin=}" ;;
+            righthyphenmin=*) rhm="${1#righthyphenmin=}" ;;
+            patterns=*) patterns="${1#patterns=}" ;;
+            synonyms=*) synonyms="${1#synonyms=}" ;;
+            exceptions=*) exceptions="${1#exceptions=}" ;;
+            file=*) f="${1#file=}" ;;
+            *) echo "Unknown AddHypen directive $1 in line: ==$line==!" >&2 ; return ;;
+        esac
+        shift
+    done
+    if [ "$name$lhm$rhm$synonyms$f$exceptions$patterns" = "" ] ; then
+        return
+    fi
+    if [ ! "$lhm$rhm$synonyms$f$exceptions$patterns" = "" ] ; then
+        if [ "$name" = "" ] ; then
+            echo "the line $line does not contain a name= directive, ignored!" >&2
+            return
+        fi
+    fi
+    if [ ! "$name$lhm$rhm$synonyms$exceptions$patterns" = "" ] ; then
+        if [ "$f" = "" ] ; then
+            echo "the line $line does not contain a file= directive, ignored!" >&2
+            return
+        fi
+    fi
+    if [ "$HYPHENMODE" = "etex" ] ; then
+        printf '\\'"addlanguage{$name}{$f}{}{$lhm}{$rhm}\n" >> "$tempfile"
+    elif [ "$HYPHENMODE" = "latex" ] ; then
+        echo "$name $f" >> "$tempfile"
+    elif [ "$HYPHENMODE" = "luatex" ] ; then
+       printf "\t[\' $name \'] = {\n\t\tloader = \'$f\',\n\t\tlefthyphenmin = $lhm,\n\t\trighthyphenmin = $rhm,\n\t\tpatterns = \'$patterns\',\n\t\thyphenation = \'$exceptions\',\n\t\tsynonyms = { " >> "$tempfile"
+    fi
+    if [ ! "$synonyms" = "" ] ; then
+        {
+            first=1
+            IFS=",$IFS"
+            for s in $synonyms ; do
+                if [ "$HYPHENMODE" = "etex" ] ; then
+                    printf '\\'"addlanguage{$s}{$f}{}{$lhm}{$rhm}\n" >> "$tempfile"
+                elif [ "$HYPHENMODE" = "latex" ] ; then
+                    echo "=$s" >> "$tempfile"
+                elif [ "$HYPHENMODE" = "luatex" ] ; then
+                    if [ $first = 0 ] ; then
+                        printf ", " >> "$tempfile"
+                    else 
+                        first=0
+                    fi
+                    printf "\'$s\'" >> "$tempfile"
+                fi
+            done
+        }
+    fi
+    if [ "$HYPHENMODE" = "luatex" ] ; then
+        printf " }\n\t},\n"  >> "$tempfile"
+    fi
+}
+
+include_hyphen_file_core()
+{
+    file="$1"
+    cat "$1" | while read line ; do
+        do_one_hyphen_line "$line"
+    done
+}
+
+# include_file <file path>
+include_file()
+{
+    file="$1"
+
+    printf "\n${PCC} ${PCC}${PCC} From file: $file\n" >>"$tempfile"
+    if [ $HYPHENMODE = "nohyphen" ] ; then
+        cat "$file" >>"$tempfile"
+    else
+        include_hyphen_file_core "$file"
+    fi
+    echo "${WRITECC} End of file: $file" >>"$tempfile"
+    case "$file" in
+      */10texlive-latex-base.cnf)
+	seen_latex=1
+	;;
+    esac
+}
+
+# do_not_include_file <file path>
+do_not_include_file()
+{
+    file="$1"
+
+    cat >>"$tempfile" <<EOF
+
+$WRITECC
+$WRITECC $file not included because either it wasn't
+$WRITECC up-to-date (conffile update pending) or the package shipping it was
+$WRITECC apparently removed (no corresponding .list file in
+$WRITECC $MEMORY_DIR/).
+$WRITECC
+EOF
+}
+
+# do_not_include_snippet_that_depends_on_a_not_included_snippet <file path>
+do_not_include_snippet_that_depends_on_a_not_included_snippet()
+{
+    file="$1"
+
+    cat >>"$tempfile" <<EOF
+
+$WRITECC
+$WRITECC $file not included because it depends
+$WRITECC on another file that is not included here. For instance, jadetex and
+$WRITECC xmltex snippets are not included in fmtutil.cnf when the snippet for
+$WRITECC LaTeX isn't included itself. This is because the jadetex and xmltex
+$WRITECC formats need the LaTeX format when being built (see bug #427562).
+$WRITECC
+EOF
+}
+
+# swap_basename_and_dirname
+#
+# This function expects a file path on every line of stdin and will write
+# on stdout the same lines with the file basename and dirname swapped.
+# This is useful because we want to sort the files from several directories
+# based on their basenames only (the directory they are stored into mustn't
+# influence the order).
+swap_basename_and_dirname()
+{
+    # Use a slash as the separator between basename and dirname so that
+    # files or directories with e.g. spaces in their names are supported.
+    while read file; do
+        echo "$(basename "$file")$(dirname "$file")"
+    done
+}
+
+# check_special_jadetex_xmltex <file path>
+#
+# Special case for jadetex and xmltex: If no latex format information is
+# included so far ($seen_latex is still 0), then we cannot generate the jadetex
+# or xmltex formats, and may not include them in fmtutil.cnf. Even if both
+# packages depend on tl-latex-base, this is still needed, because if
+# tl-base-bin and tl-latex-base are upgraded at the same time, the latex
+# information is not included while tl-base-bin is configured and runs
+# "fmtutil --all" (see bug #427562).
+#
+# Return value:
+#
+#   - 0 if:
+#       * we are being called as update-fmtutil;
+#       * and <file path> points to 40jadetex.cnf or 40xmltex.cnf;
+#       * and $seen_latex=0.
+#
+#   - 1 in all other cases.
+check_special_jadetex_xmltex()
+{
+  [ "$progname" = update-fmtutil ] || return 1
+  
+  file="$1"
+
+  case "$file" in
+    */40jadetex.cnf|*/40xmltex.cnf)
+      if [ $seen_latex = 0 ]; then
+          return 0
+      fi
+      ;;
+  esac
+
+  return 1
+}
+
+# handle_file <file path>
+#
+# <file path> must point to an update-fontlang configuration file (such as
+# /etc/texmf/updmap.d/05tetex-extra.cfg). The function decides whether the file
+# should be included in $output_file and outputs the corresponding snippet if
+# yes, or a comment explaining why if no.
+handle_file()
+{
+    file="$1"
+
+    # Does the file have a dpkg-new sister?
+    if [ -f "${file}.dpkg-new" ]; then
+      do_not_include_file "$file"
+    else
+      # Does the file have the magic comment?
+      if grep -E "$DebPkgProvidedMaps_magic_comment" "$file" >/dev/null; then
+        # Is the package "$file" comes from still installed?
+        if [ -d "$MEMORY_DIR" ] \
+            && find "$MEMORY_DIR" -type f -name '*.list' -print0 \
+            | xargs -0r cat \
+            | grep -E "^$(basename "$file" ".$EXT")\$" >/dev/null;
+	then
+	  if check_special_jadetex_xmltex "$file"; then
+              do_not_include_snippet_that_depends_on_a_not_included_snippet \
+                "$file"
+          else
+            include_file "$file"
+	  fi
+        else
+            do_not_include_file "$file"
+        fi
+      else
+        include_file "$file"
+      fi
+    fi
+}
+
+# merge_files
+#
+# This function expects on the standard input a sorted list of update-updmap
+# configuration files (such as /etc/texmf/updmap.d/05tetex-extra.cfg). Each of
+# them should be listed on a line by itself with the basename being the
+# *first* component of the path, e.g.:
+#
+#   05tetex-extra.cfg/etc/texmf/updmap.d
+#
+# (where 05 should be at the beginning of the line, with no leading spaces, of
+# course). This is so because the sort operation presumably performed by the
+# caller of this function should sort on the basenames of the files,
+# regardless of the directories they come from.
+#
+# Since the list is expected to be sorted, if several files have the same
+# basename, they will be found on consecutive lines.
+#
+# The function calls handle_file() for every file in the list, but only once
+# for a single basename. If several files with the same basename are listed
+# from several directories, only the one in $conf_dir will be passed to
+# handle_file. This allows user-defined .cfg files to override system .cfg
+# files (those in /etc). The order of the files is preserved:
+# handle_file() will receive them as they came on stdin, except that it will
+# be called only once for each basename.
+#
+# handle_file receives the file path in the usual order (directory/basename).
+merge_files()
+{
+    # We will procede the list focusing on the last two elements in order to
+    # handle the case of several files in a row having the same basename.
+    lastfile=""
+    lastdir=""
+    # Overloaded files are files with the same basename that were found in
+    # several directories.
+    overloaded=0
+    # In case we are being called as update-fmtutil, seen_latex tells whether
+    # we have included the snippet for the LaTeX format so far. This is
+    # useful, because the snippets for formats that depend on LaTeX such
+    # jadetex and xmltex should only be included along with the snippet for
+    # the LaTeX format (see bug #427562).
+    seen_latex=0
+
+    while read line; do
+        filename="${line%%/*}"
+        dirname="/${line#*/}"
+        if [ -n "$lastfile" ]; then
+            if [ "$lastfile" != "$filename" ]; then
+                # For overloaded files, use the one in $conf_dir.
+                if [ $overloaded = 1 ]; then
+                    overloaded=0
+                    dir="$conf_dir"
+                else
+                    dir="$lastdir"
+                fi
+                handle_file "$dir/$lastfile"
+            else
+                overloaded=1
+            fi
+        fi
+        lastdir="$dirname"
+        lastfile="$filename"
+    done
+
+    # Test whether there was at least one line to read from stdin
+    if [ -n "$lastdir" ]; then
+        # The last file is still in the pipe; get it out.
+        if [ $overloaded = 1 ]; then
+            dir="$conf_dir"
+        else
+            dir="$lastdir"
+        fi
+        handle_file "$dir/$lastfile"
+    fi
+}
+
+perform_sanity_checks()
+{
+    if [ -L "$output_file" ]; then
+        # This might cause errors, so do not skip this echo when quiet.
+        echo "$progname: $output_file is a symbolic link; won't do anything" >&2
+        exit 0
+    fi
+
+    if ! [ -r "$CHECKFILE" ] ; then
+        echo "$progname: cannot read $CHECKFILE" >&2
+        exit 1
+    fi
+
+    # Check for $DEFAULT_OUTPUTFILE_BASENAME in wrong places (currently,
+    # only enabled for update-updmap), if running in system-wide mode.
+    if [ $syswide_mode = 1 ] && [ "$progname" = "update-updmap" ]; then
+        badly_located_cfg_file="/etc/texmf/web2c/$DEFAULT_OUTPUTFILE_BASENAME"
+        badly_used_prg=updmap-sys
+        bad_options="--edit, --syncwithtrees, etc."
+
+        if [ -e "$badly_located_cfg_file" ]; then
+            printf "\
+Error: '$badly_located_cfg_file' should not exist when using the
+       Debian teTeX or TeX Live packages. Presumably, you used ${badly_used_prg} 
+       in maintainance mode (options ${bad_options}).
+       This shouldn't be done with the Debian teTeX or TeX Live packages.
+       Instead, you should edit the files in ${SYSWIDE_CONFDIR}/ and run
+       ${progname}, mktexlsr and ${badly_used_prg}.
+       Please remove '$badly_located_cfg_file' and try again.\n" >&2
+            exit 1
+        fi
+    fi
+
+    # It could be that there is a DEFAULT_OUTPUTFILE_BASENAME file 
+    # in TEXMFCONFIG, which would be found by kpathsea instead of the
+    # output_file. So we check for this and give a warning in case
+    # the created file would be shadowed.
+    if [ $syswide_mode = 0 ] && [ $output_file_specified = 0 ]; then
+        OLDIFS="$IFS"
+        IFS=:
+        for d in "$texmfconfig"; do
+            if [ ! "$d/$PATH_COMPONENT/$DEFAULT_OUTPUTFILE_BASENAME" \
+                 = "$output_file" ] \
+                && [ -f "$d/$PATH_COMPONENT/$DEFAULT_OUTPUTFILE_BASENAME" ];
+                then
+                printf "\
+You are about to generate the file 
+        $output_file
+but at the same time you have a file
+        $d/$PATH_COMPONENT/$DEFAULT_OUTPUTFILE_BASENAME
+which will shadow the former. We'll continue generating the first
+file, but to allow TeX and friends to find it, you'll have to remove the
+second one.\n"
+                # Don't break out as we want to warn the user for *every*
+                # shadowing file!
+            fi
+        done
+        IFS="$OLDIFS"
+    fi
+}
+
+# perform_contents_check
+#
+# This function *TRIES* to check wether the installed files are correct in
+# the sense that every file occurring in it is present. This can help to
+# find typing errors
+perform_contents_check ()
+{
+    #
+    # performing contents checking only works when kpsewhich is present
+    # and configured, this can be done in one step:
+    if kpsewhich --version  >/dev/null 2>&1 ; then
+        if [ "$progname" = "update-language" ] ; then
+            perform_contents_check_language "$1"
+        elif [ "$progname" = "update-updmap" ] ; then
+            perform_contents_check_map "$1"
+        elif [ "$progname" = "update-fmtutil" ] ; then
+            perform_contents_check_format "$1"
+        fi
+    fi
+}
+
+perform_contents_check_language ()
+{
+    fn="$1"
+    grep -v '^\W*\(%\|=\|$\)' "$fn" | while read lang hyph comm ; do
+        # now check the existence of the hyphenation file
+        if [ -z $(kpsewhich -format=tex $hyph) ] ; then
+           cat >&2 <<EOF
+The config file $fn references a file not in the kpathsea database:
+    $hyph
+This may be ok, but it could also be a typing error.
+EOF
+        fi
+    done
+}
+        
+perform_contents_check_map ()
+{
+    fn="$1"
+    grep -i '^\W*\(Mixed\)\?Map' "$fn" | while read foo map ; do
+        # now check the existence of the hyphenation file
+        if [ -z $(kpsewhich -format=map $map) ] ; then
+           cat >&2 <<EOF
+The config file $fn references a file not in the kpathsea database:
+    $map
+Calling updmap(-sys) will break!
+This may be ok, but it could also be a typing error.
+EOF
+        fi
+    done
+}
+
+perform_contents_check_format ()
+{
+    fn="$1"
+    grep -v '^\W*\(#\|$\)' "$fn" | while read format engine hyphenation args ; do
+        # this is stolen from fmtutil
+        set -- $args
+        pool=; tcx=
+        texargs="$@"
+        eval lastarg=\$$#
+        inifile=$(echo $lastarg | sed 's%^\*%%')
+        case "$engine" in
+            mpost)  kpsefmt=mpost;;
+            mf|mfw|mf-nowin) kpsefmt=mf;;
+            *)      kpsefmt=tex;;
+        esac
+        # now check the existence of the hyphenation file
+        if [ -z $(kpsewhich -progname=$format -format=$kpsefmt $inifile) ] ; then
+           cat >&2 <<EOF
+The config file $fn references a file not in the kpathsea database:
+    $inifile
+This may be ok, but it could also be a typing error.
+EOF
+        fi
+    done
+}
+
+
+# The list of signals to trap is taken from teTeX 3's updmap script, but they
+# have been converted to signal names because we can only rely on these on
+# POSIX systems.
+trap 'cleanup' HUP INT QUIT BUS PIPE TERM
+
+
+# -v (verbose) is here for backward compatibility only.
+TEMP=$(getopt -o +vc:o: --longoptions \
+    conf-dir:,output-file:,check,quiet,help,version \
+    -n "$progname" -- "$@")
+
+case $? in
+    0) : ;;
+    1) echo "$usage" >&2; exit 1 ;;
+    *) exit 1 ;;
+esac
+
+# Don't remove the quotes around $TEMP!
+eval set -- "$TEMP"
+
+# Determine whether we will run in system-wide mode or in user-specific mode
+if [ "$(id -u)" -eq 0 ]; then
+    syswide_mode=1
+else
+    syswide_mode=0
+fi
+
+
+# ****************************************************************************
+# *                                 Defaults                                 *
+# ****************************************************************************
+quiet=1
+dochecks=0
+output_file_specified=0
+
+if [ $syswide_mode = 1 ]; then
+    output_file="$SYSWIDE_DEFAULT_OUTPUTFILE"
+else
+    # If tetex-bin is not installed, kpsewhich is not available, and we cannot 
+    # do anything
+    if ! which kpsewhich >/dev/null; then
+	echo "kpsewhich isn't available. Cannot create" \
+             "$DEFAULT_OUTPUTFILE_BASENAME in user-specific mode." >&2
+	exit 1
+    fi
+    # Is there an updmap.d/language.d directory somewhere in the expansion of
+    # $TEXMFCONFIG?
+    conf_dir=""
+    texmfconfig=$(kpsewhich --expand-path '$TEXMFCONFIG')
+    OLDIFS="$IFS"
+    IFS=:
+    for d in "$texmfconfig"; do
+        if [ -d "$d/$CNFDIR" ]; then
+            conf_dir="$d/$CNFDIR"
+            break
+        fi
+    done
+    IFS="$OLDIFS"
+
+    # Does $TEXMFVAR expand to a single directory?
+    texmfvar=$(kpsewhich --var-value 'TEXMFVAR')
+    if ! echo "$texmfvar" | grep -e '[,:]'; then 
+        output_file="$texmfvar/$PATH_COMPONENT/$DEFAULT_OUTPUTFILE_BASENAME"
+    else
+        # We don't know what to do in this case, therefore: do nothing unless
+        # the output file is specified with the correponding option.
+        output_file=""
+    fi
+fi
+
+
+# ****************************************************************************
+# *                             Options handling                             *
+# ****************************************************************************
+while true; do
+    case "$1" in
+        -c|--conf-dir) conf_dir="$2"; shift 2 ;;
+        -o|--output-file) 
+            output_file="$2"
+            output_file_specified=1
+            shift 2 ;;
+        --quiet) quiet=1; shift ;;
+        --check) dochecks=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
+your scripts accordingly.\n\n" >&2; quiet=0; shift ;;
+        --help) echo "$usage"; exit 0 ;;
+        --version) echo "$progname $version"; exit 0 ;;
+        --) shift; break ;;
+	*) echo "$progname: unexpected option '$1'; please report a bug." >&2
+            exit 1 ;;
+    esac
+done
+
+# Non-option arguments are not allowed.
+if [ $# -ne 0 ]; then
+    echo "$usage" >&2
+    exit 1
+fi
+
+# In user-specific mode, $conf_dir is required; let's check that.
+if [ $syswide_mode = 0 ]; then
+    if [ -z "$conf_dir" ]; then
+        printf "$progname: "
+        cat >&2 <<EOF
+unable to determine the configuration directory; you can
+specify it with --conf-dir
+EOF
+        exit 1
+    fi
+
+    # Make sure $conf_dir is an absolute path
+    if echo "$conf_dir" | grep -e '^[^/]' >/dev/null; then
+        conf_dir="${PWD}/${conf_dir}"
+    fi
+fi
+
+if [ -z "$output_file" ]; then
+    printf "$progname: "
+    cat >&2 <<EOF
+unable to determine where to write the output; you can specify
+that with --output-file
+EOF
+    exit 1
+fi
+
+perform_sanity_checks
+
+# Make sure the output directory exists (creating it if not) when running
+# in user-specific mode.
+if [ $syswide_mode = 0 ]; then
+    output_dir=$(dirname "$output_file")
+    if [ ! -d "$output_dir" ]; then
+        [ $quiet = 0 ] && printf "Creating directory '${output_dir}'... "
+        if ! mkdir -p "$output_dir"; then
+            echo "$progname: unable to create directory '$output_dir'" >&2
+            exit 1
+        fi
+        [ $quiet = 0 ] && echo "done."
+    fi
+fi
+
+# ****************************************************************************
+# *                               Actual work                                *
+# ****************************************************************************
+if [ $quiet = 0 ]; then
+    if [ -f "$output_file" ]; then
+	printf "Regenerating '${output_file}'... "
+    else
+	printf "Generating '${output_file}'... "
+    fi
+fi
+
+# Creating the temporary file in the output directory gives it automatically
+# the default permissions appropriate for that directory, according to the
+# user's umask. When it is complete, we'll be able to rename it atomically to
+# the desired output file, which will therefore have the right permissions.
+tempfile="${output_file}.new"
+
+confdirs="${SYSWIDE_CONFDIR}/"
+[ $syswide_mode = 0 ] && confdirs="${confdirs}\n#    ${conf_dir}/"
+
+if ! printf "" > "$tempfile" ; then
+    echo "$progname: cannot write to the temporary file '$tempfile'" >&2
+    exit 1
+fi
+
+#
+# we have to make sure that language.def starts out the right way!
+if [ "$HYPHENMODE" = "etex" ] ; then
+    printf "\
+${PCC}${PCC} e-TeX V2.0;2
+
+${PCC} Note: the first line of this file must match the corresponding line
+${PCC} in \"etex.src\" and \"etexdefs.lib\", otherwise fallback will be used.
+\n" >> "$tempfile"
+fi
+
+printf "\
+${PCC} ${PCC}${PCC} This file was automatically generated by ${progname}.
+${PCC}
+${PCC} Please do not edit it directly. If you want to add or change
+${PCC} anything here, please have a look at the files in:
+${PCC}
+${PCC}    $confdirs
+${PCC}
+${PCC} and invoke ${progname}.
+${PCC}
+${PCC} ${PCC}${PCC}\n" >> "$tempfile"
+
+#
+# include the necessary files
+if [ ! "$HYPHENMODE" = "nohyphen" ] ; then
+    # we are creating a hyphenation file, include the head file
+    if [ -r "$HEADFILE" ] ; then
+        cat "$HEADFILE" >> "$tempfile"
+    else
+        echo "${WRITECC} HEADFILE $deffile not found" >> "$tempfile"
+    fi
+fi
+
+# From now on, $tempfile must be deleted on exit; therefore, cleanup() should
+# be used.
+
+if [ $syswide_mode = 1 ]; then
+    find "$SYSWIDE_CONFDIR"             -maxdepth 1 -type f -name '*.'${EXT}
+else
+    find "$SYSWIDE_CONFDIR" "$conf_dir" -maxdepth 1 -type f -name '*.'${EXT}
+fi | swap_basename_and_dirname | LC_COLLATE=C sort | merge_files
+
+#
+# for language.def we have to select the right language at the end
+if [ "$HYPHENMODE" = "etex" ] ; then
+    printf "
+${PCC} ${PCC}${PCC} No changes may be made beyond this point.
+
+\\\\uselanguage {USenglish}             ${PCC} This MUST be the last line of the file.
+" >> "$tempfile"
+elif [ "$HYPHENMODE" = "luatex" ] ; then
+    # for luatex we need the closing brace!
+    echo "}" >> "$tempfile"
+fi
+
+# This is atomic.
+mv "$tempfile" "$output_file"
+
+# Check wether the generated file is decent, if all necessary files are
+# installed, etc.
+if [ "$dochecks" = 1 ] ; then
+    perform_contents_check "$output_file"
+fi
+
+if [ $quiet = 0 ]; then
+    printf "done.\n\n"
+    echo "$progname has updated '$output_file'. If you want to"
+
+    if [ "$progname" = "update-language" ]; then
+        echo "enable the new patterns, you should run fmtutil-sys or fmtutil"
+        echo "(with option --all, or with a particular format specified)."
+    elif [ "$progname" = "update-updmap" ]; then
+	echo "enable the map files with this new file, you should run" \
+             "updmap-sys or updmap."
+    elif [ "$progname" = "update-fmtutil" ]; then
+        echo "enable the new formats,  you should run fmtutil-sys or fmtutil"
+        echo "(with option --all or --missing)."
+    else
+        echo "Unexpected \$progname: '$progname'" >&2
+        exit 1
+    fi
+fi
+
+# vim:set expandtab tabstop=4 autoindent: #

Copied: tex-common/trunk/scripts/update-fmtlang.8 (from rev 5258, tex-common/branches/v3/scripts/update-fmtlang.8)
===================================================================
--- tex-common/trunk/scripts/update-fmtlang.8	                        (rev 0)
+++ tex-common/trunk/scripts/update-fmtlang.8	2012-03-24 07:13:14 UTC (rev 5285)
@@ -0,0 +1,177 @@
+.TH update-fontlang 8 "2006-12-11" "Debian" "Debian User's Manual"
+
+.SH NAME
+update-language, update-fmtutil, update-fmtlang \- update
+various TeX-related configuration files
+
+.SH SYNOPSIS
+.B update-language
+.RI [ options ]
+.br
+.B update-fmtutil
+.RI [ options ]
+.br
+
+.SH DESCRIPTION
+This manual page explains briefly the usage of the three TeX configuration
+update programs
+.B update-language
+and \fBupdate-fmtutil\fP.
+.PP
+The
+.B update-fontlang
+script should not be called directly, but only via the two described links.
+For a more in-depth description, please see the document \fITeX on Debian\fP in
+.I /usr/share/doc/tex-common/TeX-on-Debian.txt.gz
+(also available as HTML and PDF).
+
+The programs \fBupdate-language\fP and
+\fBupdate-fmtutil\fP create or update the configuration files
+\fIlanguage.dat\fP and \fIfmtutil.cnf\fP, respectively.
+These files define 
+the hyphenation patterns to be loaded into LaTeX-related
+TeX formats (\fIlanguage.dat\fP), and the list of formats to be created
+(\fIfmtutil.cnf\fP).
+
+These programs can be used either in system-wide mode if called by root, or
+in a user-specific mode if called by a user without super-user privileges.
+.SH OPTIONS
+.TP
+.BI \-c\  DIR ,\ \-\-conf-dir= DIR
+directory where the user-specific configuration files are looked for in
+user-specific mode (default 
+\fITEXMFCONFIG/language.d\fP for \fBupdate-language\fP
+and \fITEXMFCONFIG/fmt.d\fP for \fBupdate-fmtutil\fP, where \fITEXMFCONFIG\fP
+is usually \fI$HOME/.texmf-config\fP).
+.TP
+.BI \-o\  FILE ,\ \-\-output-file= FILE
+file to write the output to. Per default, in system-wide mode,
+\fBupdate-language\fP writes to 
+\fI/var/lib/texmf/tex/generic/config/language.dat\fP
+and
+\fBupdate-fmtutil\fP writes to
+\fI/var/lib/texmf/web2c/fmtutil.cnf\fP.
+.TP
+.B \-\-checks
+perform sanity checks on the generated config file. Don't use this
+in maintainer scripts.
+.TP
+.B \-\-quiet
+don't write anything to the standard output during normal operation
+.TP
+.B \-\-help
+print a summary of the command-line usage and exit
+.TP
+.B \-\-version
+output version information and exit
+
+.SH USAGE
+
+In system-wide mode, both programs merge those files
+("configuration snippets") with a specific extension in the respective
+configuration directories to produce the final file. These
+configuration directories and extensions are \fIlanguage.d\fP and
+\fB.cnf\fP for \fBupdate-language\fP, 
+and \fIfmt.d\fP and \fB.cnf\fP for \fBupdate-fmtutil\fP.
+In system-wide mode, these directories are those under \fI/etc/texmf/\fP. Both
+TeX add-on packages and local administrators can add files to these
+directories.
+
+If a package that provides such snippets is removed but not purged,
+including the snippet will likely break the system.  To prevent the
+inclusion in these cases, snippets installed by \fIpackages\fP have to
+contain a magic header:
+
+# -_- DebPkgProvidedMaps -_-
+
+which local administrators should \fInot\fP remove.  From the files
+with a magic header, only those files which are also listed in one of
+the files in
+.I /var/lib/tex-common/language-cnf/
+for \fBupdate-language\fP, and
+.I /var/lib/tex-common/fmtutil-cnf/
+for \fBupdate-fmtutil\fP, are actually included into the final output
+file. This way, local changes to the configuration can be preserved
+while the package is in state 'rc' (that is, the package is removed, but its
+configuration files are still present).  For details about this mechanism,
+package maintainers should consult the Debian TeX Policy.  As a
+special case, the files for JadeTeX and xmlTeX are only included if
+there is already a file for the LaTeX format (see \fITeX on Debian\fP
+for details).
+
+The user-specific mode provides a way for a non-admin user to override
+system-wide settings.  In this mode,
+\fBupdate-language\fP writes to 
+\fITEXMFVAR/tex/generic/config/language.dat\fP, and
+\fBupdate-fmtutil\fP writes to
+\fITEXMFVAR/web2c/fmtutil.cnf\fP, where \fITEXMFVAR\fP is usually
+\fI$HOME/.texmf-var\fP. 
+Furthermore, files present within the user-specific configuration
+directories are included \fIin addition\fP to the files present in the
+system-wide configuration directories.  In case the same filename
+exists in the system-wide configuration directory and the
+user-specific configuration directory, the user-specific file is used
+instead of the system-wide one. The user-specific configuration directories
+are
+\fITEXMFCONFIG/language.d\fP for \fBupdate-language\fP and
+\fITEXMFCONFIG/fmt.d\fP
+for \fBupdate-fmtutil\fP, where \fITEXMFCONFIG\fP is usually
+\fI$HOME/.texmf-config\fP. The system-wide configuration directories have the
+same names, but are located in \fI/etc/texmf/\fP instead of \fITEXMFCONFIG\fP.
+
+Note that changes introduced by updates of packages are \fInot\fP
+propagated to the user's configuration files. This has to be done by hand.
+
+.SH FILES
+.TP
+.B /var/lib/texmf/tex/generic/config/language.dat
+This file is generated or updated by \fBupdate-language\fP in system-wide
+mode and contains a list of the hyphenation patterns loaded into
+LaTeX-based formats by \fBfmtutil-sys\fP.
+.TP
+.B /var/lib/texmf/web2c/fmtutil.cnf
+This file is generated or updated by \fBupdate-fmtutil\fP in system-wide
+mode and contains a list of formats to be generated by \fBfmtutil-sys\fP.
+.TP
+.B /etc/texmf/language.d/\fIname\fP.cnf
+Input files for \fBupdate-language\fP
+.TP
+.B /etc/texmf/fmt.d/\fIname\fP.cnf
+Input files for \fBupdate-fmtutil\fP
+.TP
+.B /var/lib/tex-common/language-cnf/\fIpackage\fP.list
+Lists the file(s) installed by \fIpackage\fP in \fI/etc/texmf/language.d/\fP.
+.TP
+.B /var/lib/tex-common/fmtutil-cnf/\fIpackage\fP.list
+Lists the file(s) installed by \fIpackage\fP in \fI/etc/texmf/fmt.d/\fP.
+
+.SH SEE ALSO
+
+.TP
+.B fmtutil(1), fmtutil-sys(1)
+The programs actually using the generated configuration files
+(\fIlanguage.dat\fP and \fIfmtutil.cnf\fP).
+.TP
+.B TeX on Debian Documentation
+to be found in \fI/usr/share/doc/tex-common/TeX-on-Debian.txt.gz\fP (also
+available as HTML and PDF), describing in more detail how to setup
+and maintain a TeX system in Debian. It also includes details on user-specific
+configuration.
+.TP
+.B Debian TeX Policy
+to be found in \fI/usr/share/doc/tex-common/Debian-TeX-Policy.txt.gz\fP (also
+available as HTML and PDF), describing the internals and the TeX Policy
+established on the Debian TeX mailing-list
+(debian-tex-maint at lists.debian.org). Intended audience is mainly developers
+packaging TeX-related resources for Debian.
+.TP
+.B dh_installtex(1)
+a debhelper-like script for managing the installation of files into the
+system-wide configuration directories; this script helps to write Debian
+packages containing TeX-related resources that conform to the Debian TeX
+Policy.
+
+.SH AUTHOR
+This manual page was written by Norbert Preining <preining at debian.org>
+for the Debian distribution (and may be used by others). It was later updated
+by Florent Rougon <f.rougon at free.fr>.

Deleted: tex-common/trunk/scripts/update-fmtutil.8
===================================================================
--- tex-common/trunk/scripts/update-fmtutil.8	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/update-fmtutil.8	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,38 +0,0 @@
-.TH UPDATE-FMTUTIL 8
-.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
-.\" other parms are allowed: see man(7), man(1)
-.SH NAME
-update-fmtutil \- shell script to generate /var/lib/texmf/web2c/fmtutil.cnf
-.SH SYNOPSIS
-.B update-fmtutil
-.I "[options]"
-.br
-.SH DESCRIPTION
-This manual page documents briefly the
-.BR update-fmtutil
-command.
-This manual page was written for the Debian GNU/Linux distribution
-because the original script was designed for Debian packaging system.
-.PP
-.B update-fmtutil
-is a shell script to generate /var/lib/texmf/web2c/fmtutil.cnf from files
-matching the pattern /etc/texmf/fmt.d/*.cnf.
-.PP
-The tex-common package provides 00tex.cnf only and other TeX-related packages
-can provide their own .cnf files in /etc/texmf/fmt.d/. These files should have
-a name starting with a two-digit integer indicating the order in which
-update-fmtutil is supposed to read them.
-.PP
-A user who wants to customize /var/lib/texmf/web2c/fmtutil.cnf should add, 
-for example, 22local-foo.cnf in /etc/texmf/fmt.d/ and run 'update-fmtutil'.
-.SH OPTIONS
-.TP
-.B \-v
-Show verbose messages (deprecated; will be the default setting soon).
-.TP
-.B \--check
-Executes additional checks that all necessary files are present in the
-kpathsea database. Don't use this in maintainer scripts.
-.SH AUTHOR
-This manual page was written by Atsuhito Kohda <kohda at debian.org>,
-for the Debian GNU/Linux system (but may be used by others).

Deleted: tex-common/trunk/scripts/update-fontlang
===================================================================
--- tex-common/trunk/scripts/update-fontlang	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/update-fontlang	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,810 +0,0 @@
-#!/bin/bash -e
-#
-# update-fontlang --- Generate updmap.cfg, language.dat, fmtutil.cnf
-#                     from a set of files
-# Copyright (C) 2002 Atsuhito Kohda
-# Copyright (C) 2004, 2005, 2006, 2007 Florent Rougon
-# Copyright (C) 2005, 2006, 2009 Norbert Preining
-# Copyright (C) 2007 Frank Küster
-#
-# 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.
-
-version="1.0"
-progname=$(basename "$0")
-
-SYSPATH_BASE=/var/lib/texmf
-
-HYPHENMODE=nohyphen
-
-if [ "$progname" = "update-language" ] ; then
-    update-language-dat
-    update-language-def
-    exit 0
-elif [ "$progname" = "update-language-def" ] ; then
-    CNFDIR=hyphen.d
-    HYPHENMODE=etex
-    # System-wide configuration directory
-    SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
-    CHECKFILE="$SYSWIDE_CONFDIR/00tex.cnf"
-    EXT="cnf"
-    MEMORY_DIR=/var/lib/tex-common/hyphen-cnf
-    PATH_COMPONENT=tex/generic/config
-    SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT"
-    DEFAULT_OUTPUTFILE_BASENAME=language.def
-    SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME"
-    CC="%"                      # for COMMENTCHAR
-    # in printf, %% is one %
-    PCC="%%"                    # for printfCOMMENTCHAR
-    SHORT_DESC="Generate language.def, the hyphenation configuration file for eTeX and friends"
-elif [ "$progname" = "update-language-dat" ] ; then
-    CNFDIR=hyphen.d
-    HYPHENMODE=latex
-    # System-wide configuration directory
-    SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
-    CHECKFILE="$SYSWIDE_CONFDIR/00tex.cnf"
-    EXT="cnf"
-    MEMORY_DIR=/var/lib/tex-common/hyphen-cnf
-    PATH_COMPONENT=tex/generic/config
-    SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT"
-    DEFAULT_OUTPUTFILE_BASENAME=language.dat
-    SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME"
-    CC="%"                      # for COMMENTCHAR
-    # in printf, %% is one %
-    PCC="%%"                    # for printfCOMMENTCHAR
-    SHORT_DESC="Generate language.dat, the hyphenation configuration file for LaTeX"
-elif [ "$progname" = "update-updmap" ] ; then
-    CNFDIR=updmap.d
-    # System-wide configuration directory
-    SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
-    CHECKFILE="$SYSWIDE_CONFDIR/00updmap.cfg"
-    EXT="cfg"
-    MEMORY_DIR=/var/lib/tex-common/fontmap-cfg
-    PATH_COMPONENT=web2c
-    SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT"
-    DEFAULT_OUTPUTFILE_BASENAME=updmap.cfg
-    SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME"
-    CC="#"
-    PCC="#"                     # for printfCOMMENTCHAR
-    SHORT_DESC="Generate an updmap configuration file"
-elif [ "$progname" = "update-fmtutil" ] ; then
-    CNFDIR=fmt.d
-    # System-wide configuration directory
-    SYSWIDE_CONFDIR=/etc/texmf/$CNFDIR
-    CHECKFILE="$SYSWIDE_CONFDIR/00tex.cnf"
-    EXT="cnf"
-    MEMORY_DIR=/var/lib/tex-common/fmtutil-cnf
-    PATH_COMPONENT=web2c
-    SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT"
-    DEFAULT_OUTPUTFILE_BASENAME=fmtutil.cnf
-    SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME"
-    CC="#"
-    PCC="#"                     # for printfCOMMENTCHAR
-    SHORT_DESC="Generate an fmtutil configuration file"
-else
-    echo "Please call me either as update-updmap, update-language, or update-fmtutil!"
-    exit 1
-fi
-
-usage="Usage: $progname [OPTION...]
-${SHORT_DESC}.
-
-Options:
-  -c, --conf-dir=DIR     directory where the user-specific configuration is
-                         looked for in user-specific mode
-  -o, --output-file=FILE file to write the output to (default is
-                         $SYSWIDE_DEFAULT_OUTPUTFILE in system-wide-mode,
-                         and depends on your Kpathsea settings in
-                         user-specific mode)
-      --checks           perform sanity checks on the generated config file
-      --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"
-
-
-DebPkgProvidedMaps_magic_comment="^[#%] -_- DebPkgProvidedMaps -_-"
-
-# This ensures that if $tempfile is in the *environment*, we won't erase
-# the file it could point to in case the script is killed by a signal before
-# it has had a chance to even create its temporary file.
-tempfile=""
-
-
-cleanup()
-{
-    rc=$?
-    [ -n "$tempfile" ] && rm -f "$tempfile"
-    exit $rc
-}
-
-do_one_hyphen_line()
-{
-    line="$1"
-    case "$line" in
-        ${CC}*) echo "$line" >> "$tempfile" ; return ;;
-        USEFILE*) 
-            set -- $line
-            shift
-            datfile="$1"
-            deffile="$2"
-            if [ "$HYPHENMODE" = "etex" ] ; then
-                if [ -r "$deffile" ] ; then
-                    cat "$deffile" >> "$tempfile"
-                else 
-                    echo "${CC} USEFILE $deffile not found" >> "$tempfile"
-                fi
-            else
-                if [ -r "$datfile" ] ; then
-                    cat "$datfile" >> "$tempfile"
-                else 
-                    echo "${CC} USEFILE $datfile not found" >> "$tempfile"
-                fi
-            fi
-            return
-            ;;
-    esac
-    set -- $line
-    name=""
-    lhm=""
-    rhm=""
-    synonyms=""
-    f=""
-    while [ ! "$1" = "" ] ; do
-        case "$1" in
-            name=*) name="${1#name=}" ;;
-            lefthyphenmin=*) lhm="${1#lefthyphenmin=}" ;;
-            righthyphenmin=*) rhm="${1#righthyphenmin=}" ;;
-            synonyms=*) synonyms="${1#synonyms=}" ;;
-            file=*) f="${1#file=}" ;;
-            *) echo "Unknown AddHypen directive ==$line==!" >&2 ; return ;;
-        esac
-        shift
-    done
-    if [ "$name$lhm$rhm$synonyms$f" = "" ] ; then
-        return
-    fi
-    if [ ! "$lhm$rhm$synonyms$f" = "" ] ; then
-        if [ "$name" = "" ] ; then
-            echo "the line $line does not contain a name= directive, ignored!" >&2
-            return
-        fi
-    fi
-    if [ ! "$name$lhm$rhm$synonyms" = "" ] ; then
-        if [ "$f" = "" ] ; then
-            echo "the line $line does not contain a file= directive, ignored!" >&2
-            return
-        fi
-    fi
-    if [ "$HYPHENMODE" = "etex" ] ; then
-        printf '\\'"addlanguage{$name}{$f}{}{$lhm}{$rhm}" >> "$tempfile"
-    else
-        echo "$name $f" >> "$tempfile"
-    fi
-    if [ ! "$synonyms" = "" ] ; then
-        {
-            IFS=",$IFS"
-            for s in $synonyms ; do
-                if [ "$HYPHENMODE" = "etex" ] ; then
-                    printf '\\'"addlanguage{$s}{$f}{}{$lhm}{$rhm}" >> "$tempfile"
-                else
-                    echo "=$s" >> "$tempfile"
-                fi
-            done
-        }
-    fi
-}
-
-include_hyphen_file_core()
-{
-    file="$1"
-    cat "$1" | while read line ; do
-        do_one_hyphen_line "$line"
-    done
-}
-
-# include_file <file path>
-include_file()
-{
-    file="$1"
-
-    printf "\n${PCC}${PCC}${PCC} From file: $file\n" >>"$tempfile"
-    if [ $HYPHENMODE = "nohyphen" ] ; then
-        cat "$file" >>"$tempfile"
-    else
-        include_hyphen_file_core "$file"
-    fi
-    echo "${CC}${CC}${CC} End of file: $file" >>"$tempfile"
-    case "$file" in
-      */10texlive-latex-base.cnf)
-	seen_latex=1
-	;;
-    esac
-}
-
-# do_not_include_file <file path>
-do_not_include_file()
-{
-    file="$1"
-
-    cat >>"$tempfile" <<EOF
-
-$CC$CC
-$CC$CC$CC $file not included because either it wasn't
-$CC$CC$CC up-to-date (conffile update pending) or the package shipping it was
-$CC$CC$CC apparently removed (no corresponding .list file in
-$CC$CC$CC $MEMORY_DIR/).
-$CC$CC
-EOF
-}
-
-# do_not_include_snippet_that_depends_on_a_not_included_snippet <file path>
-do_not_include_snippet_that_depends_on_a_not_included_snippet()
-{
-    file="$1"
-
-    cat >>"$tempfile" <<EOF
-
-$CC$CC
-$CC$CC$CC $file not included because it depends
-$CC$CC$CC on another file that is not included here. For instance, jadetex and
-$CC$CC$CC xmltex snippets are not included in fmtutil.cnf when the snippet for
-$CC$CC$CC LaTeX isn't included itself. This is because the jadetex and xmltex
-$CC$CC$CC formats need the LaTeX format when being built (see bug #427562).
-$CC$CC
-EOF
-}
-
-# swap_basename_and_dirname
-#
-# This function expects a file path on every line of stdin and will write
-# on stdout the same lines with the file basename and dirname swapped.
-# This is useful because we want to sort the files from several directories
-# based on their basenames only (the directory they are stored into mustn't
-# influence the order).
-swap_basename_and_dirname()
-{
-    # Use a slash as the separator between basename and dirname so that
-    # files or directories with e.g. spaces in their names are supported.
-    while read file; do
-        echo "$(basename "$file")$(dirname "$file")"
-    done
-}
-
-# check_special_jadetex_xmltex <file path>
-#
-# Special case for jadetex and xmltex: If no latex format information is
-# included so far ($seen_latex is still 0), then we cannot generate the jadetex
-# or xmltex formats, and may not include them in fmtutil.cnf. Even if both
-# packages depend on tl-latex-base, this is still needed, because if
-# tl-base-bin and tl-latex-base are upgraded at the same time, the latex
-# information is not included while tl-base-bin is configured and runs
-# "fmtutil --all" (see bug #427562).
-#
-# Return value:
-#
-#   - 0 if:
-#       * we are being called as update-fmtutil;
-#       * and <file path> points to 40jadetex.cnf or 40xmltex.cnf;
-#       * and $seen_latex=0.
-#
-#   - 1 in all other cases.
-check_special_jadetex_xmltex()
-{
-  [ "$progname" = update-fmtutil ] || return 1
-  
-  file="$1"
-
-  case "$file" in
-    */40jadetex.cnf|*/40xmltex.cnf)
-      if [ $seen_latex = 0 ]; then
-          return 0
-      fi
-      ;;
-  esac
-
-  return 1
-}
-
-# handle_file <file path>
-#
-# <file path> must point to an update-fontlang configuration file (such as
-# /etc/texmf/updmap.d/05tetex-extra.cfg). The function decides whether the file
-# should be included in $output_file and outputs the corresponding snippet if
-# yes, or a comment explaining why if no.
-handle_file()
-{
-    file="$1"
-
-    # Does the file have a dpkg-new sister?
-    if [ -f "${file}.dpkg-new" ]; then
-      do_not_include_file "$file"
-    else
-      # Does the file have the magic comment?
-      if grep -E "$DebPkgProvidedMaps_magic_comment" "$file" >/dev/null; then
-        # Is the package "$file" comes from still installed?
-        if [ -d "$MEMORY_DIR" ] \
-            && find "$MEMORY_DIR" -type f -name '*.list' -print0 \
-            | xargs -0r cat \
-            | grep -E "^$(basename "$file" ".$EXT")\$" >/dev/null;
-	then
-	  if check_special_jadetex_xmltex "$file"; then
-              do_not_include_snippet_that_depends_on_a_not_included_snippet \
-                "$file"
-          else
-            include_file "$file"
-	  fi
-        else
-            do_not_include_file "$file"
-        fi
-      else
-        include_file "$file"
-      fi
-    fi
-}
-
-# merge_files
-#
-# This function expects on the standard input a sorted list of update-updmap
-# configuration files (such as /etc/texmf/updmap.d/05tetex-extra.cfg). Each of
-# them should be listed on a line by itself with the basename being the
-# *first* component of the path, e.g.:
-#
-#   05tetex-extra.cfg/etc/texmf/updmap.d
-#
-# (where 05 should be at the beginning of the line, with no leading spaces, of
-# course). This is so because the sort operation presumably performed by the
-# caller of this function should sort on the basenames of the files,
-# regardless of the directories they come from.
-#
-# Since the list is expected to be sorted, if several files have the same
-# basename, they will be found on consecutive lines.
-#
-# The function calls handle_file() for every file in the list, but only once
-# for a single basename. If several files with the same basename are listed
-# from several directories, only the one in $conf_dir will be passed to
-# handle_file. This allows user-defined .cfg files to override system .cfg
-# files (those in /etc). The order of the files is preserved:
-# handle_file() will receive them as they came on stdin, except that it will
-# be called only once for each basename.
-#
-# handle_file receives the file path in the usual order (directory/basename).
-merge_files()
-{
-    # We will procede the list focusing on the last two elements in order to
-    # handle the case of several files in a row having the same basename.
-    lastfile=""
-    lastdir=""
-    # Overloaded files are files with the same basename that were found in
-    # several directories.
-    overloaded=0
-    # In case we are being called as update-fmtutil, seen_latex tells whether
-    # we have included the snippet for the LaTeX format so far. This is
-    # useful, because the snippets for formats that depend on LaTeX such
-    # jadetex and xmltex should only be included along with the snippet for
-    # the LaTeX format (see bug #427562).
-    seen_latex=0
-
-    while read line; do
-        filename="${line%%/*}"
-        dirname="/${line#*/}"
-        if [ -n "$lastfile" ]; then
-            if [ "$lastfile" != "$filename" ]; then
-                # For overloaded files, use the one in $conf_dir.
-                if [ $overloaded = 1 ]; then
-                    overloaded=0
-                    dir="$conf_dir"
-                else
-                    dir="$lastdir"
-                fi
-                handle_file "$dir/$lastfile"
-            else
-                overloaded=1
-            fi
-        fi
-        lastdir="$dirname"
-        lastfile="$filename"
-    done
-
-    # Test whether there was at least one line to read from stdin
-    if [ -n "$lastdir" ]; then
-        # The last file is still in the pipe; get it out.
-        if [ $overloaded = 1 ]; then
-            dir="$conf_dir"
-        else
-            dir="$lastdir"
-        fi
-        handle_file "$dir/$lastfile"
-    fi
-}
-
-perform_sanity_checks()
-{
-    if [ -L "$output_file" ]; then
-        # This might cause errors, so do not skip this echo when quiet.
-        echo "$progname: $output_file is a symbolic link; won't do anything" >&2
-        exit 0
-    fi
-
-    if ! [ -r "$CHECKFILE" ] ; then
-        echo "$progname: cannot read $CHECKFILE" >&2
-        exit 1
-    fi
-
-    # Check for $DEFAULT_OUTPUTFILE_BASENAME in wrong places (currently,
-    # only enabled for update-updmap), if running in system-wide mode.
-    if [ $syswide_mode = 1 ] && [ "$progname" = "update-updmap" ]; then
-        badly_located_cfg_file="/etc/texmf/web2c/$DEFAULT_OUTPUTFILE_BASENAME"
-        badly_used_prg=updmap-sys
-        bad_options="--edit, --syncwithtrees, etc."
-
-        if [ -e "$badly_located_cfg_file" ]; then
-            printf "\
-Error: '$badly_located_cfg_file' should not exist when using the
-       Debian teTeX or TeX Live packages. Presumably, you used ${badly_used_prg} 
-       in maintainance mode (options ${bad_options}).
-       This shouldn't be done with the Debian teTeX or TeX Live packages.
-       Instead, you should edit the files in ${SYSWIDE_CONFDIR}/ and run
-       ${progname}, mktexlsr and ${badly_used_prg}.
-       Please remove '$badly_located_cfg_file' and try again.\n" >&2
-            exit 1
-        fi
-    fi
-
-    # It could be that there is a DEFAULT_OUTPUTFILE_BASENAME file 
-    # in TEXMFCONFIG, which would be found by kpathsea instead of the
-    # output_file. So we check for this and give a warning in case
-    # the created file would be shadowed.
-    if [ $syswide_mode = 0 ] && [ $output_file_specified = 0 ]; then
-        OLDIFS="$IFS"
-        IFS=:
-        for d in "$texmfconfig"; do
-            if [ ! "$d/$PATH_COMPONENT/$DEFAULT_OUTPUTFILE_BASENAME" \
-                 = "$output_file" ] \
-                && [ -f "$d/$PATH_COMPONENT/$DEFAULT_OUTPUTFILE_BASENAME" ];
-                then
-                printf "\
-You are about to generate the file 
-        $output_file
-but at the same time you have a file
-        $d/$PATH_COMPONENT/$DEFAULT_OUTPUTFILE_BASENAME
-which will shadow the former. We'll continue generating the first
-file, but to allow TeX and friends to find it, you'll have to remove the
-second one.\n"
-                # Don't break out as we want to warn the user for *every*
-                # shadowing file!
-            fi
-        done
-        IFS="$OLDIFS"
-    fi
-}
-
-# perform_contents_check
-#
-# This function *TRIES* to check wether the installed files are correct in
-# the sense that every file occurring in it is present. This can help to
-# find typing errors
-perform_contents_check ()
-{
-    #
-    # performing contents checking only works when kpsewhich is present
-    # and configured, this can be done in one step:
-    if kpsewhich --version  >/dev/null 2>&1 ; then
-        if [ "$progname" = "update-language" ] ; then
-            perform_contents_check_language "$1"
-        elif [ "$progname" = "update-updmap" ] ; then
-            perform_contents_check_map "$1"
-        elif [ "$progname" = "update-fmtutil" ] ; then
-            perform_contents_check_format "$1"
-        fi
-    fi
-}
-
-perform_contents_check_language ()
-{
-    fn="$1"
-    grep -v '^\W*\(%\|=\|$\)' "$fn" | while read lang hyph comm ; do
-        # now check the existence of the hyphenation file
-        if [ -z $(kpsewhich -format=tex $hyph) ] ; then
-           cat >&2 <<EOF
-The config file $fn references a file not in the kpathsea database:
-    $hyph
-This may be ok, but it could also be a typing error.
-EOF
-        fi
-    done
-}
-        
-perform_contents_check_map ()
-{
-    fn="$1"
-    grep -i '^\W*\(Mixed\)\?Map' "$fn" | while read foo map ; do
-        # now check the existence of the hyphenation file
-        if [ -z $(kpsewhich -format=map $map) ] ; then
-           cat >&2 <<EOF
-The config file $fn references a file not in the kpathsea database:
-    $map
-Calling updmap(-sys) will break!
-This may be ok, but it could also be a typing error.
-EOF
-        fi
-    done
-}
-
-perform_contents_check_format ()
-{
-    fn="$1"
-    grep -v '^\W*\(#\|$\)' "$fn" | while read format engine hyphenation args ; do
-        # this is stolen from fmtutil
-        set -- $args
-        pool=; tcx=
-        texargs="$@"
-        eval lastarg=\$$#
-        inifile=$(echo $lastarg | sed 's%^\*%%')
-        case "$engine" in
-            mpost)  kpsefmt=mpost;;
-            mf|mfw|mf-nowin) kpsefmt=mf;;
-            *)      kpsefmt=tex;;
-        esac
-        # now check the existence of the hyphenation file
-        if [ -z $(kpsewhich -progname=$format -format=$kpsefmt $inifile) ] ; then
-           cat >&2 <<EOF
-The config file $fn references a file not in the kpathsea database:
-    $inifile
-This may be ok, but it could also be a typing error.
-EOF
-        fi
-    done
-}
-
-
-# The list of signals to trap is taken from teTeX 3's updmap script, but they
-# have been converted to signal names because we can only rely on these on
-# POSIX systems.
-trap 'cleanup' HUP INT QUIT BUS PIPE TERM
-
-
-# -v (verbose) is here for backward compatibility only.
-TEMP=$(getopt -o +vc:o: --longoptions \
-    conf-dir:,output-file:,check,quiet,help,version \
-    -n "$progname" -- "$@")
-
-case $? in
-    0) : ;;
-    1) echo "$usage" >&2; exit 1 ;;
-    *) exit 1 ;;
-esac
-
-# Don't remove the quotes around $TEMP!
-eval set -- "$TEMP"
-
-# Determine whether we will run in system-wide mode or in user-specific mode
-if [ "$(id -u)" -eq 0 ]; then
-    syswide_mode=1
-else
-    syswide_mode=0
-fi
-
-
-# ****************************************************************************
-# *                                 Defaults                                 *
-# ****************************************************************************
-quiet=1
-dochecks=0
-output_file_specified=0
-
-if [ $syswide_mode = 1 ]; then
-    output_file="$SYSWIDE_DEFAULT_OUTPUTFILE"
-else
-    # If tetex-bin is not installed, kpsewhich is not available, and we cannot 
-    # do anything
-    if ! which kpsewhich >/dev/null; then
-	echo "kpsewhich isn't available. Cannot create" \
-             "$DEFAULT_OUTPUTFILE_BASENAME in user-specific mode." >&2
-	exit 1
-    fi
-    # Is there an updmap.d/language.d directory somewhere in the expansion of
-    # $TEXMFCONFIG?
-    conf_dir=""
-    texmfconfig=$(kpsewhich --expand-path '$TEXMFCONFIG')
-    OLDIFS="$IFS"
-    IFS=:
-    for d in "$texmfconfig"; do
-        if [ -d "$d/$CNFDIR" ]; then
-            conf_dir="$d/$CNFDIR"
-            break
-        fi
-    done
-    IFS="$OLDIFS"
-
-    # Does $TEXMFVAR expand to a single directory?
-    texmfvar=$(kpsewhich --var-value 'TEXMFVAR')
-    if ! echo "$texmfvar" | grep -e '[,:]'; then 
-        output_file="$texmfvar/$PATH_COMPONENT/$DEFAULT_OUTPUTFILE_BASENAME"
-    else
-        # We don't know what to do in this case, therefore: do nothing unless
-        # the output file is specified with the correponding option.
-        output_file=""
-    fi
-fi
-
-
-# ****************************************************************************
-# *                             Options handling                             *
-# ****************************************************************************
-while true; do
-    case "$1" in
-        -c|--conf-dir) conf_dir="$2"; shift 2 ;;
-        -o|--output-file) 
-            output_file="$2"
-            output_file_specified=1
-            shift 2 ;;
-        --quiet) quiet=1; shift ;;
-        --check) dochecks=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
-your scripts accordingly.\n\n" >&2; quiet=0; shift ;;
-        --help) echo "$usage"; exit 0 ;;
-        --version) echo "$progname $version"; exit 0 ;;
-        --) shift; break ;;
-	*) echo "$progname: unexpected option '$1'; please report a bug." >&2
-            exit 1 ;;
-    esac
-done
-
-# Non-option arguments are not allowed.
-if [ $# -ne 0 ]; then
-    echo "$usage" >&2
-    exit 1
-fi
-
-# In user-specific mode, $conf_dir is required; let's check that.
-if [ $syswide_mode = 0 ]; then
-    if [ -z "$conf_dir" ]; then
-        printf "$progname: "
-        cat >&2 <<EOF
-unable to determine the configuration directory; you can
-specify it with --conf-dir
-EOF
-        exit 1
-    fi
-
-    # Make sure $conf_dir is an absolute path
-    if echo "$conf_dir" | grep -e '^[^/]' >/dev/null; then
-        conf_dir="${PWD}/${conf_dir}"
-    fi
-fi
-
-if [ -z "$output_file" ]; then
-    printf "$progname: "
-    cat >&2 <<EOF
-unable to determine where to write the output; you can specify
-that with --output-file
-EOF
-    exit 1
-fi
-
-perform_sanity_checks
-
-# Make sure the output directory exists (creating it if not) when running
-# in user-specific mode.
-if [ $syswide_mode = 0 ]; then
-    output_dir=$(dirname "$output_file")
-    if [ ! -d "$output_dir" ]; then
-        [ $quiet = 0 ] && printf "Creating directory '${output_dir}'... "
-        if ! mkdir -p "$output_dir"; then
-            echo "$progname: unable to create directory '$output_dir'" >&2
-            exit 1
-        fi
-        [ $quiet = 0 ] && echo "done."
-    fi
-fi
-
-# ****************************************************************************
-# *                               Actual work                                *
-# ****************************************************************************
-if [ $quiet = 0 ]; then
-    if [ -f "$output_file" ]; then
-	printf "Regenerating '${output_file}'... "
-    else
-	printf "Generating '${output_file}'... "
-    fi
-fi
-
-# Creating the temporary file in the output directory gives it automatically
-# the default permissions appropriate for that directory, according to the
-# user's umask. When it is complete, we'll be able to rename it atomically to
-# the desired output file, which will therefore have the right permissions.
-tempfile="${output_file}.new"
-
-confdirs="${SYSWIDE_CONFDIR}/"
-[ $syswide_mode = 0 ] && confdirs="${confdirs}\n#    ${conf_dir}/"
-
-if ! printf "" > "$tempfile" ; then
-    echo "$progname: cannot write to the temporary file '$tempfile'" >&2
-    exit 1
-fi
-
-#
-# we have to make sure that language.def starts out the right way!
-if [ "$HYPHENMODE" = "etex" ] ; then
-    printf "\
-${PCC}${PCC} e-TeX V2.0;2
-
-${PCC} Note: the first line of this file must match the corresponding line
-${PCC} in \"etex.src\" and \"etexdefs.lib\", otherwise fallback will be used.
-\n" >> "$tempfile"
-fi
-
-printf "\
-${PCC}${PCC}${PCC} This file was automatically generated by ${progname}.
-${PCC}
-${PCC} Please do not edit it directly. If you want to add or change
-${PCC} anything here, please have a look at the files in:
-${PCC}
-${PCC}    $confdirs
-${PCC}
-${PCC} and invoke ${progname}.
-${PCC}
-${PCC}${PCC}${PCC}\n" >> "$tempfile"
-
-# From now on, $tempfile must be deleted on exit; therefore, cleanup() should
-# be used.
-
-if [ $syswide_mode = 1 ]; then
-    find "$SYSWIDE_CONFDIR"             -maxdepth 1 -type f -name '*.'${EXT}
-else
-    find "$SYSWIDE_CONFDIR" "$conf_dir" -maxdepth 1 -type f -name '*.'${EXT}
-fi | swap_basename_and_dirname | LC_COLLATE=C sort | merge_files
-
-#
-# for language.def we have to select the right language at the end
-if [ "$HYPHENMODE" = "etex" ] ; then
-    printf "
-${PCC}${PCC}${PCC} No changes may be made beyond this point.
-
-\\\\uselanguage {USenglish}             ${PCC}${PCC}${PCC} This MUST be the last line of the file.
-" >> "$tempfile"
-fi
-
-# This is atomic.
-mv "$tempfile" "$output_file"
-
-# Check wether the generated file is decent, if all necessary files are
-# installed, etc.
-if [ "$dochecks" = 1 ] ; then
-    perform_contents_check "$output_file"
-fi
-
-if [ $quiet = 0 ]; then
-    printf "done.\n\n"
-    echo "$progname has updated '$output_file'. If you want to"
-
-    if [ "$progname" = "update-language" ]; then
-        echo "enable the new patterns, you should run fmtutil-sys or fmtutil"
-        echo "(with option --all, or with a particular format specified)."
-    elif [ "$progname" = "update-updmap" ]; then
-	echo "enable the map files with this new file, you should run" \
-             "updmap-sys or updmap."
-    elif [ "$progname" = "update-fmtutil" ]; then
-        echo "enable the new formats,  you should run fmtutil-sys or fmtutil"
-        echo "(with option --all or --missing)."
-    else
-        echo "Unexpected \$progname: '$progname'" >&2
-        exit 1
-    fi
-fi
-
-# vim:set expandtab tabstop=4: #

Deleted: tex-common/trunk/scripts/update-fontlang.1
===================================================================
--- tex-common/trunk/scripts/update-fontlang.1	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/update-fontlang.1	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,198 +0,0 @@
-.TH update-fontlang 1 "2006-12-11" "Debian" "Debian User's Manual"
-
-.SH NAME
-update-updmap, update-language, update-fmtutil, update-fontlang \- update
-various TeX-related configuration files
-
-.SH SYNOPSIS
-.B update-updmap
-.RI [ options ]
-.br
-.B update-language
-.RI [ options ]
-.br
-.B update-fmtutil
-.RI [ options ]
-.br
-
-.SH DESCRIPTION
-This manual page explains briefly the usage of the three TeX configuration
-update programs
-.B update-updmap, update-language
-and \fBupdate-fmtutil\fP.
-.PP
-The
-.B update-fontlang
-script should not be called directly, but only via the three described links.
-For a more in-depth description, please see the document \fITeX on Debian\fP in
-.I /usr/share/doc/tex-common/TeX-on-Debian.txt.gz
-(also available as HTML and PDF).
-
-The programs \fBupdate-updmap\fP, \fBupdate-language\fP and
-\fBupdate-fmtutil\fP create or update the configuration files
-\fIupdmap.cfg\fP, \fIlanguage.dat\fP and \fIfmtutil.cnf\fP, respectively.
-These files define the the outline fonts available for the TeX system
-(\fIupdmap.cfg\fP), the hyphenation patterns to be loaded into LaTeX-related
-TeX formats (\fIlanguage.dat\fP), and the list of formats to be created
-(\fIfmtutil.cnf\fP).
-
-These programs can be used either in system-wide mode if called by root, or
-in a user-specific mode if called by a user without super-user privileges.
-.SH OPTIONS
-.TP
-.BI \-c\  DIR ,\ \-\-conf-dir= DIR
-directory where the user-specific configuration files are looked for in
-user-specific mode (default: \fITEXMFCONFIG/updmap.d\fP for
-\fBupdate-updmap\fP, \fITEXMFCONFIG/language.d\fP for \fBupdate-language\fP
-and \fITEXMFCONFIG/fmt.d\fP for \fBupdate-fmtutil\fP, where \fITEXMFCONFIG\fP
-is usually \fI$HOME/.texmf-config\fP).
-.TP
-.BI \-o\  FILE ,\ \-\-output-file= FILE
-file to write the output to. Per default, in system-wide mode,
-\fBupdate-updmap\fP writes to 
-\fI/var/lib/texmf/web2c/updmap.cfg\fP,
-\fBupdate-language\fP writes to 
-\fI/var/lib/texmf/tex/generic/config/language.dat\fP
-and
-\fBupdate-fmtutil\fP writes to
-\fI/var/lib/texmf/web2c/fmtutil.cnf\fP.
-.TP
-.B \-\-checks
-perform sanity checks on the generated config file. Don't use this
-in maintainer scripts.
-.TP
-.B \-\-quiet
-don't write anything to the standard output during normal operation
-.TP
-.B \-\-help
-print a summary of the command-line usage and exit
-.TP
-.B \-\-version
-output version information and exit
-
-.SH USAGE
-
-In system-wide mode, all three programs merge those files
-("configuration snippets") with a specific extension in the respective
-configuration directories to produce the final file. These
-configuration directories and extensions are \fIlanguage.d\fP and
-\fB.cnf\fP for \fBupdate-language\fP, \fIupdmap.d\fP and \fB.cfg\fP for
-\fBupdate-updmap\fP, and \fIfmt.d\fP and \fB.cnf\fP for \fBupdate-fmtutil\fP.
-In system-wide mode, these directories are those under \fI/etc/texmf/\fP. Both
-TeX add-on packages and local administrators can add files to these
-directories.
-
-If a package that provides such snippets is removed but not purged,
-including the snippet will likely break the system.  To prevent the
-inclusion in these cases, snippets installed by \fIpackages\fP have to
-contain a magic header:
-
-# -_- DebPkgProvidedMaps -_-
-
-which local administrators should \fInot\fP remove.  From the files
-with a magic header, only those files which are also listed in one of
-the files in
-.I /var/lib/tex-common/fontmap-cfg/
-for \fBupdate-updmap\fP,
-.I /var/lib/tex-common/language-cnf/
-for \fBupdate-language\fP, and
-.I /var/lib/tex-common/fmtutil-cnf/
-for \fBupdate-fmtutil\fP, are actually included into the final output
-file. This way, local changes to the configuration can be preserved
-while the package is in state 'rc' (that is, the package is removed, but its
-configuration files are still present).  For details about this mechanism,
-package maintainers should consult the Debian TeX Policy.  As a
-special case, the files for JadeTeX and xmlTeX are only included if
-there is already a file for the LaTeX format (see \fITeX on Debian\fP
-for details).
-
-The user-specific mode provides a way for a non-admin user to override
-system-wide settings.  In this mode,
-\fBupdate-language\fP writes to 
-\fITEXMFVAR/tex/generic/config/language.dat\fP,
-\fBupdate-updmap\fP writes to 
-\fITEXMFVAR/web2c/updmap.cfg\fP, and
-\fBupdate-fmtutil\fP writes to
-\fITEXMFVAR/web2c/fmtutil.cnf\fP, where \fITEXMFVAR\fP is usually
-\fI$HOME/.texmf-var\fP. 
-Furthermore, files present within the user-specific configuration
-directories are included \fIin addition\fP to the files present in the
-system-wide configuration directories.  In case the same filename
-exists in the system-wide configuration directory and the
-user-specific configuration directory, the user-specific file is used
-instead of the system-wide one. The user-specific configuration directories
-are
-\fITEXMFCONFIG/updmap.d\fP for \fBupdate-updmap\fP,
-\fITEXMFCONFIG/language.d\fP for \fBupdate-language\fP and
-\fITEXMFCONFIG/fmt.d\fP
-for \fBupdate-fmtutil\fP, where \fITEXMFCONFIG\fP is usually
-\fI$HOME/.texmf-config\fP. The system-wide configuration directories have the
-same names, but are located in \fI/etc/texmf/\fP instead of \fITEXMFCONFIG\fP.
-
-Note that changes introduced by updates of packages are \fInot\fP
-propagated to the user's configuration files. This has to be done by hand.
-
-.SH FILES
-.TP
-.B /var/lib/texmf/tex/generic/config/language.dat
-This file is generated or updated by \fBupdate-language\fP in system-wide
-mode and contains a list of the hyphenation patterns loaded into
-LaTeX-based formats by \fBfmtutil-sys\fP.
-.TP
-.B /var/lib/texmf/web2c/updmap.cfg
-This file is generated or updated by \fBupdate-updmap\fP in system-wide
-mode and contains a list of map files to be included
-into the lists of outline fonts generated by \fBupdmap-sys\fP.
-.TP
-.B /var/lib/texmf/web2c/fmtutil.cnf
-This file is generated or updated by \fBupdate-fmtutil\fP in system-wide
-mode and contains a list of formats to be generated by \fBfmtutil-sys\fP.
-.TP
-.B /etc/texmf/language.d/\fIname\fP.cnf
-Input files for \fBupdate-language\fP
-.TP
-.B /etc/texmf/updmap.d/\fIname\fP.cfg
-Input files for \fBupdate-updmap\fP
-.TP
-.B /etc/texmf/fmt.d/\fIname\fP.cnf
-Input files for \fBupdate-fmtutil\fP
-.TP
-.B /var/lib/tex-common/language-cnf/\fIpackage\fP.list
-Lists the file(s) installed by \fIpackage\fP in \fI/etc/texmf/language.d/\fP.
-.TP
-.B /var/lib/tex-common/fontmap-cfg/\fIpackage\fP.list
-Lists the file(s) installed by \fIpackage\fP in \fI/etc/texmf/updmap.d/\fP.
-.TP
-.B /var/lib/tex-common/fmtutil-cnf/\fIpackage\fP.list
-Lists the file(s) installed by \fIpackage\fP in \fI/etc/texmf/fmt.d/\fP.
-
-.SH SEE ALSO
-
-.TP
-.B updmap(1), updmap-sys(1), fmtutil(1), fmtutil-sys(1)
-The programs actually using the generated configuration files
-(\fIupdmap.cfg\fP, \fIlanguage.dat\fP and \fIfmtutil.cnf\fP).
-.TP
-.B TeX on Debian Documentation
-to be found in \fI/usr/share/doc/tex-common/TeX-on-Debian.txt.gz\fP (also
-available as HTML and PDF), describing in more detail how to setup
-and maintain a TeX system in Debian. It also includes details on user-specific
-configuration.
-.TP
-.B Debian TeX Policy
-to be found in \fI/usr/share/doc/tex-common/Debian-TeX-Policy.txt.gz\fP (also
-available as HTML and PDF), describing the internals and the TeX Policy
-established on the Debian TeX mailing-list
-(debian-tex-maint at lists.debian.org). Intended audience is mainly developers
-packaging TeX-related resources for Debian.
-.TP
-.B dh_installtex(1)
-a debhelper-like script for managing the installation of files into the
-system-wide configuration directories; this script helps to write Debian
-packages containing TeX-related resources that conform to the Debian TeX
-Policy.
-
-.SH AUTHOR
-This manual page was written by Norbert Preining <preining at debian.org>
-for the Debian distribution (and may be used by others). It was later updated
-by Florent Rougon <f.rougon at free.fr>.

Deleted: tex-common/trunk/scripts/update-fontlang.8.old
===================================================================
--- tex-common/trunk/scripts/update-fontlang.8.old	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/update-fontlang.8.old	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,39 +0,0 @@
-.TH UPDATE-FONTLANG 8
-.SH NAME
-update-fontlang \- helper script for tex-common
-.SH SYNOPSIS
-.B update-language
-.I "[options]"
-.br
-.B update-updmap
-.I "[options]"
-.br
-.B update-fmtutil
-.I "[options]"
-.br
-.SH DESCRIPTION
-.BR update-fontlang
-should be called as 
-.B update-updmap
-or
-.B update-language
-or
-.B update-fmtutil.
-Depending on the name it is called with, it behaves as described in
-the respective manual pages.  It should not be called directly
-.PP
-.SH SEE ALSO
-.PP
-.BR update-language (8),
-.BR update-updmap (1),
-.BR update-fmtutil (1);
-further information can be found in the Debian TeX Policy, 
-.B /usr/share/doc/tex-common/Debian-TeX-Policy.txt.gz
-and the TeX on Debian documentation,
-.B /usr/share/doc/tex-common/TeX-on-Debian.txt.gz
-.PP
-.SH AUTHOR
-This manual page was written by Frank K\[:u]ster <frank at debian.org>,
-for the Debian GNU/Linux system, but may be used by others under the
-terms of the GNU General Public License, either version 2 or any later
-version. 

Deleted: tex-common/trunk/scripts/update-language-dat
===================================================================
--- tex-common/trunk/scripts/update-language-dat	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/update-language-dat	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1 +0,0 @@
-link update-fontlang
\ No newline at end of file

Deleted: tex-common/trunk/scripts/update-language-def
===================================================================
--- tex-common/trunk/scripts/update-language-def	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/update-language-def	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1 +0,0 @@
-link update-fontlang
\ No newline at end of file

Deleted: tex-common/trunk/scripts/update-language.8
===================================================================
--- tex-common/trunk/scripts/update-language.8	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/update-language.8	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,164 +0,0 @@
-.Dd Dec 2, 2004
-.Os Debian
-.Dt UPDATE-LANGUAGE 8 SMM
-.Sh NAME
-.Nm update-language
-.Nd generate
-.Pa /var/lib/texmf/tex/generic/config/language.dat
-from files in
-.Pa /etc/texmf/language.d/
-.Sh SYNOPSIS
-.Nm
-.Bk
-.Op Ar option ...
-.Ek
-.Sh DESCRIPTION
-This manual page documents
-.Nm ,
-a program that was written for the Debian distribution.
-.Ss Overview
-.Nm
-is used to generate the hyphenation configuration file
-.Pa /var/lib/texmf/tex/generic/config/language.dat
-which determines which hyphenation patterns will be available in the
-LaTeX, pdfLaTeX, and some other formats, from the files with names ending in
-.Ql .cnf
-located in
-.Pa /etc/texmf/language.d/ .
-.Pp
-With the underlying mechanism, system
-administrators can disable languages they want by commenting their
-entries in the appropriate files under
-.Pa /etc/texmf/language.d/ ,
-or add files defining language names for locally installed patterns.
-Such changes will be preserved if the package in question is removed
-(not purged) and then reinstalled.
-.Pp
-The TeX packages provide basic hyphenation pattern configuration files in
-.Pa /etc/texmf/language.d/ ,
-Thanks to
-.Nm ,
-TeX-related packages that provide additional patterns can have their own
-language definitions referenced in
-.Pa /var/lib/texmf/tex/generic/config/language.dat
-without having to edit that file. 
-.Pp
-The packages simply have to ship their pattern files in the appropriate
-TDS locations and a
-.Ql .cnf
-file under
-.Pa /etc/texmf/language.d/
-(e.g.,
-.Pa  10foo.cnf )
-defining the language names for the pattern files.
-.Ss "Mode of operation"
-.Nm
-concatenates all the
-.Ql .cnf
-files under
-.Pa /etc/texmf/language.d/
-provided that:
-.Bl -dash -offset indent -compact
-.It
-they do not contain the following pseudo-comment:
-.Bd -literal -offset indent
-% -_- DebPkgProvidedMaps -_-
-.Ed
-.Pp
-or;
-.It
-they have this pseudo-comment and are listed in a
-.Ql .list
-file under
-.Pa /var/lib/tex-common/language-cnf ,
-meaning that the package shipping the
-.Ql .cnf
-file is installed. The name of the
-.Ql .list
-file is ignored (but should be the name of the package that installed
-it). The file should contain the names of the 
-.Ql .cnf
-files in 
-.Pa /etc/texmf/language.d/
-that should be enabled, without the
-.Ql .cnf
-suffix, e.g. 
-.Bd -literal -offset indent
-10foo
-12bar
-.Ed
-.El
-.Pp
-The first case is for configuration files added by the local system
-administrator. Files that contain the magic pseudo-comment should be
-used by Debian packages. In this case, only the base name should appear
-in the
-.Ql .list
-file: for instance,
-.Ql 10foo
-for
-.Pa /etc/texmf/language.d/10foo.cnf ;
-please refer to the Debian TeX Policy for details.
-.Pp
-The order used to process the
-.Ql .cnf
-files is obtained by running
-.Xr sort 1
-with the
-.Sq C
-locale (for ordinary alphanumeric characters, it corresponds to the
-.Tn ASCII
-order).  The result obtained by concatenating them is stored as the new
-.Pa /var/lib/texmf/tex/generic/config/language.dat
-.Pp
-.Ss "Options"
-.Bl -tag -width ".Fl -version"
-.It Fl -quiet
-don't write anything to the standard output during normal operation
-.It Fl -check
-Executes additional checks that all necessary files are present in the
-kpathsea database. Don't use this in maintainer scripts.
-.It Fl -help
-print a summary of the command-line usage of
-.Nm
-and exit
-.It Fl -version
-output version information and exit
-.El
-.Pp
-Note that the
-.Fl v
-option, which turns on verbose mode, is deprecated.  We are currently in a
-transition phase where quiet mode is still the default (therefore,
-.Fl -quiet
-has no effect), but
-.Nm
-will be verbose by default as soon as enough packages use
-.Fl -quiet
-in their maintainer scripts.
-.Sh FILES
-.Bd -unfilled -offset left -compact
-.Pa /etc/texmf/language.d/*.cnf
-.Pa /var/lib/texmf/tex/generic/config/language.dat
-.Pa /var/lib/tex-common/language-cnf/*.list
-.Ed
-.Sh DIAGNOSTICS
-.Nm
-returns 0 on success, or a strictly positive integer on error.
-.Sh SEE ALSO
-The Debian TeX Policy in /usr/share/tex-common/
-.Sh AUTHORS
-This manual page was written by
-.An -nosplit
-.An Frank K\[:u]ster Aq frank at debian.org
-based on older texts by
-.An Atsuhito Kohda Aq kohda at debian.org
-and
-.An "Florent Rougon" Aq f.rougon at free.fr
-for the Debian distribution (and may be used by others).
-.\" For Emacs:
-.\" Local Variables:
-.\" fill-column: 72
-.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\|	\\|  \\)[ 	\n]*"
-.\" sentence-end-double-space: t
-.\" End:

Modified: tex-common/trunk/scripts/update-texmf
===================================================================
--- tex-common/trunk/scripts/update-texmf	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/update-texmf	2012-03-24 07:13:14 UTC (rev 5285)
@@ -5,10 +5,8 @@
 set -e
 
 TXMF=/etc/texmf
-TXMF_CNF=$TXMF/texmf.cnf
+TXMF_CNF=$TXMF/web2c/texmf.cnf
 CNFDIR=${TXMF}/texmf.d
-VARD=/var/lib/texmf/web2c
-MD5SUMS=/usr/share/tex-common/texmf.cnf.md5sum.d/
 TMPDIR=`mktemp -d`
 TMPTXMF=`mktemp -p ${TMPDIR} texmfXXXXXXX`
 
@@ -38,25 +36,25 @@
   exit 1
 fi
 
-if [ -f ${CNFDIR}/05TeXMF.cnf ] ; then
-  CNFFILES=`/bin/ls -1 ${CNFDIR}/*.cnf`
-  if [ $DEBUG = true ]; then
-    echo "Using the following files:"
-    for file in $CNFFILES; do
-      echo $file
-    done
-  fi
-else
-  echo "update-texmf: Basic configuration file ${CNFDIR}/05TeXMF.cnf missing." >&2
-  echo "Exiting." >&2
-exit 1
+CNFFILES=`find ${CNFDIR} -name \*.cnf -print`
+if [ $DEBUG = true ]; then
+  echo "Using the following files:"
+  for file in $CNFFILES; do
+    echo $file
+  done
 fi
 
+if [ -z "$CNFFILES" ] ; then
+  # no config files are found, remove texmf.cnf if it is there
+  rm -rf /etc/texmf/web2c/texmf.cnf
+  exit 0
+fi
+
 if [ "${VERBOSE}" = "true" ]; then
-  if [ -f "${TXMF}/texmf.cnf" ]; then
-    echo -n "Merging information from /etc/texmf/texmf.d/ into ${TXMF}/texmf.cnf ... " >&2
+  if [ -f "${TXMF_CNF}" ]; then
+    echo -n "Merging information from /etc/texmf/texmf.d/ into ${TXMF_CNF} ... " >&2
   else
-    echo -n "Generating ${TXMF}/texmf.cnf ... " >&2
+    echo -n "Generating ${TXMF_CNF} ... " >&2
   fi
 fi
 
@@ -66,11 +64,6 @@
 % PLEASE DO NOT EDIT THIS FILE DIRECTLY. It is meant to be generated from 
 % files in /etc/texmf/texmf.d/. 
 %
-% While changes made by users will not be overwritten, they will cause
-% you trouble. You will be shown the differences between the edited and
-% the newly created file. We will try to merge our and your changes, but
-% that might not always work, and you will probably have to edit again.
-%
 % Therefore, if you want a smooth upgrade, please edit the files
 % in ${CNFDIR}, 
 % or create an additional one (with the extension '.cnf'),
@@ -81,22 +74,29 @@
 EOF
 
 for i in ${CNFFILES}; do
+    if [ $i == "/etc/texmf/texmf.d/05TeXMF.cnf" ] ||
+       [ $i == "/etc/texmf/texmf.d/15Plain.cnf" ] ||
+       [ $i == "/etc/texmf/texmf.d/45TeXinputs.cnf" ] ||
+       [ $i == "/etc/texmf/texmf.d/55Fonts.cnf" ] ||
+       [ $i == "/etc/texmf/texmf.d/65BibTeX.cnf" ] ||
+       [ $i == "/etc/texmf/texmf.d/75DviPS.cnf" ] ||
+       [ $i == "/etc/texmf/texmf.d/80DVIPDFMx.cnf" ] ||
+       [ $i == "/etc/texmf/texmf.d/85Misc.cnf" ] ||
+       [ $i == "/etc/texmf/texmf.d/90TeXDoc.cnf" ] ||
+       [ $i == "/etc/texmf/texmf.d/95NonPath.cnf" ] ; then
+       echo "Ignoring $i during generation of texmf.cnf, please remove manually!" >&2
+       echo "%%% IGNORED: $i" >> ${TMPTXMF}
+       continue
+    fi
     echo "%%% From file: $i" >> ${TMPTXMF}
     cat $i >> ${TMPTXMF}
     echo "%%% End of file: $i" >> ${TMPTXMF}
 done
 
-# now copy the file with historical md5sums into TMPDIR, 
-# invoke ucf, and then remove the suggested texmf.cnf.
-cp -a ${MD5SUMS} ${TMPTXMF}.md5sum.d
-ucf --debconf-ok --three-way ${TMPTXMF} ${TXMF}/texmf.cnf
-if [ $DEBUG = true ]; then
-  echo
-  echo -n "Keeping temporary file ${TMPTXMF} ... "
-else
-  rm -r ${TMPDIR}
-fi
-chmod 644 ${TXMF}/texmf.cnf
+mkdir -p ${TXMF}/web2c
+cp ${TMPTXMF} ${TXMF_CNF}
+rm -r ${TMPDIR}
+chmod 644 ${TXMF_CNF}
 
 if [ "${VERBOSE}" = "true" ]; then
   echo "done"

Modified: tex-common/trunk/scripts/update-texmf.8
===================================================================
--- tex-common/trunk/scripts/update-texmf.8	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/update-texmf.8	2012-03-24 07:13:14 UTC (rev 5285)
@@ -15,18 +15,11 @@
 because the original script was designed for Debian packaging system.
 .PP
 .B update-texmf
-is a shell script to generate /etc/texmf/texmf.cnf from files in 
+is a shell script to generate /etc/texmf/web2c/texmf.cnf from files in 
 /etc/texmf/texmf.d/*.cnf
 .PP
-The tex-common provides 05TeXMF.cnf to 95NonPath.cnf and we assume
-that other TeX related packages should use the name only with the lower cases.
-The two digit numeral determines the order in which update-texmf read a file.
-.PP
-A user who wants to customize /etc/texmf/texmf.cnf should add, 
+A user who wants to customize /etc/texmf/web2c/texmf.cnf should add, 
 for example, 22mymacro.cnf in /etc/texmf/texmf.d/ and run 'update-texmf'.
-Thanks to ucf(1) update-texmf will regard manual changes of
-/etc/texmf/texmf.cnf, however it is recommended to change the files in
-/etc/texmf/texmf.d/ and to generate /etc/texmf/texmf.cnf.
 .SH OPTIONS
 .TP
 .B \-v, --verbose

Copied: tex-common/trunk/scripts/update-updmap (from rev 5258, tex-common/branches/v3/scripts/update-updmap)
===================================================================
--- tex-common/trunk/scripts/update-updmap	                        (rev 0)
+++ tex-common/trunk/scripts/update-updmap	2012-03-24 07:13:14 UTC (rev 5285)
@@ -0,0 +1,216 @@
+#!/bin/bash -e
+#
+# update-updmap --- Generate updmap.cfg for all the trees
+# Copyright (C) 2012 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.
+
+version="1.0"
+progname=$(basename "$0")
+
+SNIPPET_BASE=/var/lib/tex-common/fontmap-cfg
+SNIPPET_OLD_BASE=/etc/texmf/updmap.d
+
+# this needs to be kept in sync with dh_installtex
+COMPONENTS="texmf texlive"
+
+
+usage="Usage: $progname [OPTION...]
+Generate updmap configuration files.
+
+Options:
+      --checks           perform sanity checks on the generated config file
+      --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"
+
+
+# This ensures that if $tempfile is in the *environment*, we won't erase
+# the file it could point to in case the script is killed by a signal before
+# it has had a chance to even create its temporary file.
+tempfile=""
+
+
+cleanup()
+{
+    rc=$?
+    [ -n "$tempfile" ] && rm -f "$tempfile"
+    exit $rc
+}
+
+perform_contents_check ()
+{
+    fn="$1"
+    grep -i '^\W*\(Mixed\|Kanji\)\?Map' "$fn" | while read foo map ; do
+        # now check the existence of the hyphenation file
+        if [ -z $(kpsewhich -format=map $map) ] ; then
+           cat >&2 <<EOF
+The config file $fn references a file not in the kpathsea database:
+    $map
+Calling updmap(-sys) will break!
+This may be ok, but it could also be a typing error.
+EOF
+        fi
+    done
+}
+
+# The list of signals to trap is taken from teTeX 3's updmap script, but they
+# have been converted to signal names because we can only rely on these on
+# POSIX systems.
+trap 'cleanup' HUP INT QUIT BUS PIPE TERM
+
+
+# -v (verbose) is here for backward compatibility only.
+TEMP=$(getopt -o +vc:o: --longoptions \
+    check,quiet,help,version \
+    -n "$progname" -- "$@")
+
+case $? in
+    0) : ;;
+    1) echo "$usage" >&2; exit 1 ;;
+    *) exit 1 ;;
+esac
+
+# Don't remove the quotes around $TEMP!
+eval set -- "$TEMP"
+
+# ****************************************************************************
+# *                                 Defaults                                 *
+# ****************************************************************************
+quiet=0
+dochecks=0
+
+# ****************************************************************************
+# *                             Options handling                             *
+# ****************************************************************************
+while true; do
+    case "$1" in
+        --quiet) quiet=1; shift ;;
+        --check) dochecks=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
+your scripts accordingly.\n\n" >&2; quiet=0; shift ;;
+        --help) echo "$usage"; exit 0 ;;
+        --version) echo "$progname $version"; exit 0 ;;
+        --) shift; break ;;
+	*) echo "$progname: unexpected option '$1'; please report a bug." >&2
+            exit 1 ;;
+    esac
+done
+
+# Non-option arguments are not allowed.
+if [ $# -ne 0 ]; then
+    echo "$usage" >&2
+    exit 1
+fi
+
+# ****************************************************************************
+# *                               Actual work                                *
+# ****************************************************************************
+
+updated_files=""
+for tree in $COMPONENTS ; do
+    if [ ! -d "$SNIPPET_BASE/$tree" ] ; then
+        if [ $quiet = 0 ]; then
+            printf "$progname: skipping $tree\n";
+        fi
+        continue;
+    fi
+    if [ $tree = "texmf" ] ; then
+        # output_file=/usr/share/texmf/web2c/updmap.cfg
+        output_file=/var/lib/texmf/updmap.cfg-DEBIAN
+    elif [ $tree = "texlive" ] ; then
+        # output_file=/usr/share/texlive/texmf-dist/web2c/updmap.cfg
+        output_file=/var/lib/texmf/updmap.cfg-TEXLIVEDIST
+    else
+        echo "$progname: that cannot happen!" >&2
+        exit 1
+    fi
+    # TODO TODO
+    # create output dir in any case ...
+    mkdir -p $(dirname $output_file)
+
+    #
+    if [ $quiet = 0 ]; then
+        if [ -f "$output_file" ]; then
+	        printf "Regenerating '${output_file}'... "
+        else
+            printf "Generating '${output_file}'... "
+        fi
+    fi
+
+    # Creating the temporary file in the output directory gives it automatically
+    # the default permissions appropriate for that directory, according to the
+    # user's umask. When it is complete, we'll be able to rename it atomically to
+    # the desired output file, which will therefore have the right permissions.
+    tempfile="updmap.$tree.new"
+
+    if ! printf "" > "$tempfile" ; then
+        echo "$progname: cannot write to the temporary file '$tempfile'" >&2
+        exit 1
+    fi
+
+    printf "\
+### This file was automatically generated by ${progname}.
+#
+# Any local change will be overwritten. Please see the documentation
+# of updmap on how to override things from here.
+#
+###\n" >> "$tempfile"
+
+    # From now on, $tempfile must be deleted on exit; therefore, cleanup() should
+    # be used.
+
+    find "$SNIPPET_BASE/$tree"  -maxdepth 1 -type f -name '*.cfg' \
+        -exec cat '{}' \; >> "$tempfile"
+
+    # This is atomic.
+    mv "$tempfile" "$output_file"
+    updated_files="$updated_files\t$output_file\n";
+
+    # Check wether the generated file is decent, if all necessary files are
+    # installed, etc.
+    if [ "$dochecks" = 1 ] ; then
+        perform_contents_check "$output_file"
+    fi
+    if [ $quiet = 0 ]; then
+        printf "done.\n\n"
+    fi
+
+done
+
+#
+# check for old files
+if [ -d $SNIPPET_OLD_BASE ] ; then
+  old_files=$(find $SNIPPET_OLD_BASE -name \*.cfg)
+  if [ -n "$old_files" ] ; then
+      echo ""
+      echo "Warning: old configuration style found in $SNIPPET_OLD_BASE" >&2
+      echo "Warning: these packages should be rebuild with tex-common >= 3" >&2
+      echo ""
+  fi
+fi
+
+if [ $quiet = 0 ] && [ -n "$updated_files" ] ; then
+    echo "$progname has updated the following file(s):"
+    printf "$updated_files\n"
+    echo "If you want to enable the map files with this new file,"
+    echo "you should run updmap-sys or updmap."
+fi
+
+
+# vim:set expandtab tabstop=4 autoindent: #

Deleted: tex-common/trunk/scripts/update-updmap.1
===================================================================
--- tex-common/trunk/scripts/update-updmap.1	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/scripts/update-updmap.1	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,344 +0,0 @@
-.Dd Jul 19, 2005
-.Os Debian
-.Dt UPDATE-UPDMAP 8 SMM
-.Sh NAME
-.Nm update-updmap
-.Nd generate
-.Pa updmap.cfg
-from files in
-.Pa /etc/texmf/updmap.d/
-.Sh SYNOPSIS
-.Nm
-.Bk
-.Op Ar option ...
-.Ek
-.Sh DESCRIPTION
-This manual page documents
-.Nm ,
-a program that was written for the Debian distribution.
-.Ss Overview
-.Nm
-is used to generate
-.Xr updmap 1 Ns 's
-and 
-.Xr updmap-sys 8 Ns 's
-site-wide configuration file,
-.Pa /var/lib/texmf/web2c/updmap.cfg ,
-or the per-user configuration file,
-.Pa TEXMFCONFIG/web2c/updmap.cfg ,
-from the files with names ending in
-.Ql .cfg
-located in
-.Pa /etc/texmf/updmap.d/ .
-.Pp
-The base TeX packages (texlive-) provide files in
-.Pa /etc/texmf/updmap.d/ ,
-which define the base contents of the to\-be\-generated
-.Pa /var/lib/texmf/web2c/updmap.cfg
-(general settings and base fonts), or the per-user file 
-.Pa TEXMFCONFIG/web2c/updmap.cfg .
-With the underlying mechanism, system
-administrators can disable the map files they want by commenting their
-entries in the appropriate files under
-.Pa /etc/texmf/updmap.d/ .
-Such changes will be preserved if the package in question is removed
-(not purged) and then reinstalled.
-.Pp
-Users without local administration rights can use 
-.Nm
-to merge their local configuration and an updated site-wide
-configuration (see 
-.Sx User-specific configuration 
-below).  The local configuration files, unless specified otherwise, are
-expected in 
-.Pa $TEXMFCONFIG/updmap.d ,
-(that is
-.Pa ~/.texmf-config/updmap.d ),
-and the default output file is
-.Pa $TEXMFVAR/web2c/updmap.cfg
-(in other words,
-.Pa ~/.texmf-var/web2c/updmap.cfg ).
-.Pp
-Thanks to
-.Nm ,
-TeX-related font packages can have their own font map files referenced in
-.Pa /var/lib/texmf/web2c/updmap.cfg
-without having to edit that file.  The packages simply have to ship their map files (e.g.,
-.Pa foo.map )
-in
-.Pa /etc/texmf/map/dvips/
-and one or more
-.Ql .cfg
-file(s) under
-.Pa /etc/texmf/updmap.d/
-(e.g.,
-.Pa  10foo.cfg )
-referencing the map files.
-.Ss "Mode of operation"
-.Nm
-concatenates all the
-.Ql .cfg
-files under
-.Pa /etc/texmf/updmap.d/
-provided that:
-.Bl -dash -offset indent -compact
-.It
-they do not contain the following pseudo-comment:
-.Bd -literal -offset indent
-# -_- DebPkgProvidedMaps -_-
-.Ed
-.Pp
-or;
-.It
-they have this pseudo-comment, are up-to-date (i.e., the same file
-with suffix
-.Ql .dpkg-new
-doesn't exist) and are listed in a
-.Ql .list
-file under
-.Pa /var/lib/tex-common/fontmap-cfg/ ,
-meaning that the package shipping the
-.Ql .cfg
-file is installed. The name of the
-.Ql .list
-file is ignored (but should be the name of the package that installed
-it). The file should contain the names of the 
-.Ql .cfg
-files in 
-.Pa /etc/texmf/updmap.d/
-that should be enabled, without the
-.Ql .cfg
-suffix, e.g. 
-.Bd -literal -offset indent
-10foo
-12bar
-.Ed
-.El
-.Pp
-The first case is for configuration files added by the local system
-administrator. Files that contain the magic pseudo-comment should be
-used by Debian packages. In this case, only the base name should appear
-in the
-.Ql .list
-file: for instance,
-.Ql 10foo
-for
-.Pa /etc/texmf/updmap.d/10foo.cfg ;
-please refer to the Debian TeX Policy for details.
-.Ss "Names for configuration files"
-Filenames should begin with two digits and must have the extension 
-.Ql .cfg .
-The order used to process the
-files is obtained by running
-.Xr sort 1
-with the
-.Sq C
-locale (for ordinary alphanumeric characters, it corresponds to the
-.Tn ASCII
-order).  The result obtained by concatenating them is stored as the new
-.Pa updmap.cfg .
-Note that 
-.Xr updmap 1 Ns 
-and
-.Xr updmap-sys 8 Ns
-don't care about the order of entries, the sorting is just for the
-user's convenience.
-.Pp
-If you want to be able to use
-.Xr updmap 1 Ns 's
-or
-.Xr updmap-sys 8 Ns 's
-option
-.Fl -enable
-and 
-.Fl -setoption ,
-some further 
-.Sy Restrictions
-apply to the filenames used and the way
-entries are distributed among these files.  For
-.Fl -setoption
-to work, the options (like 
-.Ev dvipsPreferOutline )
-must be kept in a file named 
-.Pa 00updmap.cfg ,
-either
-in 
-.Pa /etc/texmf/updmap.d/
-as installed by the 
-.Nm tex-common
-package, or in the 
-.Va conf-dir
-you specified.  If you use 
-.Fl -enable
-.Ar Map some.map
-and there is no mention of 
-.Ar some.map
-in any file in 
-.Pa /etc/texmf/updmap.d/
-(and in 
-.Va conf-dir ,
-if specified), then the Map line will be introduced in a file whose name matches 
-.Pa *local*.cfg
-if it exists, or
-.Pa 99local.cfg
-will be created (in 
-.Va conf-dir
-if specified).  For this to work, you cannot have more than one file
-that matches that name, except that you can use
-.Pa conf-dir/*local.cfg
-to supersede the site-wide file in 
-.Pa /etc/texmf/updmap.d/ .
-.Pp
-In order to enable a Map file that already is listed in your
-configuration files, it must be commented with the string '#! '.  This
-is the sort of lines that
-.Dl updmap --disable some.map
-will produce - see also
-.Xr updmap.cfg 5 Ns .
-If such a line occurs in more than one file,
-.Xr updmap 1 Ns 
- will fail.  Again the exception is a file in
-.Pa conf-dir
-that shadows entries in a site-wide file.
-.Pp
-Although not strictly mandatory, it is wise to keep corresponding Map
-entries in files with the same name in 
-.Pa conf-dir
-and the site-wide dir.  Otherwise, the results may seem unpredictable.
-.Ss "User-specific configuration"
-If you want a different configuration for
-.Xr updmap 1 Ns
- than the setup at your site provides, you can place changed copies of
-the configuration files from
-.Pa /etc/texmf/updmap.d/
-in a directory below 
-.Va $TEXMFCONFIG ,
-or create additional files there.  Per default, files are looked for in
-.Pa $TEXMFCONFIG/updmap.d ,
-where
-.Ev $TEXMFCONFIG
-is
-.Pa ~/.texmf-config
-unless the configuration has been changed.  When you call
-.Nm
-as a user,  it will produce a user-specific 
-.Pa updmap.cfg
-file as follows: if files with the same name exist in both directories,
-the version in
-.Pa ~/.texmf-config/updmap.d/
-will be used; files with unique names will be used from either
-directory. 
-.Pp
-If you want to keep your files elsewhere, specify their location with
-options (see 
-.Sx OPTIONS
-below).
-.Sh OPTIONS
-.Bl -tag -width ".Fl -version"
-.It Fl c, -conf-dir Ev conf-dir
-in user-specific mode, use configuration files from 
-.Ev conf-dir
-instead of 
-.Pa $TEXMFCONFIG/updmap.d/
-.It Fl  o, -output-file Ev outputfile
-in user-specific mode, generate 
-.Ev outputfile
-instead of
-.Pa $TEXMFVAR/web2c/updmap.cfg
-.It Fl -check
-Executes additional checks that all necessary files are present in the
-kpathsea database. Don't use this in maintainer scripts.
-.It Fl -quiet
-don't write anything to the standard output during normal operation
-.It Fl -help
-print a summary of the command-line usage of
-.Nm
-and exit
-.It Fl -version
-output version information and exit
-.El
-.Pp
-Note that the
-.Fl v
-option, which turns on verbose mode, is deprecated.  We are currently in a
-transition phase where quiet mode is still the default (therefore,
-.Fl -quiet
-has no effect), but
-.Nm
-will be verbose by default as soon as enough packages use
-.Fl -quiet
-in their maintainer scripts.
-.Sh "SYNTAX FOR THE .CFG FILES"
-The
-.Ql .cfg
-files under
-.Pa /etc/texmf/updmap.d/
-should contain valid configuration lines for
-.Xr updmap 1 .
-Usually, they will consist of lines of following one of these forms:
-.Bd -literal -offset indent
-Map <foo.map>
-MixedMap <bar.map>
-.Ed
-.Pp
-The
-.Li MixedMap
-form should only be used if the font is available in both bitmap and scalable
-formats (this way, it won't be declared in the default map file for Dvips that
-is used
-when
-.Li dvipsPreferOutline
-is set to
-.Ql false
-in
-.Pa updmap.cfg ) .
-.Pp
-The following comment (from
-.Xr updmap 1 Ns 's
-point of view):
-.Bd -literal -offset indent
-# -_- DebPkgProvidedMaps -_-
-.Ed
-.Pp
-is treated in a particular way by
-.Nm
-(see section
-.Sx "Mode of operation"
-above) and should be used in every
-.Ql .cfg
-file provided by a Debian package.  This ensures that the corresponding
-map files are disabled when the package is removed and reenabled when
-the package is reinstalled.
-.Sh FILES
-.Bd -unfilled -offset left -compact
-.Pa /etc/texmf/updmap.d/00updmap.cfg
-.Pa /etc/texmf/updmap.d/*.cfg
-.Pa /var/lib/texmf/web2c/updmap.cfg
-.Pa /var/lib/tex-common/fontmap-cfg/*.list
-.Ed
-.Sh DIAGNOSTICS
-.Nm
-returns 0 on success, or a strictly positive integer on error.
-.Sh SEE ALSO
-.Xr updmap 1
-.Pp
-.Bd -unfilled -offset left -compact
-.Pa /usr/share/doc/tex-common/README.Debian.{txt,pdf,html}
-.Pa /usr/share/doc/tex-common/Debian-TeX-Policy.{txt,pdf,html}
-.Pa /usr/share/doc/tex-common/TeX-on-Debian.{txt,pdf,html}
-.Ed
-.Sh AUTHORS
-This manual page was written by
-.An -nosplit
-.An Atsuhito Kohda Aq kohda at debian.org
-and updated by
-.An "Florent Rougon" Aq f.rougon at free.fr
-and 
-.An "Frank Kuester" Aq frank at debian.org
-for the Debian distribution (and may be used by others).
-.\" For Emacs:
-.\" Local Variables:
-.\" fill-column: 72
-.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\|	\\|  \\)[ 	\n]*"
-.\" sentence-end-double-space: t
-.\" End:

Copied: tex-common/trunk/scripts/update-updmap.8 (from rev 5258, tex-common/branches/v3/scripts/update-updmap.8)
===================================================================
--- tex-common/trunk/scripts/update-updmap.8	                        (rev 0)
+++ tex-common/trunk/scripts/update-updmap.8	2012-03-24 07:13:14 UTC (rev 5285)
@@ -0,0 +1,344 @@
+.Dd Jul 19, 2005
+.Os Debian
+.Dt UPDATE-UPDMAP 8 SMM
+.Sh NAME
+.Nm update-updmap
+.Nd generate
+.Pa updmap.cfg
+from files in
+.Pa /etc/texmf/updmap.d/
+.Sh SYNOPSIS
+.Nm
+.Bk
+.Op Ar option ...
+.Ek
+.Sh DESCRIPTION
+This manual page documents
+.Nm ,
+a program that was written for the Debian distribution.
+.Ss Overview
+.Nm
+is used to generate
+.Xr updmap 1 Ns 's
+and 
+.Xr updmap-sys 8 Ns 's
+site-wide configuration file,
+.Pa /var/lib/texmf/web2c/updmap.cfg ,
+or the per-user configuration file,
+.Pa TEXMFCONFIG/web2c/updmap.cfg ,
+from the files with names ending in
+.Ql .cfg
+located in
+.Pa /etc/texmf/updmap.d/ .
+.Pp
+The base TeX packages (texlive-) provide files in
+.Pa /etc/texmf/updmap.d/ ,
+which define the base contents of the to\-be\-generated
+.Pa /var/lib/texmf/web2c/updmap.cfg
+(general settings and base fonts), or the per-user file 
+.Pa TEXMFCONFIG/web2c/updmap.cfg .
+With the underlying mechanism, system
+administrators can disable the map files they want by commenting their
+entries in the appropriate files under
+.Pa /etc/texmf/updmap.d/ .
+Such changes will be preserved if the package in question is removed
+(not purged) and then reinstalled.
+.Pp
+Users without local administration rights can use 
+.Nm
+to merge their local configuration and an updated site-wide
+configuration (see 
+.Sx User-specific configuration 
+below).  The local configuration files, unless specified otherwise, are
+expected in 
+.Pa $TEXMFCONFIG/updmap.d ,
+(that is
+.Pa ~/.texmf-config/updmap.d ),
+and the default output file is
+.Pa $TEXMFVAR/web2c/updmap.cfg
+(in other words,
+.Pa ~/.texmf-var/web2c/updmap.cfg ).
+.Pp
+Thanks to
+.Nm ,
+TeX-related font packages can have their own font map files referenced in
+.Pa /var/lib/texmf/web2c/updmap.cfg
+without having to edit that file.  The packages simply have to ship their map files (e.g.,
+.Pa foo.map )
+in
+.Pa /etc/texmf/map/dvips/
+and one or more
+.Ql .cfg
+file(s) under
+.Pa /etc/texmf/updmap.d/
+(e.g.,
+.Pa  10foo.cfg )
+referencing the map files.
+.Ss "Mode of operation"
+.Nm
+concatenates all the
+.Ql .cfg
+files under
+.Pa /etc/texmf/updmap.d/
+provided that:
+.Bl -dash -offset indent -compact
+.It
+they do not contain the following pseudo-comment:
+.Bd -literal -offset indent
+# -_- DebPkgProvidedMaps -_-
+.Ed
+.Pp
+or;
+.It
+they have this pseudo-comment, are up-to-date (i.e., the same file
+with suffix
+.Ql .dpkg-new
+doesn't exist) and are listed in a
+.Ql .list
+file under
+.Pa /var/lib/tex-common/fontmap-cfg/ ,
+meaning that the package shipping the
+.Ql .cfg
+file is installed. The name of the
+.Ql .list
+file is ignored (but should be the name of the package that installed
+it). The file should contain the names of the 
+.Ql .cfg
+files in 
+.Pa /etc/texmf/updmap.d/
+that should be enabled, without the
+.Ql .cfg
+suffix, e.g. 
+.Bd -literal -offset indent
+10foo
+12bar
+.Ed
+.El
+.Pp
+The first case is for configuration files added by the local system
+administrator. Files that contain the magic pseudo-comment should be
+used by Debian packages. In this case, only the base name should appear
+in the
+.Ql .list
+file: for instance,
+.Ql 10foo
+for
+.Pa /etc/texmf/updmap.d/10foo.cfg ;
+please refer to the Debian TeX Policy for details.
+.Ss "Names for configuration files"
+Filenames should begin with two digits and must have the extension 
+.Ql .cfg .
+The order used to process the
+files is obtained by running
+.Xr sort 1
+with the
+.Sq C
+locale (for ordinary alphanumeric characters, it corresponds to the
+.Tn ASCII
+order).  The result obtained by concatenating them is stored as the new
+.Pa updmap.cfg .
+Note that 
+.Xr updmap 1 Ns 
+and
+.Xr updmap-sys 8 Ns
+don't care about the order of entries, the sorting is just for the
+user's convenience.
+.Pp
+If you want to be able to use
+.Xr updmap 1 Ns 's
+or
+.Xr updmap-sys 8 Ns 's
+option
+.Fl -enable
+and 
+.Fl -setoption ,
+some further 
+.Sy Restrictions
+apply to the filenames used and the way
+entries are distributed among these files.  For
+.Fl -setoption
+to work, the options (like 
+.Ev dvipsPreferOutline )
+must be kept in a file named 
+.Pa 00updmap.cfg ,
+either
+in 
+.Pa /etc/texmf/updmap.d/
+as installed by the 
+.Nm tex-common
+package, or in the 
+.Va conf-dir
+you specified.  If you use 
+.Fl -enable
+.Ar Map some.map
+and there is no mention of 
+.Ar some.map
+in any file in 
+.Pa /etc/texmf/updmap.d/
+(and in 
+.Va conf-dir ,
+if specified), then the Map line will be introduced in a file whose name matches 
+.Pa *local*.cfg
+if it exists, or
+.Pa 99local.cfg
+will be created (in 
+.Va conf-dir
+if specified).  For this to work, you cannot have more than one file
+that matches that name, except that you can use
+.Pa conf-dir/*local.cfg
+to supersede the site-wide file in 
+.Pa /etc/texmf/updmap.d/ .
+.Pp
+In order to enable a Map file that already is listed in your
+configuration files, it must be commented with the string '#! '.  This
+is the sort of lines that
+.Dl updmap --disable some.map
+will produce - see also
+.Xr updmap.cfg 5 Ns .
+If such a line occurs in more than one file,
+.Xr updmap 1 Ns 
+ will fail.  Again the exception is a file in
+.Pa conf-dir
+that shadows entries in a site-wide file.
+.Pp
+Although not strictly mandatory, it is wise to keep corresponding Map
+entries in files with the same name in 
+.Pa conf-dir
+and the site-wide dir.  Otherwise, the results may seem unpredictable.
+.Ss "User-specific configuration"
+If you want a different configuration for
+.Xr updmap 1 Ns
+ than the setup at your site provides, you can place changed copies of
+the configuration files from
+.Pa /etc/texmf/updmap.d/
+in a directory below 
+.Va $TEXMFCONFIG ,
+or create additional files there.  Per default, files are looked for in
+.Pa $TEXMFCONFIG/updmap.d ,
+where
+.Ev $TEXMFCONFIG
+is
+.Pa ~/.texmf-config
+unless the configuration has been changed.  When you call
+.Nm
+as a user,  it will produce a user-specific 
+.Pa updmap.cfg
+file as follows: if files with the same name exist in both directories,
+the version in
+.Pa ~/.texmf-config/updmap.d/
+will be used; files with unique names will be used from either
+directory. 
+.Pp
+If you want to keep your files elsewhere, specify their location with
+options (see 
+.Sx OPTIONS
+below).
+.Sh OPTIONS
+.Bl -tag -width ".Fl -version"
+.It Fl c, -conf-dir Ev conf-dir
+in user-specific mode, use configuration files from 
+.Ev conf-dir
+instead of 
+.Pa $TEXMFCONFIG/updmap.d/
+.It Fl  o, -output-file Ev outputfile
+in user-specific mode, generate 
+.Ev outputfile
+instead of
+.Pa $TEXMFVAR/web2c/updmap.cfg
+.It Fl -check
+Executes additional checks that all necessary files are present in the
+kpathsea database. Don't use this in maintainer scripts.
+.It Fl -quiet
+don't write anything to the standard output during normal operation
+.It Fl -help
+print a summary of the command-line usage of
+.Nm
+and exit
+.It Fl -version
+output version information and exit
+.El
+.Pp
+Note that the
+.Fl v
+option, which turns on verbose mode, is deprecated.  We are currently in a
+transition phase where quiet mode is still the default (therefore,
+.Fl -quiet
+has no effect), but
+.Nm
+will be verbose by default as soon as enough packages use
+.Fl -quiet
+in their maintainer scripts.
+.Sh "SYNTAX FOR THE .CFG FILES"
+The
+.Ql .cfg
+files under
+.Pa /etc/texmf/updmap.d/
+should contain valid configuration lines for
+.Xr updmap 1 .
+Usually, they will consist of lines of following one of these forms:
+.Bd -literal -offset indent
+Map <foo.map>
+MixedMap <bar.map>
+.Ed
+.Pp
+The
+.Li MixedMap
+form should only be used if the font is available in both bitmap and scalable
+formats (this way, it won't be declared in the default map file for Dvips that
+is used
+when
+.Li dvipsPreferOutline
+is set to
+.Ql false
+in
+.Pa updmap.cfg ) .
+.Pp
+The following comment (from
+.Xr updmap 1 Ns 's
+point of view):
+.Bd -literal -offset indent
+# -_- DebPkgProvidedMaps -_-
+.Ed
+.Pp
+is treated in a particular way by
+.Nm
+(see section
+.Sx "Mode of operation"
+above) and should be used in every
+.Ql .cfg
+file provided by a Debian package.  This ensures that the corresponding
+map files are disabled when the package is removed and reenabled when
+the package is reinstalled.
+.Sh FILES
+.Bd -unfilled -offset left -compact
+.Pa /etc/texmf/updmap.d/00updmap.cfg
+.Pa /etc/texmf/updmap.d/*.cfg
+.Pa /var/lib/texmf/web2c/updmap.cfg
+.Pa /var/lib/tex-common/fontmap-cfg/*.list
+.Ed
+.Sh DIAGNOSTICS
+.Nm
+returns 0 on success, or a strictly positive integer on error.
+.Sh SEE ALSO
+.Xr updmap 1
+.Pp
+.Bd -unfilled -offset left -compact
+.Pa /usr/share/doc/tex-common/README.Debian.{txt,pdf,html}
+.Pa /usr/share/doc/tex-common/Debian-TeX-Policy.{txt,pdf,html}
+.Pa /usr/share/doc/tex-common/TeX-on-Debian.{txt,pdf,html}
+.Ed
+.Sh AUTHORS
+This manual page was written by
+.An -nosplit
+.An Atsuhito Kohda Aq kohda at debian.org
+and updated by
+.An "Florent Rougon" Aq f.rougon at free.fr
+and 
+.An "Frank Kuester" Aq frank at debian.org
+for the Debian distribution (and may be used by others).
+.\" For Emacs:
+.\" Local Variables:
+.\" fill-column: 72
+.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\|	\\|  \\)[ 	\n]*"
+.\" sentence-end-double-space: t
+.\" End:

Deleted: tex-common/trunk/split-texmf
===================================================================
--- tex-common/trunk/split-texmf	2012-03-24 00:34:16 UTC (rev 5284)
+++ tex-common/trunk/split-texmf	2012-03-24 07:13:14 UTC (rev 5285)
@@ -1,71 +0,0 @@
-#!/bin/bash -e
-
-# for creating the patch, we need files with extenstion .orig:
-ext=".cnf"
-
-if [ "$1" = "--create-patch" ]; then 
-  ext=".cnf.orig"; 
-else
-  # make backup copies
-  for file in $destdir/*.cnf; do 
-    if [ -f $file ]; then mv $file $file.bak; fi
-  done
-fi
-
-source=texk/kpathsea/texmf.cnf
-destdir=debian/texmf.d
-
-test -d $destdir || mkdir $destdir
-
-
-# main helper function
-selectpart(){
-  sed -n -e "$startpattern,$endpattern p" $source | sed -e "$endpattern d"
-  startpattern="$endpattern"
-}
-
-startpattern=0
-
-# 05TeXMF.cnf
-endpattern="/^%%%%/"
-selectpart  > $destdir/05TeXMF$ext
-
-# 15Plain.cnf
-endpattern="/^% LaTeX/"
-selectpart > $destdir/15Plain$ext
-
-# 45TeXinputs.cnf
-endpattern="/^% Device-independent font metric files./"
-selectpart > $destdir/45TeXinputs$ext
-
-# 55Fonts.cnf
-endpattern="/^% BibTeX bibliographies and style files./"
-selectpart > $destdir/55Fonts$ext
-
-# 65BibTeX.cnf
-endpattern="/^% PostScript headers and prologues/"
-selectpart > $destdir/65BibTeX$ext
-
-# 75DviPS.cnf
-endpattern="/^% Makeindex style (.ist) files./"
-selectpart > $destdir/75DviPS$ext
-
-# 85Misc.cnf
-endpattern="/^# \$progname: kpathsea v. 3.5.3 or later/"
-selectpart > $destdir/85Misc$ext
-
-# 90TeXDoc.cnf
-# Debian-specific
-cat texmf.d/90TeXDoc.cnf > $destdir/90TeXDoc$ext
-
-# 95NonPath.cnf
-endpattern="$"
-selectpart > $destdir/95NonPath$ext
-
-needed_files="05TeXMF 15Plain 45TeXinputs 55Fonts \
-   65BibTeX 75DviPS 85Misc 90TeXDoc 95NonPath"
-
-for file in $needed_files; do 
-  # test whether a file is empty
-  test -n "`cat $destdir/$file$ext`" || exit 1
-done




More information about the Debian-tex-commits mailing list