[subversion-commit] SVN tetex commit + diffs: r332 - tex-common/trunk/debian

Frank Küster frank at costa.debian.org
Mon Nov 14 13:39:10 UTC 2005


Author: frank
Date: 2005-11-14 13:39:09 +0000 (Mon, 14 Nov 2005)
New Revision: 332

Modified:
   tex-common/trunk/debian/changelog
   tex-common/trunk/debian/postinst.functions
   tex-common/trunk/debian/postinst.in
Log:
  * Check for correct setting of TEXFONTMAPS after possible user
    interaction in postinst, and fail with a clear error message, instead
    waiting for teTeX's or TeXLive's updmap calls to fail (closes maybe:
    #338585) [frank]


Modified: tex-common/trunk/debian/changelog
===================================================================
--- tex-common/trunk/debian/changelog	2005-11-14 12:35:32 UTC (rev 331)
+++ tex-common/trunk/debian/changelog	2005-11-14 13:39:09 UTC (rev 332)
@@ -3,8 +3,12 @@
   * Translations: 
     - add Swedish debconf translation, thanks to Daniel Nylander
       <yeager at lidkoping.net> (closes: #338866) [frank]
+  * Check for correct setting of TEXFONTMAPS after possible user
+    interaction in postinst, and fail with a clear error message, instead
+    waiting for teTeX's or TeXLive's updmap calls to fail (closes maybe:
+    #338585) [frank]
 
- -- Frank Küster <frank at debian.org>  Sun, 13 Nov 2005 15:34:15 +0100
+ -- Frank Küster <frank at debian.org>  Mon, 14 Nov 2005 14:37:37 +0100
 
 tex-common (0.10) unstable; urgency=low
 

Modified: tex-common/trunk/debian/postinst.functions
===================================================================
--- tex-common/trunk/debian/postinst.functions	2005-11-14 12:35:32 UTC (rev 331)
+++ tex-common/trunk/debian/postinst.functions	2005-11-14 13:39:09 UTC (rev 332)
@@ -85,6 +85,53 @@
   rm -rf "$tempdir"
 }
 
+check_texfontmaps(){
+  file=$1
+  failed=false
+  line=""
+  line=`grep ^TEXFONTMAPS $file`
+  if [ -z "$line" ]; then
+    echo
+    echo "An essential entry is missing in $file:"
+    echo "No setting of TEXFONTMAPS."
+    echo "teTeX will not work without it, you need to fix your configuration"
+    echo "files.  The version of $file that is provided by the package"
+    echo "should be available as ${file}.dpkg-dist"
+    echo
+    echo "Exiting."
+    failed=true
+  else
+    if ! echo $line | grep -q '{fonts/map,}/{\$progname,pdftex,dvips,}//'; then
+      echo
+      echo "An essential entry is wrong in $file:"
+      echo "TEXFONTMAPS does not contain"
+      echo "{fonts/map,}/{\$progname,pdftex,dvips,}//"
+      echo "teTeX will not work without it, you need to fix your configuration"
+      echo "files.  The version of $file that is provided by the package"
+      echo "should be available as ${file}.dpkg-dist"
+      echo
+      failed=true
+    fi
+    # the following is for backwards compatibility; must be dropped once all 
+    # font packages follow TDS 1.1
+    if ! echo $line | grep -q '/dvips//'; then
+      echo
+      echo "An essential entry is wrong in $file:"
+      echo "TEXFONTMAPS does not contain"
+      echo "/dvips//"
+      echo "teTeX will not work without it, you need to fix your configuration"
+      echo "files.  The version of $file that is provided by the package"
+      echo "should be available as ${file}.dpkg-dist"
+      echo
+      failed=true
+    fi
+  fi
+  if [ "$failed" = "true" ]; then
+    echo "Exiting."
+    exit 1
+  fi
+}
+
 #################################################################
 ##  End of function definitions from file postinst.functions
 #################################################################

Modified: tex-common/trunk/debian/postinst.in
===================================================================
--- tex-common/trunk/debian/postinst.in	2005-11-14 12:35:32 UTC (rev 331)
+++ tex-common/trunk/debian/postinst.in	2005-11-14 13:39:09 UTC (rev 332)
@@ -87,6 +87,9 @@
       done
     fi
 
+# Now we check for some essential settings
+    check_texfontmaps /etc/texmf/texmf.d/55Fonts.cnf
+
 # run our scripts - this way we ensure that the generated files are
 # corrected, should one of the scripts have produced buggy output in 
 # a prior version
@@ -95,6 +98,9 @@
     update-updmap
     update-language
 
+# Now we check again for essential settings, in the generated texmf.cnf
+    check_texfontmaps /etc/texmf/texmf.cnf
+
 #
 # set permission of ls-R files
     db_get tex-common/managedlsr || true




More information about the Pkg-tetex-commits mailing list