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

Frank Küster frank at costa.debian.org
Wed Mar 1 19:09:15 UTC 2006


Author: frank
Date: 2006-03-01 19:09:06 +0000 (Wed, 01 Mar 2006)
New Revision: 978

Modified:
   tex-common/trunk/debian/changelog
   tex-common/trunk/debian/postinst.functions
   tex-common/trunk/debian/templates
Log:
* Use debconf for user interaction if the postinst script detects
  incompatible settings, thanks to John Goerzen <jgoerzen at complete.org>
  (closes: #353474) [frank]


Modified: tex-common/trunk/debian/changelog
===================================================================
--- tex-common/trunk/debian/changelog	2006-03-01 18:04:06 UTC (rev 977)
+++ tex-common/trunk/debian/changelog	2006-03-01 19:09:06 UTC (rev 978)
@@ -2,11 +2,14 @@
 
   * cater for groups without a name when setting the groupname debconf
     variable (Closes: #354401) [preining]
+  * Use debconf for user interaction if the postinst script detects
+    incompatible settings, thanks to John Goerzen <jgoerzen at complete.org>
+    (closes: #353474) [frank]
   * Translations:
     - Update Swedish debconf translation, thanks to Daniel Nylander
-    <yeager at lidkoping.net> (closes: #354635) [frank]
+      <yeager at lidkoping.net> (closes: #354635) [frank]
 
- -- Frank Küster <frank at debian.org>  Wed,  1 Mar 2006 17:28:08 +0100
+ -- Frank Küster <frank at debian.org>  Wed,  1 Mar 2006 19:14:18 +0100
 
 tex-common (0.18) unstable; urgency=low
 

Modified: tex-common/trunk/debian/postinst.functions
===================================================================
--- tex-common/trunk/debian/postinst.functions	2006-03-01 18:04:06 UTC (rev 977)
+++ tex-common/trunk/debian/postinst.functions	2006-03-01 19:09:06 UTC (rev 978)
@@ -28,45 +28,40 @@
   file=$1
   variable=$2
   pattern="$3"
-  failed=false
+  checkfailed=false
+  removepattern='( |=)'
   line=""
   line=`egrep "^$variable" $file`
   if [ -z "$line" ]; then
-    echo
-    echo "An essential entry is missing in $file:"
-    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"
-    echo
-    echo "Exiting."
+    variable=${variable%$removepattern}
+    db_subst tex-common/check_texmf_missing filename $file
+    db_subst tex-common/check_texmf_missing variable $variable
+    db_fset tex-common/check_texmf_missing seen false || true
+    db_input critical tex-common/check_texmf_missing || true
+    db_go || true
     checkfailed=true
   else
     if ! echo "$line" | egrep -q "$pattern"; then
-      echo
-      echo "An essential entry is wrong in $file:"
-      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
-      echo "Exiting."
+      variable=${variable%$removepattern}
+      db_subst tex-common/check_texmf_wrong filename $file
+      db_subst tex-common/check_texmf_wrong variable $variable
+      db_subst tex-common/check_texmf_wrong pattern $pattern
+      db_fset tex-common/check_texmf_wrong seen false || true
+      db_input critical  tex-common/check_texmf_wrong || true
+      db_go || true
       checkfailed=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
-	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
-	echo "Exiting."
+	variable=${variable%$removepattern}
+	db_subst tex-common/check_texmf_wrong filename $file
+	db_subst tex-common/check_texmf_wrong variable $variable
+	db_subst tex-common/check_texmf_wrong pattern "/dvips//"
+	db_fset tex-common/check_texmf_wrong seen false || true
+	db_input critical tex-common/check_texmf_wrong || true
+	db_go || true
 	checkfailed=true
       fi
     fi

Modified: tex-common/trunk/debian/templates
===================================================================
--- tex-common/trunk/debian/templates	2006-03-01 18:04:06 UTC (rev 977)
+++ tex-common/trunk/debian/templates	2006-03-01 19:09:06 UTC (rev 978)
@@ -34,3 +34,26 @@
  .
  So if you had any private file in /etc/texmf/texmf.d/, then you should add
  '.cnf' to its name; for example, 22mymacro => 22mymacro.cnf
+
+Template: tex-common/check_texmf_missing
+Type: note
+_Description: Essential entry missing in ${filename}
+ An essential entry is missing in ${filename}:
+ No setting of ${variable}.
+ teTeX will not work without it, you need to fix your configuration
+ files.  The version of ${filename} that is provided by the package
+ should be available as ${filename}.dpkg-dist
+ .
+ Exiting.
+
+Template: tex-common/check_texmf_wrong
+Type: note
+_Description: Essential entry wrong in ${filename}
+ An essential entry is wrong in ${filename}:
+ ${variable} does not contain
+ ${pattern}
+ teTeX will not work without it, you need to fix your configuration
+ files.  The version of ${filename} that is provided by the package
+ should be available as ${filename}.dpkg-dist
+ .
+ Exiting.




More information about the Pkg-tetex-commits mailing list