The real problem is that the notice function in Cabal passes its argument to a function called wraptext, so when your package name gets very long a newline is inserted in the message that hlibrary.mk doesn't expect.
On Wed, Jul 18, 2012 at 12:22 PM, David Fox <ddssff@gmail.com> wrote:Ugh, don't use this patch. It causes other packages to fail.On Wed, Jul 18, 2012 at 11:00 AM, David Fox <ddssff@gmail.com> wrote:
I encountered a failure whose origins are mysterious but which is fixable with the attached patch. There are a number of elements that combine to cause this bug:1. The Cabal library outputs most of its progress messages to stdout rather than stderr, which means that hlibrary.mk needs to filter them out2. The sed _expression_ that filters these messages out is not anchored, so it depends on some uncertain greedyness properties of the regex system3. The blank line left behind by the sed _expression_ is turning into a space at the beginning of the value assigned to pkg_config. Is this new? I don't know.I'm not sure which of these elements changed, but something did. I guess I'm not even sure about that. The symptom of this bug is messages like this:
pkg_config=`debian/hlibrary.setup register --builddir=dist-ghc --gen-pkg-config | sed -r 's,.*: ,,'` ; \dh_haskell_extra_depends $pkg_config ; \rm $pkg_configInstalled package description file Creating can not be foundrm: cannot remove `Creating': No such file or directoryrm: cannot remove `package': No such file or directoryrm: cannot remove `registration': No such file or directoryrm: cannot remove `file:': No such file or directorymake: *** [debian/extra-depends] Error 1dpkg-buildpackage: error: debian/rules binary gave error exit status 2-david
Attachment:
haskell-devscripts.diff
Description: Binary data