[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

updmap-sys vs. updmap (was: Error upgrading tetex-extra (experimental))



Grüezi Thomas,

after teTeX appended the -sys suffix to the administrators' scripts,
there seems to be a problem with appending the same suffix to
administrators' minds... 


Christoph Bier <christoph.bier@web.de> wrote:

> Frank Küster schrieb am 19.08.2005 13:13:
>
>> Christoph Bier <christoph.bier@web.de> wrote:
>> 
>>>That's it on my laptop where I use a teTeX 3.0 installation from
>>>source. But I didn't had to call updmap by user chris. Or maybe I
>>>actually did with sudo (I'm in the admin group that gains root
>>>privileges by calling sudo)??
>> 
>> $ sudo echo "Daheim: $HOME"
>> Daheim: /home/frank
>> 
>> If you're using sudo, your environment will still be chris'.  And if you
>> actually *are* root, you should never call updmap (unless you really
>> want to create files in /root/.texmf-var/), but updmap-sys.  This is not
>> Debian-specific. 
>
> Ok, thanks! I forget updmap-sys again and again :-(.

It seems people recognize that there is now a possibility for
user-specific configuration, font files etc. (and value it very much),
but disregard the need to use updmap-sys when working as root or other
local administrator.

What about a patch like the following?

TIA, Frank

--- texk/tetex/fmtutil-sys.orig	2005-08-02 18:55:29.141997543 +0200
+++ texk/tetex/fmtutil-sys	2005-08-02 18:55:51.429537861 +0200
@@ -23,6 +23,7 @@
 
 TEXMFVAR="$v"
 TEXMFCONFIG="$c"
-export TEXMFVAR TEXMFCONFIG
+progname=fmtutil-sys
+export TEXMFVAR TEXMFCONFIG progname
 
 exec fmtutil ${1+"$@"}
--- texk/tetex/fmtutil.orig	2005-08-02 18:55:29.138997874 +0200
+++ texk/tetex/fmtutil	2005-08-02 18:57:46.673838136 +0200
@@ -25,7 +25,13 @@
 #  --cnffile file             set configfile for fmtutil
 #  --fmtdir directory         set destination directory for format files
 ###############################################################################
-
+###############################################################################
+#
+# Debian-specific options:
+# --root-home                Don't use TEXMFSYSVAR, TEXMFSYSCONFIG even when 
+#                            called by root
+#
+###############################################################################
 ###############################################################################
 # program history:
 #   Sa Jan 15 18:13:46 CET 2005 avoid multiple variable assignments in one statement
@@ -76,13 +82,33 @@
 # hack around a bug in zsh:
 test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
 
-progname=fmtutil
+: ${progname:=fmtutil}
 argv0=$0
 version=1105809354 # seconds since `00:00:00 1970-01-01 UTC'
                    # date '+%s' (with GNU date)
 
 cnf=fmtutil.cnf   # name of the config file
 
+if [ `id -u` -eq 0 ]; then
+  if [ "$1" = "--root-home" ]; then
+    echo
+    echo "$progname: Option --root-home given,"
+    echo "generating formats in /root/.texmf-var."
+    echo
+  else
+    if [ ! "$progname" = "fmtutil-sys" ]; then
+      echo
+      echo "Warning: fmtutil is being run as root; fmtutil-sys should probably be"
+      echo "used instead.  If this is done by a Debian package upon installation,"
+      echo "upgrade, or removal, please file a bug against that package."
+      echo
+      TEXMFVAR="`kpsewhich -var-value TEXMFSYSVAR`"
+      TEXMFCONFIG="`kpsewhich -var-value TEXMFSYSCONFIG`"
+      export TEXMFVAR TEXMFCONFIG
+    fi
+  fi
+fi
+
 ###############################################################################
 # cleanup()
 #   clean up the temp area and exit with proper exit status




-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer



Reply to: