New index format patch

Paolo Martini paolo at nemail.it
Wed Aug 16 18:36:53 EDT 2006


Hello,

OK good news! Here's a patch to make cabal-install use the tarball  
index format discussed in the previous email.

(I finally gave up in trying to do a whole refactoring, which I  
started from scratch many times, and started a more seamless  
integration of ideas in the existing code.)

Since we don't rely on any program to do the QA, check that the  
packagename directory and the name of the tarball and the name inside  
the .cabal file are the same case-sensitively before adding it.

The instructions for those eager of making a repository:

   1.  mkdir -p packages/packagename
   2.  cp package-version.tar.gz packages/packagename/
   3.  GOTO 1 for each package you want in the repository
   4.  tar --create --gzip --file packages/00-index.tar.gz --exclude  
'*.tar.gz' --directory packages/ .
   # don't miss the last dot in the above command!

I need help on one matter--I am not sure about pkgUrl:

If I enable multiple repositories and scan the local hierarchy after  
having downloaded the files from all of them, it becomes impossible  
to map files to urls.

So the solution could be having multiple repositories whose names are  
the urlEncoded strings of the actual repositories' urls.

If having just one repository doesn't bother anyone too much, I'd  
like to know what do you think it's worth doing next.  Also, I'd like  
to have some feedback on this patch, I am not sure I did not make any  
mistake!

Peace,
Paolo.

P.S. Lemmih, I did make the little modification to  
TarUtils.extractTarFile dcoutts suggested, do you think it is okay?  
Another possibility could be passing the directory to `cd' to, via  
the -C option, I'd like to hear what you think.
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cabal-install-tarball-index.patch
Type: application/octet-stream
Size: 22115 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/cabal-devel/attachments/20060817/77b50e97/cabal-install-tarball-index-0001.obj


More information about the cabal-devel mailing list