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

Frank Küster frank at costa.debian.org
Tue Jan 10 10:00:59 UTC 2006


Author: frank
Date: 2006-01-10 10:00:58 +0000 (Tue, 10 Jan 2006)
New Revision: 449

Modified:
   tex-common/trunk/debian/changelog
   tex-common/trunk/debian/postinst.functions
   tex-common/trunk/debian/postinst.in
Log:
* Add more checks for essential entries in texmf.cnf, and bail out with
  a user-friendly error message if they are missing (closes: #346326)


Modified: tex-common/trunk/debian/changelog
===================================================================
--- tex-common/trunk/debian/changelog	2006-01-09 17:36:48 UTC (rev 448)
+++ tex-common/trunk/debian/changelog	2006-01-10 10:00:58 UTC (rev 449)
@@ -2,8 +2,11 @@
 
   * Fix functions in common.functions.in, so that old conffiles of teTeX
     are properly handled, thanks to Ralf Stubner
+  * Add more checks for essential entries in texmf.cnf, and bail out with
+    a user-friendly error message if they are missing (closes: #346326)
+    [frank] 
 
- -- Frank Küster <frank at debian.org>  Mon,  9 Jan 2006 18:11:40 +0100
+ -- Frank Küster <frank at debian.org>  Tue, 10 Jan 2006 10:59:10 +0100
 
 tex-common (0.14) unstable; urgency=low
 

Modified: tex-common/trunk/debian/postinst.functions
===================================================================
--- tex-common/trunk/debian/postinst.functions	2006-01-09 17:36:48 UTC (rev 448)
+++ tex-common/trunk/debian/postinst.functions	2006-01-10 10:00:58 UTC (rev 449)
@@ -110,15 +110,17 @@
 
 }
 
-check_texfontmaps(){
+check_texmf(){
   file=$1
+  variable=$2
+  pattern="$3"
   failed=false
   line=""
-  line=`grep ^TEXFONTMAPS $file`
+  line=`egrep ^$variable $file`
   if [ -z "$line" ]; then
     echo
     echo "An essential entry is missing in $file:"
-    echo "No setting of TEXFONTMAPS."
+    echo "No setting of $variable."
     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"
@@ -126,17 +128,18 @@
     echo "Exiting."
     failed=true
   else
-    if ! echo "$line" | grep -q '{fonts/map,}/{\$progname,pdftex,dvips,}//'; then
+    if ! echo "$line" | egrep -q "$pattern"; then
       echo
       echo "An essential entry is wrong in $file:"
-      echo "TEXFONTMAPS does not contain"
-      echo "{fonts/map,}/{\$progname,pdftex,dvips,}//"
+      echo "$variable does not contain"
+      echo "$pattern"
       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
+    if [ "$variable" = TEXFONTMAPS ]; then
     # the following is for backwards compatibility; must be dropped once all 
     # font packages follow TDS 1.1
     if ! echo "$line" | grep -q '/dvips//'; then
@@ -150,11 +153,13 @@
       echo
       failed=true
     fi
+    fi
   fi
   if [ "$failed" = "true" ]; then
     echo "Exiting."
     exit 1
   fi
+  
 }
 
 #################################################################

Modified: tex-common/trunk/debian/postinst.in
===================================================================
--- tex-common/trunk/debian/postinst.in	2006-01-09 17:36:48 UTC (rev 448)
+++ tex-common/trunk/debian/postinst.in	2006-01-10 10:00:58 UTC (rev 449)
@@ -92,7 +92,22 @@
     fi
 
 # Now we check for some essential settings
-    check_texfontmaps /etc/texmf/texmf.d/55Fonts.cnf
+    check_texmf /etc/texmf/texmf.d/55Fonts.cnf TEXFONTMAPS "{fonts/map,}/{\$progname,pdftex,dvips,}//"
+    check_texmf /etc/texmf/texmf.cnf TEXFONTMAPS "{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}"
+    check_texmf /etc/texmf/texmf.cnf TEXMFDIST \
+          "/usr/share/texmf-{tetex,texlive}|/usr/share/texmf-{texlive,tetex}"
+    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
 
 # run our scripts - this way we ensure that the generated files are
 # corrected, should one of the scripts have produced buggy output in 




More information about the Pkg-tetex-commits mailing list