samoht / assemblage

A collection of tools to manage the configuration of OCaml projects
54 stars 4 forks source link

Bootstrap fails #154

Closed Drup closed 9 years ago

Drup commented 9 years ago

I'm on 4.02.1, assemblage doesn't bootstrap and the full log is here.

edwintorok commented 9 years ago

Same here, my /tmp is on a different partition (actually its a tmpfs) so rename won't work:

rename("/tmp/assemblage4f69c3write", "Makefile") = -1 EXDEV (Invalid cross-device link)

I worked it around by overriding $TMPDIR to a subdir of my build root, but the right fix would be for assemblage to create the tempfile in the same directory as the target file to ensure that atomic rename works.

dbuenzli commented 9 years ago

Thanks for the precise diagnosis Edwin. So we should add a ?temp_dir argument to this function and propagate it to the call to Filename.temp_dir. Then here and here we should add ~temp_dir:(As_path.basename file).

dbuenzli commented 9 years ago

(As_path.basename file)

Well As_path.dirname file.

edwintorok commented 9 years ago

Yep, ./bootstrap.sh works here using the fix-tmp-fail branch now.