Bug#64560: tetex-bin: xdvi wrapper script creates useless tempfiles
Package: tetex-bin
Version: 1.0.6-6
I don't know what's happening with the xdvi wrapper script, but in the
meantime, /usr/X11R6/bin/xdvi has the following:
filename=${1+"$@"}
compress=0
tempfile=`tempfile -p tetex -s .dvi`
case "${filename}X" in
*.gzX)
gzip -d -c $filename > $tempfile
compress=1
;;
*.bz2X)
bzip2 -d -c $filename > $tempfile
compress=1
;;
esac
if test $compress = 1; then
trap "rm -f $tempfile" 0 1 2 15
filename=$tempfile
fi
So the tempfile is created anyway, but only removed if anything's
written into it. Either the trap command should come immediately
after the tempfile command, or the tempfile command should appear in
both of the cases, thus:
filename=${1+"$@"}
compress=0
case "${filename}X" in
*.gzX)
tempfile=`tempfile -p tetex -s .dvi`
gzip -d -c $filename > $tempfile
compress=1
;;
*.bz2X)
tempfile=`tempfile -p tetex -s .dvi`
bzip2 -d -c $filename > $tempfile
compress=1
;;
esac
...
Julian
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Julian Gilbey, Dept of Maths, QMW, Univ. of London. J.D.Gilbey@qmw.ac.uk
Debian GNU/Linux Developer, see http://www.debian.org/~jdg
Donate free food to the world's hungry: see http://www.thehungersite.com/
Reply to: