kocolosk commented on a change in pull request #3337:
URL: https://github.com/apache/couchdb/pull/3337#discussion_r561369979
##########
File path: dev/make_boot_script
##########
@@ -0,0 +1,9 @@
+#!/usr/bin/env escript
+
+main(_) ->
+ {ok, Server} = reltool:start_server([
+ {config, "../rel/reltool.config"}
+ ]),
+ {ok, Release} = reltool:get_rel(Server, "couchdb"),
+ ok = file:write_file("devnode.rel", io_lib:format("~p.~n", [Release])),
+ ok = systools:make_script("devnode", [local]).
Review comment:
This is really where the magic happens -- we take the existing
`reltool.config` file and generate a .boot script with the `local` option,
which automatically uses the existing paths for all the modules instead of
relocatable ones like we have in the actual release.
##########
File path: dev/run
##########
@@ -592,10 +599,9 @@ def set_boot_env(ctx):
@log("Start node {node}")
def boot_node(ctx, node):
- erl_libs = os.path.join(ctx["rootdir"], "src")
set_boot_env(ctx)
env = os.environ.copy()
- env["ERL_LIBS"] = os.pathsep.join([erl_libs])
+ env["ERL_LIBS"] = os.path.join(ctx["rootdir"], "src")
Review comment:
I wasn't sure what was going on here with the `os.pathsep.join` piece,
since there's only one path. It felt like a vestigial thing. I cleaned it up to
match the same dance being done in the `check_boot_script` method.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]