 texk/kpathsea/Makefile.in    |    1 +
 texk/kpathsea/texmf.in-teTeX |   22 +++++++++++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)

Index: tetex-bin-3.0/texk/kpathsea/texmf.in-teTeX
===================================================================
--- tetex-bin-3.0.orig/texk/kpathsea/texmf.in-teTeX	2006-10-12 16:30:05.000000000 +0200
+++ tetex-bin-3.0/texk/kpathsea/texmf.in-teTeX	2006-10-12 16:31:32.000000000 +0200
@@ -59,12 +59,15 @@
 TEXMFMAIN = @texmf@
 
 % The main distribution tree:
-TEXMFDIST = @texmf@-dist
+% TEXMFDIST = @texmf@-dist
+% TEXMFDIST is not used in Debian, everything is in $TEXMFMAIN
+TEXMFDIST = $TEXMFMAIN
+
 
 % A place for local additions to a "standard" texmf tree.
 % This tree is not used for local configuration maintained by
 % texconfig, it uses TEXMFCONFIG below.
-TEXMFLOCAL = @texmf@-local
+TEXMFLOCAL = /usr/local/share/texmf
 
 % TEXMFSYSVAR, where texconfig-sys stores variable runtime data.
 % With teTeX-3.0 or later, this must be set.
@@ -72,7 +75,8 @@
 %   TEXMFSYSVAR = $TEXMFMAIN
 % For using a separate tree:
 %   TEXMFSYSVAR = @texmf@-var
-TEXMFSYSVAR = @texmf@-var
+% Debian uses this separate TEXMFSYSVAR tree:
+TEXMFSYSVAR = /var/lib/texmf
 
 % TEXMFSYSCONFIG, where texconfig-sys stores configuration data.
 % With teTeX-3.0 or later, this must be set.
@@ -80,7 +84,8 @@
 %   TEXMFSYSCONFIG = $TEXMFMAIN
 % For using a separate tree:
 %   TEXMFSYSCONFIG = @texmf@-config
-TEXMFSYSCONFIG = @texmf@-config
+% In Debian, this should be the same as TEXMFMAIN
+TEXMFSYSCONFIG = $TEXMFMAIN
 
 % User texmf trees can be catered for like this...
 % This used to be HOMETEXMF.
@@ -111,7 +116,7 @@
 %
 % For texconfig to work properly, TEXMFCONGIG and TEXMFVAR should be named
 % explicitly and before all other trees.
-TEXMF = {!!$TEXMFCONFIG,!!$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}
+TEXMF = {!!$TEXMFCONFIG,!!$TEXMFVAR,$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFSYSVAR,!!$TEXMFMAIN}
 
 % The system trees.  These are the trees that are shared by all the users.
 SYSTEXMF = $TEXMFLOCAL;$TEXMFMAIN;$TEXMFDIST
@@ -119,7 +124,7 @@
 % Where generated fonts may be written.  This tree is used when the sources
 % were found in a system tree and either that tree wasn't writable, or the
 % varfonts feature was enabled in MT_FEATURES in mktex.cnf.
-VARTEXFONTS = @vartexfonts@
+VARTEXFONTS = /var/cache/fonts
 
 % Where to look for ls-R files.  There need not be an ls-R in the
 % directories in this path, but if there is one, Kpathsea will use it.
@@ -382,7 +387,10 @@
 %
 % For security reasons, it is better not to have . part of the path.
 % 
-TEXMFCNF = {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c};$TETEXDIR;$TEXMF/web2c;@web2c@
+% TEXMFCNF = {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c};$TETEXDIR;$TEXMF/web2c;@web2c@
+% Debian-specific change: Restrict this to dirs that actually exist,
+% to silent e.g. automounters:
+TEXMFCNF = $TETEXDIR;$TEXMF/web2c;@web2c@
 
 # $progname: kpathsea v. 3.5.3 or later overwrites this at runtime. To
 # avoid empty expansions from binaries linked against an earlier
Index: tetex-bin-3.0/texk/kpathsea/Makefile.in
===================================================================
--- tetex-bin-3.0.orig/texk/kpathsea/Makefile.in	2006-10-12 16:29:28.000000000 +0200
+++ tetex-bin-3.0/texk/kpathsea/Makefile.in	2006-10-12 16:30:08.000000000 +0200
@@ -88,6 +88,7 @@
 	echo '/^[% ]*TEXMFCONFIG[ =]/s%\$$TEXMF%$(texmf)%' >>$@
 	echo '/^[% ]*TEXMFVAR[ =]/s%$(texmf)MAIN%\$$TEXMFMAIN%' >>$@
 	echo '/^[% ]*TEXMFCONFIG[ =]/s%$(texmf)MAIN%\$$TEXMFMAIN%' >>$@
+	echo '/^[% ]*TEXMFDIST[ =]/s%$(texmf)MAIN%\$$TEXMFMAIN%' >>$@
 	echo '/^[% ]*TEXMFCNF[ =]/s%\$$TEXMF%$(texmf)%' >>$@
 # And fill in the last clause of TEXMFCNF with an absolute path.
 	echo '/^ *TEXMFCNF[ =]/s%@web2c@%$(web2cdir)%' >>$@
