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
  nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to