Comment 0 for bug 898197

Revision history for this message
Manfred Kral (manfred-kral) wrote :

Version: Linux Mint 12 - Lisa 64bit
How to reproduce: install a new tex font, and run 'updmap --enable Map xy'
What happend: 'updmap' stops unexpected without an error with errorcode 2
What I expected: that 'updmap' enables the fontmap
The problem happens always.

updmap (included in 'tex-common') sets the exit on error mode (set -e) in it's script. To enable a Map file, it sources the script 'debianize-updmap' which realises the Debian way to enable fontmaps. In this sourced script on line 318, function 'pickLocalFile', it makes a 'ls' to check, if theres a local configuration file. If there isn't such a config, the 'new' version of 'ls' returns with an exit code '2' -> the script aborts without an error.
I guess this should fix the bug:

--- /usr/share/tex-common/debianize-updmap 2011-11-30 15:59:39.770203917 +0100
+++ debianize-updmap 2011-11-30 16:00:44.289392801 +0100
@@ -315,7 +315,7 @@
   debDirname=${debDirname%/}
   # Is there a file with "local" in the name?
   localfile=""
- localfile="`ls $debDirname/*local*cfg 2>/dev/null`"
+ localfile=$debDirname/*local*cfg
   if [ -n "$localfile" ]; then
     # there is at least one
     if [ `(set $localfile; echo $#)` -eq 1 ]; then