Closed sweeks closed 12 years ago
Unhelpfully, the same sequence works for me with latest opam on MacOS X, with a fresh clone of opam-repository
.
$ opam-mk-repo pcre-ocaml.6.2.5
Packages to build: { pcre-ocaml.6.2.5 }
Downloading https://bitbucket.org/mmottl/pcre-ocaml/downloads/pcre-ocaml-6.2.5.tar.gz ...
Creating index.tar.gz ...
There doesn't seem to be a debug flag available in opam-mk-repo
to dig any further. Can you strace it or something to see what became of the tarball?
The last bit of the strace is an apparently succesful writing of
urls.txt
. Then it prints the message on stdout and exits with
status zero (both of which are odd, given that this seems like an
error).
28948 open("/home/sweeks/opam-repository/urls.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
28948 fcntl(4, F_SETFD, FD_CLOEXEC) = 0
28948 lseek(4, 0, SEEK_CUR) = 0
28948 write(4, "compilers/3.12.1+mirage-unix-direct.comp e20ff196fef32522bfd259989651cac1 0o644\ncompilers/3.12.1+mirage-xen.comp 1a6c70b358c10831ef1f39f40b5629b5 0o644\ncompilers/3.12.1.comp 83e55af43766b50eed4e6f9e695a012b 0o644\ncompilers/4.00.0+beta2.comp f2002beeb7194ef154f9537624269d43 0o644\ncompilers/4.00.0+rc1.comp faaba2b04712864f849aad9589466a64 0o644\ncompilers/4.00.0.comp 5158f158eea2f9368c45fda207580f94 0o644\npackages/ANSITerminal.0.6/descr 72642b6fe876138a21418857f7cb3891 0o644\npackages/ANSITerminal.0.6/opam bccd8028896ebab9d49a556c4c733164 0o644\npackages/ANSITerminal.0.6/url 8d0b292fd4b5006b64d36b75a6e06e8d 0o644\npackages/CamlGI.0.6/descr 513c81091a3e355fa9e58dadf56a8863 0o644\npackages/CamlGI.0.6/opam 92b0219d924fda61ae8887a59a176366 0o644\npackages/CamlGI.0.6/url 453a3c325b00c5185abe99664d129874 0o644\npackages/aifad.2.0.2/descr 0d2c7b4bc425d585f73432fdf4f2a916 0o644\npackages/aifad.2.0.2/files/aifad.install f2e88b4e7590e88a11358514a0575b28 0o644\npackages/aifad.2.0.2/opam d493470c9dbf8828c0708bcac7d59e4a 0o644\npacka"..., 4096) = 4096
...
28948 close(4) = 0
28948 write(1, "Got some errors while processing: pcre-ocaml.6.2.5", 50) = 50
28948 exit_group(0) = ?
There doesn't seem to be a debug flag available in
opam-mk-repo
to dig any further.
You can enable debug messages by setting OPAMDEBUG=2
Ha. With OPAMDEBUG I see it was calling curl to get the pcre tgz, which is broken in my environment because I previously wrapped curl to work around the previous opam downloading hang due to our firewall. I removed my broken curl, and opam-mk-repo now works. Thanks.
Now I've successfully used opam-mk-repo with a package list to create an NFS-mounted repo, and then pointed to it from my .opam using "opam remote -add".
One possible improvement to opam-mk-repo -- I had to supply an explicit package list, like:
opam-mk-repo \
base-bigarray.base \
base-threads.base \
base-unix.base \
fileutils.0.4.4 \
oasis.0.3.0 \
ocaml-data-notation.0.0.9 \
ocamlfind.1.3.4 \
ocamlify.0.0.1 \
ocamlmod.0.0.3 \
ounit.1.1.2 \
pcre-ocaml.6.2.5 \
res.3.2.0 \
type_conv.108.00.02 \
It would have been nice to say something more like I can say with opam-install:
opam-mk-repo res ounit pcre-ocaml
and have it compute the package numbers and transitive closure.
I guess this is the idea of opam install --download
that Thomas
suggested earlier.
I guess there's also a little room for improvement in the opam error message, stating that something went wrong with the call to curl.
I tried running 'opam-mk-repo pcre-ocaml.6.2.5' in a fresh clone of
git://github.com/OCamlPro/opam-repository
. Here's the error I got:After this, there was no
archives
directory, which is what I was hoping would have been created, and popluated with the pcre-ocaml package.