Bug#342781: tex-common: postinst fails when shell is /bin/ksh
Package: tex-common
Version: 0.12
Severity: normal
Tags: patch
Hi,
when /bin/sh points to pdksh, postinst fails with the error:
An essential entry is wrong in /etc/texmf/texmf.d/55Fonts.cnf:
TEXFONTMAPS does not contain
{fonts/map,}/{$progname,pdftex,dvips,}//
However, the file contains the above entry. The problem is caused by the
ksh's brace expansion mechanism causing the following line to fail:
if ! echo $line | grep -q '{fonts/map,}/{\$progname,pdftex,dvips,}//';
The $line is not quoted causing ksh to expand the expression in braces:
[141]/home/robert> echo $SHELL
/bin/ksh
[142]/home/robert> line='{fonts/map,}/{$progname,pdftex,dvips,}//'
[143]/home/robert> echo $line
fonts/map/$progname// fonts/map/pdftex// fonts/map/dvips// fonts/map///
/$progname// /pdftex// /dvips// ///
Attached patch fixes the problem.
Best Regards
robert
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (100, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/pdksh
Kernel: Linux 2.6.14
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)
Versions of packages tex-common depends on:
ii debconf [debconf-2.0] 1.4.62 Debian configuration management sy
ii ucf 2.004 Update Configuration File: preserv
tex-common recommends no packages.
-- debconf information excluded
--- tex-common.postinst.old 2005-12-10 12:26:27.000000000 +0100
+++ tex-common.postinst 2005-12-10 12:27:24.000000000 +0100
@@ -175,7 +175,7 @@
echo "Exiting."
failed=true
else
- if ! echo $line | grep -q '{fonts/map,}/{\$progname,pdftex,dvips,}//'; then
+ 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"
@@ -188,7 +188,7 @@
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
+ if ! echo "$line" | grep -q '/dvips//'; then
echo
echo "An essential entry is wrong in $file:"
echo "TEXFONTMAPS does not contain"
Reply to: