[Pkg-lyx-devel] Bug#279728: lyx-common: should check before using /usr/lib/texmf/web2c/texmf.cnf

Javier Fernández-Sanguino Peña Javier Fernández-Sanguino Peña , 279728@bugs.debian.org
Thu, 4 Nov 2004 22:58:33 +0100


--f2QGlHpHGjS2mn6Y
Content-Type: multipart/mixed; boundary="pWyiEgJYm5f9v55/"
Content-Disposition: inline


--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: lyx-common
Priority: normal
Version: 1.3.4-2
Tags: patch

Lyx-common postinst does not verify that /usr/lib/texmf/web2c/texmf.cnf=20
exists before grepping it, as a consequence:

$ LC_ALL=3DC sh  lyx-common.postinst.orig
grep: /usr/lib/texmf/web2c/texmf.cnf: No such file or directory

The script is not using -e (maybe it should) so upgrades are not aborted,=
=20
but this situation is easily solvable.

The attached patch should fix this, please apply it to the sources.

Thanks

Javier

--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="lyx-common.postinst.diff"
Content-Transfer-Encoding: quoted-printable

--- lyx-common.postinst.orig	2004-11-04 22:54:35.000000000 +0100
+++ lyx-common.postinst	2004-11-04 22:55:30.000000000 +0100
@@ -17,7 +17,7 @@
 fi
=20
 # Package maintainer's commands follow:
-if [ -e /usr/bin/texconfig ] && fgrep -q TEXMFMAIN /usr/lib/texmf/web2c/te=
xmf.cnf; then
+if [ -e /usr/bin/texconfig ] && [ -f /usr/lib/texmf/web2c/texmf.cnf ] && f=
grep -q TEXMFMAIN /usr/lib/texmf/web2c/texmf.cnf; then
      /usr/bin/texhash
 fi
 echo -n "Running update-lyxrc... "

--pWyiEgJYm5f9v55/--

--f2QGlHpHGjS2mn6Y
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBiqYIi4sehJTrj0oRAn/1AJ96kwA97wl9SAy3P59MqrwreYuv/wCeOlgn
B2B1sVeTzzroqCsJ2W/S9ik=
=qBEx
-----END PGP SIGNATURE-----

--f2QGlHpHGjS2mn6Y--