[Pkg-haskell-maintainers] Bug#619403: Bug#619403: "hPutChar: resource vanished" during installation
Joachim Breitner
nomeata at debian.org
Thu Apr 7 15:48:42 UTC 2011
Hi,
Am Mittwoch, den 23.03.2011, 08:47 -0700 schrieb Josh Triplett:
> Setting up ghc (7.0.2-4) ...
> <stdout>: hPutChar: resource vanished (Broken pipe)
> update-alternatives: using /usr/bin/runghc to provide /usr/bin/runhaskell (runhaskell) in auto mode.
> update-alternatives: using /usr/bin/ghc to provide /usr/bin/haskell-compiler (haskell-compiler) in auto mode.
> [...]
the cause of this is this line in ghc’s postinst:
if $libdir/bin/ghc --info | grep -q '"Have interpreter","YES"' ; then
The reason is that grep -q will quit after the match, so for subsequent
lines, ghc’s stout is closed. hPutChar on a closed file descriptor gives
SIGPIPE.
I guess this is an upstream bug, which should handle SIGPIPE more
gracefully. I recall some discussion about this on haskell-cafe, but am
offline at the moment, so I cannot investigate.
A quick fix might be writing
if $libdir/bin/ghc --info | grep '"Have interpreter","YES"' >/dev/null ; then
instead.
Greetings,
Joachim
--
Joachim "nomeata" Breitner
Debian Developer
nomeata at debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
JID: nomeata at joachim-breitner.de | http://people.debian.org/~nomeata
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-haskell-maintainers/attachments/20110407/6c3fce21/attachment.pgp>
More information about the Pkg-haskell-maintainers
mailing list