hackage-server: index format

Duncan Coutts duncan.coutts at googlemail.com
Fri Nov 19 12:31:07 EST 2010


On Fri, 2010-11-19 at 13:46 +0000, Ross Paterson wrote:
> On Thu, Nov 18, 2010 at 07:46:33PM -0600, Antoine Latter wrote:
> > The index tar-ball on Hackage has an odd naming convention. Package
> > descriptions are given paths of the form:
> > 
> > ./$pkg/$version/$pkg.cabal
> > 
> > including the leading "./".
> > I'm guessing that this is done as a method of distinguishing
> > non-package meta-data.
> > 
> > Is this a convention we need to preserve?
> 
> I've removed the leading "./"; let's see if it breaks anything.

I expect it'll be fine. cabal-install uses:

case Tar.entryContent entry of
  Tar.NormalFile content _
     | takeExtension fileName == ".cabal"
    -> case splitDirectories (normalise fileName) of
        [pkgname,vers,_] ->

and

 splitDirectories (normalise "./$pkg/$version/$pkg.cabal")
=
 ["$pkg","$version","$pkg.cabal"]

Duncan



More information about the cabal-devel mailing list