cabal-install: Legacy uris and upload --check

Antoine Latter aslatter at
Sat Mar 13 17:45:09 EST 2010


I found it difficult to test out a local install of hackage due to the
way that cabal-install redirects to 'legacy' URIs, and the fact that
upload --check points to a hard-coded path.

So attached is a patch which does two things:

 - Previously, only could count as a legacy repo
path, now localhost can also count. It's still a bit arbitrary, tough.
 - When not using a legacy repo URI, upload --check posts to
<repo>/check, which is what the happstack-based hackage-server
expects. This is similar to what we do for the upload command already.

If folks would like the second half without the first, I can put
together a new patch.

Side effects of this patch:

+ Anyone running with a third-party repo in their cabal config file
will get unexpected behavior with 'upload --check'. Previously this
would have always hit

+ Anyone running with a repo URI of the format
'localhost/packages/archive' will now be posting 'cabal upload'
commands to localhost/cgi-bin/protected/upload instead of

Take care,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legacy.dpatch
Type: application/octet-stream
Size: 43100 bytes
Desc: not available
Url :

More information about the cabal-devel mailing list