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

Re: Bug in hlibrary.mk, with patch



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 out
2. The sed _expression_ that filters these messages out is not anchored, so it depends on some uncertain greedyness properties of the regex system
3. 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_config
    Installed package description file Creating can not be found
    rm: cannot remove `Creating': No such file or directory
    rm: cannot remove `package': No such file or directory
    rm: cannot remove `registration': No such file or directory
    rm: cannot remove `file:': No such file or directory
    make: *** [debian/extra-depends] Error 1
    dpkg-buildpackage: error: debian/rules binary gave error exit status 2


-david



Reply to: