6

I have a local hackage-server installed for development at 192.168.1.100:8080. After I develop, and package a package with cabal sdist I have to head to 192.168.1.100:8080 on my browser and manually upload the package.

This is extremely tedious, especially during a sprint like situation when multiple packages are being worked on etc, and I would just love to use cabal upload.

For a package called my-pacakge.tar.gz, running cabal upload results in a:

Uploading dist/my-package-0.1.1.0.tar.gz...
Error: dist/my-package-0.1.1.0.tar.gz: 404 Not Found
Error: Page not found

Sorry, it's just not here.

The modified portion of my cabal config looks as follows:

...    
remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
remote-repo: my.hackage:http://192.168.1.100:8080/packages/archive
...

The second line prioritizes the local hackage over hackage.haskell for cabal install

How should I set cabal upload to upload to the local hackage?

iamnat
  • 4,056
  • 1
  • 23
  • 36

1 Answers1

0

The remote repo should be configured as

remote-repo: my-hackage:http://my-hackage.com:8080/

I.e. no /packages/archive. The extra path only works as a hack on the main server to match old-style paths (pre-hackage 2.0).

(c.f. https://github.com/haskell/hackage-server/issues/164)

sclv
  • 38,665
  • 7
  • 99
  • 204