logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

rebar-3.18.0-bootstrap-vendored.patch (1292B)


  1. From 4c4b0d39dba07911a707f8b8f17711900d2ee786 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Viktor=20S=C3=B6derqvist?= <viktor.soderqvist@est.tech>
  3. Date: Fri, 5 Nov 2021 09:46:29 +0100
  4. Subject: [PATCH] Make bootstrap use _checkouts
  5. This makes it possible to run the bootstrap offline by placing the deps
  6. in the using the already documented _checkouts directory in advance.
  7. ---
  8. bootstrap | 14 +++++++++++++-
  9. 1 file changed, 13 insertions(+), 1 deletion(-)
  10. diff --git a/bootstrap b/bootstrap
  11. index 9632b6c77..18cc46216 100755
  12. --- a/bootstrap
  13. +++ b/bootstrap
  14. @@ -92,7 +92,19 @@ fetch_and_compile({Name, ErlFirstFiles}, Deps) ->
  15. compile(Name, ErlFirstFiles).
  16. -fetch({pkg, Name, Vsn}, App) ->
  17. +fetch(Source, App) ->
  18. + Dir = filename:join([filename:absname("_checkouts"), App]),
  19. + case filelib:is_dir(Dir) of
  20. + false ->
  21. + fetch_from_hex(Source, App);
  22. + true ->
  23. + io:format("Using ~p from ~p~n", [App, Dir]),
  24. + Dest = filename:absname("_build/default/lib"),
  25. + ok = filelib:ensure_dir(filename:join([Dest, "dummy"])),
  26. + cp_r([Dir], Dest)
  27. + end.
  28. +
  29. +fetch_from_hex({pkg, Name, Vsn}, App) ->
  30. Dir = filename:join([filename:absname("_build/default/lib/"), App]),
  31. case filelib:is_dir(Dir) of
  32. false ->