Bug#288616: use of ">" in tetex postinst errors for sites using bash noclobber
Package: tetex-base
Version 2.0.2c-3
unstable from backports.org
The use of the noclobber bash option is akin to aliasing "-i" with the
rm, cp and mv commands. It will stop a redirect to a file if that file
already exists. I don't see anything in the debian policy that says root
should not use this option in ~/.bashrc.
Apparently the tetex postinst programs use > to write to a temp file,
just after it was created. and the postinst script fails if root has
"set -o noclobber" in his .bashrc
This and umask problems come up fairly often with deb updates. (sorry,
lost orig timestamp)
/var/lib/dpkg/info/tetex-base.postinst.orig 2005-01-04 12:22:58.000000000 -0500
+++ /var/lib/dpkg/info/tetex-base.postinst 2005-01-04 12:22:58.000000000 -0500
@@ -109,7 +109,7 @@
fi
# now look for the missing comment sign
tempfile=`mktemp`
- sed 's@^\(For use with ngerman\)@\% \1@' < $CUR_LDAT > $tempfile
+ sed 's@^\(For use with ngerman\)@\% \1@' < $CUR_LDAT >>$tempfile
chown --reference=$CUR_LDAT $tempfile
chmod --reference=$CUR_LDAT $tempfile
mv $tempfile $CUR_LDAT
In this case I think this is all that's required, but my systems with
tetex on them are already upgraded <sigh>.
Thanks for including umask in the script!
// George
--
George Georgalis, systems architect, administrator Linux BSD IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george@galis.org
Reply to: