hackage-security icon indicating copy to clipboard operation
hackage-security copied to clipboard

hackage-repo-tool bootstrap fails in a mysterious way if there are no tarballs

Open ezyang opened this issue 9 years ago • 3 comments

Steps to reproduce:

  1. Run hackage-repo-tool bootstrap on a directory that doesn't exist. Get:
ezyang@sabre:~/Dev/labs/localrepo$ /srv/code/hackage-security/dist-newstyle/build/x86_64-linux/ghc-7.10.3/hackage-repo-tool-0.1.1/c/hackage-repo-tool/build/hackage-repo-tool/hackage-repo-tool bootstrap --keys keys --repo repo
/srv/code/labs/localrepo/repo: getDirectoryContents: does not exist (No such file or directory)
  1. Create the directory and try again.
ezyang@sabre:~/Dev/labs/localrepo$ /srv/code/hackage-security/dist-newstyle/build/x86_64-linux/ghc-7.10.3/hackage-repo-tool-0.1.1/c/hackage-repo-tool/build/hackage-repo-tool/hackage-repo-tool bootstrap --keys keys --repo repo
/srv/code/labs/localrepo/repo/index: getDirectoryContents: does not exist (No such file or directory)
  1. Create the directory and try again
ezyang@sabre:~/Dev/labs/localrepo$ /srv/code/hackage-security/dist-newstyle/build/x86_64-linux/ghc-7.10.3/hackage-repo-tool-0.1.1/c/hackage-repo-tool/build/hackage-repo-tool/hackage-repo-tool bootstrap --keys keys --repo repo
/srv/code/labs/localrepo/repo/01-index.tar: openBinaryFile: does not exist (No such file or directory)

That last error is incredibly oblique. You can solve it by adding a tarball to the package subdir. Totally non-obvious.

ezyang avatar Nov 26 '16 08:11 ezyang

Just stumbled over this. A helpful error message (please create a package subdirectory with tarballs in it) would have been useful.

nomeata avatar Jul 19 '18 13:07 nomeata

@nomeata patches welcome! I briefly looked at this some time ago, but had to give up due to lack of time

hvr avatar Jul 20 '18 11:07 hvr

I was worried someone would say that ;-)

nomeata avatar Jul 20 '18 11:07 nomeata