diff options
author | Håkan Mattsson <[email protected]> | 2010-03-09 18:46:31 +0100 |
---|---|---|
committer | Håkan Mattsson <[email protected]> | 2010-04-19 13:17:32 +0200 |
commit | 512b1a258c083021f199e6cad2da479e7fdfd6dd (patch) | |
tree | 7d2fc07d031daa0032eff26c12085a0c4339ca66 /lib/reltool/src/reltool_target.erl | |
parent | 2846d03cb026ec9f33ea32747b4a231e1239b1ae (diff) | |
download | otp-512b1a258c083021f199e6cad2da479e7fdfd6dd.tar.gz otp-512b1a258c083021f199e6cad2da479e7fdfd6dd.tar.bz2 otp-512b1a258c083021f199e6cad2da479e7fdfd6dd.zip |
Add function to return status about the configuration
It is called reltool:get_status/1. The API functions in reltool
that may take PidOrOptions as input and actually gets Options
does now print out the warnings.
Diffstat (limited to 'lib/reltool/src/reltool_target.erl')
-rw-r--r-- | lib/reltool/src/reltool_target.erl | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lib/reltool/src/reltool_target.erl b/lib/reltool/src/reltool_target.erl index a4440f8fb1..160cbd8e15 100644 --- a/lib/reltool/src/reltool_target.erl +++ b/lib/reltool/src/reltool_target.erl @@ -707,16 +707,17 @@ strip_sys_files(Relocatable, SysFiles, Apps, ExclRegexps) -> {value, Erts} = lists:keysearch(erts, #app.name, Apps), FilterErts = fun(Spec) -> - File = element(2, Spec), - case lists:prefix("erts", File) of - true -> - if - File =:= Erts#app.label -> - replace_dyn_erl(Relocatable, Spec); - true -> - false - end; - false -> + File = element(2, Spec), + case File of + "erts" -> + reltool_utils:throw_error("This system is not installed. " + "The directory ~s is missing.", + [Erts#app.label]); + _ when File =:= Erts#app.label -> + replace_dyn_erl(Relocatable, Spec); + "erts-" ++ _ -> + false; + _ -> true end end, @@ -729,7 +730,8 @@ strip_sys_files(Relocatable, SysFiles, Apps, ExclRegexps) -> replace_dyn_erl(false, _ErtsSpec) -> true; replace_dyn_erl(true, {create_dir, ErtsDir, ErtsFiles}) -> - [{create_dir, _, BinFiles}] = safe_lookup_spec("bin", ErtsFiles), + [{create_dir, _, BinFiles}] = + safe_lookup_spec("bin", ErtsFiles), case lookup_spec("dyn_erl", BinFiles) of [] -> case lookup_spec("erl.ini", BinFiles) of @@ -853,6 +855,7 @@ lookup_spec(Prefix, Specs) -> safe_lookup_spec(Prefix, Specs) -> case lookup_spec(Prefix, Specs) of [] -> + %% io:format("lookup fail ~s:\n\t~p\n", [Prefix, Specs]), reltool_utils:throw_error("Mandatory system file ~s is " "not included", [Prefix]); Match -> @@ -1115,7 +1118,7 @@ do_eval_spec({archive, Archive, Options, Files}, {ok, _} -> ok; {error, Reason} -> - reltool_utils:throw_error("create archive ~s: ~p\n", + reltool_utils:throw_error("create archive ~s failed: ~p\n", [ArchiveFile, Reason]) end; do_eval_spec({copy_file, File}, _OrigSourceDir, SourceDir, TargetDir) -> @@ -1317,7 +1320,7 @@ do_install(RelName, TargetDir) -> ok = release_handler:create_RELEASES(TargetDir2, RelFile), ok; _ -> - reltool_utils:throw_error("~s: Illegal syntax.\n", [DataFile]) + reltool_utils:throw_error("~s: Illegal data file syntax.\n", [DataFile]) end. subst_src_scripts(Scripts, SrcDir, DestDir, Vars, Opts) -> |