anchor.diff:          false -> [];
           true -> [src]
       end.
  -
  
positive.code:     erl_tar:extract(TarFile, [{cwd, TempDir}, compressed]),
      OverlayVars = rlx_prv_overlay:generate_overlay_vars(State, Release),
      OverlayFiles = overlay_files(OverlayVars, rlx_state:get(State, overlay, undefined), OutputDir),
      ok =
          erl_tar:create(TarFile,
                         [{"releases", filename:join(TempDir, "releases")},
  
negative.code:                             _ ->
                                  [{"lib", filename:join(TempDir, "lib")},
                                   {"erts-"++ErtsVersion, filename:join(OutputDir, "erts-"++ErtsVersion)}]
                          end]++ConfigFiles++OverlayFiles, [dereference,compressed]),
      ec_cmd_log:info(rlx_state:log(State),
                      "tarball ~s successfully created!~n", [TarFile]),
      ec_file:remove(TempDir, [recursive]),
      {ok, State}.
  
  config_files(Vsn, OutputDir) ->
      VMArgs = {filename:join(["releases", Vsn, "vm.args"]), filename:join([OutputDir, "releases", Vsn, "vm.args"])},
      VMArgsOrig = {filename:join(["releases", Vsn, "vm.args.orig"]), filename:join([OutputDir, "releases", Vsn, "vm.args.orig"])},
      SysConfigOrig = {filename:join(["releases", Vsn, "sys.config.orig"]), filename:join([OutputDir, "releases", Vsn, "sys.config.orig"])},
      [{NameInArchive, Filename} || {NameInArchive, Filename} <- [VMArgs, VMArgsOrig, SysConfigOrig], filelib:is_file(Filename)].
  
  
  overlay_files(_, undefined, _) ->
      [];
  