Ticket #3614 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

Cabal file parser can't handle colon in description

Reported by: dsf Owned by: igloo
Priority: high Milestone: 6.12.1
Component: libraries/base Version: 6.12.1 RC1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by igloo) (diff)

The description field of the cabal file in the haskell-mtl package currently in debian sid contains an url with a colon, which leads to this error:

  ghc-pkg: 13: unrecognised field or section: "(<http://web.cecs.pdx.edu/~mpj/pubs/springschool.html>),"

This comes from Cabal.Distribution.ParseUtils.

Attachments

mtl.cabal Download (1.2 KB) - added by dsf 4 years ago.
Cabal file which triggers the colon bug
mtl.package.conf Download (1.7 KB) - added by dsf 4 years ago.

Change History

  Changed 4 years ago by igloo

  • owner set to igloo
  • difficulty set to Unknown
  • priority changed from normal to high
  • milestone set to 6.12.1

Thanks for the report; we'll take a look.

  Changed 4 years ago by igloo

  • description modified (diff)

follow-up: ↓ 4   Changed 4 years ago by igloo

I can't reproduce this. Can you please say exactly what commands you're using?

Changed 4 years ago by dsf

Cabal file which triggers the colon bug

in reply to: ↑ 3   Changed 4 years ago by dsf

Replying to igloo:

I can't reproduce this. Can you please say exactly what commands you're using?

It happens if I put the attached mtl.cabal file into /tmp and run

cd /tmp; echo "[]" > tmp.conf; ghc-pkg register tmp.conf

strace says its not opening anything other than standard system libraries.

follow-up: ↓ 6   Changed 4 years ago by igloo

I don't understand; you don't seem to be using mtl.cabal in that command.

When I run it I get:

Reading package info from "tmp.conf" ... ghc-pkg: 1: unrecognised field or section: "[]"

which seems reasonable to me.

Also, note that mtl.cabal is meant to be used by Cabal, not by ghc-pkg directly.

Changed 4 years ago by dsf

in reply to: ↑ 5 ; follow-up: ↓ 7   Changed 4 years ago by dsf

I'm sorry, I simplified the problem away and then didn't notice that the message had changed. It turns out that the problem arises when processing the installed-pkg-config file generated by dh_haskell_install, which dh_haskell_shlibdeps then picks up using the find_config_for_ghc6 function. I don't speak perl very well, but I suspect this:

                   if (/([^\s:]+):(.*)/) {
                        $field = $1;
                        print OUTCONFIG "$field:";
                        $_ = $2;
                    }

in reply to: ↑ 6   Changed 4 years ago by dsf

(This makes it a haskell-devscripts bug, so I guess it doesn't belong here.)

  Changed 4 years ago by simonmar

  • status changed from new to closed
  • resolution set to invalid

Thanks; closing.

Note: See TracTickets for help on using tickets.