[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#288182: Why do we not reset IFS? (was: Bug#288182: tetex-bin postinst fails when calling fmtutil)



Attila Kinali <attila@kinali.ch> schrieb:

> Interesting, my $IFS is set to \n. So it must have been changed
> in between. Though, as IFS is set, i don't think this affects it.

I found it, it is our fault. Unfortunately the fix is not trivial.

First of all, for a fix, the problem only occurs under particular
circumstances, because usually the wrong IFS setting in postinst is not
exported, and if it is, bash when starting the texconfig script does not
respect the exported value. Using dash as /bin/sh and working in an
eterm lead to the problem last time I encountered it; probably if you
switch to a real console or point /bin/sh to /bin/bash, you can
configure tetex-bin.

Now for the real problem. In tetex-bin's postinst, we have:

  OIFS='$IFS'
  IFS=' ,'
  lang="$RET"
  for l in $lang; do
[...]
  done
#  IFS='$OIFS'

To fix the bug, the comment sign must be removed from the last
line. However, there must be a reason why it is commented. The CVS log
entry (Tue Apr 13 19:26:38 2004 UTC (8 months, 4 weeks ago) by frank
Branch: MAIN ) says:

,----
| - fixed ucf handling (postrm)
| - fixed tempfile creation (update-texmf)
| - don't restore IFS setting, this gave strange effects
| - apply Hilmars patch to manpage of updmap (patch-deb)
`----

Unfortunately, I couldn't find on the list what those "strange effects"
would be. Does anybody remember what the reason was?

Regards, Frank

-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer




Reply to: