From: Martin Logan <[EMAIL PROTECTED]>
---
_build.cfg | 2 +-
bin/epkg | 11 ++++++---
bin/faxien | 10 ++++++--
lib/epkg/ebin/epkg.app | 2 +-
lib/epkg/src/epkg_install.erl | 10 ++++----
lib/epkg/src/epkg_installed_paths.erl | 6 ++--
lib/epkg/src/epkg_manage.erl | 34 ++++++++++++++++++--------------
lib/epkg/src/epkg_util.erl | 3 +-
lib/faxien/ebin/faxien.app | 2 +-
lib/faxien/src/fax_manage.erl | 1 +
10 files changed, 46 insertions(+), 35 deletions(-)
diff --git a/_build.cfg b/_build.cfg
index a18a588..cea13ab 100644
--- a/_build.cfg
+++ b/_build.cfg
@@ -1,6 +1,6 @@
project : {
name : faxien
- vsn : "0.34.1.0"
+ vsn : "0.35.0.0"
},
repositories : ["http://repo.erlware.org/pub"],
diff --git a/bin/epkg b/bin/epkg
index c945dcd..86b477b 100644
--- a/bin/epkg
+++ b/bin/epkg
@@ -6,16 +6,19 @@ PREFIX=$(cd $(dirname $(dirname $PROG)); pwd)
#### Fill in values for these variables ####
REL_NAME=faxien
-REL_VSN=0.34.1.0
+REL_VSN=0.35.0.0
ERTS_VSN=5.6.3
INVOCATION_SUFFIX="-s epkg cmdln_apply epkg $@ -noshell -prefix $PREFIX"
###########################################
-export ROOTDIR=$PREFIX/application_packages/$ERTS_VSN
-export BINDIR=$PREFIX/erts_packages/erts-$ERTS_VSN/bin
+ROOTDIR=$PREFIX/packages/$ERTS_VSN
+ERTS_DIR=$ROOTDIR/erts-$ERTS_VSN
+
+export $ROOTDIR
+export BINDIR=$ERTS_DIR/bin
export EMU=beam
export PROGNAME=erl
-export LD_LIBRARY_PATH=$PREFIX/erts/$ERTS_VSN/lib
+export LD_LIBRARY_PATH=$ERTS_DIR/lib
REL_DIR=$PREFIX/release_packages/$REL_NAME-$REL_VSN/release
diff --git a/bin/faxien b/bin/faxien
index 130d1c0..292b522 100644
--- a/bin/faxien
+++ b/bin/faxien
@@ -6,16 +6,20 @@ PREFIX=$(cd $(dirname $(dirname $PROG)); pwd)
#### Fill in values for these variables ####
REL_NAME=faxien
-REL_VSN=0.34.1.0
+REL_VSN=0.35.0.0
ERTS_VSN=5.6.3
INVOCATION_SUFFIX="-s faxien cmdln_apply faxien $@ -noshell -prefix $PREFIX"
###########################################
+
export ROOTDIR=$PREFIX/application_packages/$ERTS_VSN
-export BINDIR=$PREFIX/erts_packages/erts-$ERTS_VSN/bin
+#export ROOTDIR=$PREFIX/packages/$ERTS_VSN
+ERTS_DIR=$PREFIX/erts_packages/erts-$ERTS_VSN
+#ERTS_DIR=$ROOTDIR/erts-$ERTS_VSN
+export BINDIR=$ERTS_DIR/bin
export EMU=beam
export PROGNAME=erl
-export LD_LIBRARY_PATH=$PREFIX/erts/$ERTS_VSN/lib
+export LD_LIBRARY_PATH=$ERTS_DIR/lib
REL_DIR=$PREFIX/release_packages/$REL_NAME-$REL_VSN/release
diff --git a/lib/epkg/ebin/epkg.app b/lib/epkg/ebin/epkg.app
index a66c5b4..c0f673c 100755
--- a/lib/epkg/ebin/epkg.app
+++ b/lib/epkg/ebin/epkg.app
@@ -5,7 +5,7 @@
{description, "Manages local erlang/OTP packages. Faxien depends on this for
local operations."},
% The version of the applicaton
- {vsn, "0.7.0.0"},
+ {vsn, "0.8.0.0"},
% All modules used by the application.
{modules,
diff --git a/lib/epkg/src/epkg_install.erl b/lib/epkg/src/epkg_install.erl
index 9465135..49dca06 100644
--- a/lib/epkg/src/epkg_install.erl
+++ b/lib/epkg/src/epkg_install.erl
@@ -128,7 +128,7 @@ install_erts(ErtsPackageDirOrArchive, InstallationPath) ->
{false, true} ->
{ok, {_, ErtsVsn}} =
epkg_installed_paths:package_dir_to_name_and_vsn(ErtsPackageDirPath),
InstalledPackageDir =
ewl_installed_paths:installed_erts_path(InstallationPath, ErtsVsn),
- ErtsInstallationPath =
ewl_installed_paths:erts_container_path(InstallationPath),
+ ErtsInstallationPath =
ewl_installed_paths:erts_container_path(InstallationPath, ErtsVsn),
install_non_release_package(ErtsPackageDirPath,
InstalledPackageDir, ErtsInstallationPath),
epkg_util:set_all_executable_perms(ewl_installed_paths:executable_container_path(InstalledPackageDir))
end.
@@ -236,7 +236,7 @@ execute_release_installation_steps(ReleasePackageDirPath,
InstallationPath, IsLo
catch
Class:Exception = {badmatch, ActualError} ->
?ERROR_MSG("Caught exception ~p of class ~p ~p~n", [Exception,
Class, erlang:get_stacktrace()]),
- ActualError;
+ {error, ActualError};
Class:Exception ->
?ERROR_MSG("Caught exception ~p of class ~p ~p~n", [Exception,
Class, erlang:get_stacktrace()]),
{error, Exception}
@@ -310,9 +310,9 @@ install_each_app_from_appspecs(AppSpecs,
ReleasePackagePath, InstallationPath, E
epkg_validation:is_package_an_app(AppPackagePath)},
case Validations of
{_, true} ->
- case install_application(AppPackagePath,
InstallationPath) of
- ok -> Acc;
- _Error -> [{AppName, AppVsn}|Acc]
+ case install_application(AppPackagePath,
ErtsVsn, InstallationPath) of
+ {ok, _} -> Acc;
+ _Error -> [{AppName, AppVsn}|Acc]
end;
{true, false} ->
Acc;
diff --git a/lib/epkg/src/epkg_installed_paths.erl
b/lib/epkg/src/epkg_installed_paths.erl
index 812a727..7334493 100644
--- a/lib/epkg/src/epkg_installed_paths.erl
+++ b/lib/epkg/src/epkg_installed_paths.erl
@@ -279,9 +279,9 @@ find_config_file_path(RelName, RelVsn) ->
-%%====================================================================
-%% Test% Functions
-%%====================================================================
+%%%====================================================================
+%%% Test Functions
+%%%====================================================================
%package_dir_to_name_and_vsn_test() ->
%?assertMatch({ok, {"epkg", "12.34-alpha"}},
package_dir_to_name_and_vsn("/usr/local/erlware/lib/epkg-12.34-alpha")),
diff --git a/lib/epkg/src/epkg_manage.erl b/lib/epkg/src/epkg_manage.erl
index d0bcef0..3ef22b7 100644
--- a/lib/epkg/src/epkg_manage.erl
+++ b/lib/epkg/src/epkg_manage.erl
@@ -100,27 +100,31 @@ list_releases(InstallationPath, [A|_] = TargetErtsVsn)
when is_integer(A) ->
list_releases(InstallationPath, [TargetErtsVsn]);
list_releases(InstallationPath, TargetErtsVsns) ->
?INFO_MSG("listing lib dirs for erts vsns ~p~n", [TargetErtsVsns]),
- lists:reverse(
- ordsets:to_list(
- ordsets:from_list(
- epkg_util:remove_tuple_dups(
- 2,
- lists:sort(
- fun({N, V}, {N, V1}) -> ewr_util:is_version_greater(V, V1);
- ({N, _}, {N1, _}) -> N > N1 end,
- lists:flatten([
- lists:map(
- fun(ErtsVsn) ->
list_releases_for_erts_vsn(InstallationPath, ErtsVsn) end,
- TargetErtsVsns)
- ])
- ))))).
+
+ ReleaseList = lists:flatten([
+ lists:map(
+ fun(ErtsVsn) ->
list_releases_for_erts_vsn(InstallationPath, ErtsVsn) end,
+ TargetErtsVsns)
+ ]),
+
+ ?INFO_MSG("release list is ~p~n", [ReleaseList]),
+
+ SortedList = lists:sort(
+ fun({N, V}, {N, V1}) -> ewr_util:is_version_greater(V, V1);
+ ({N, _}, {N1, _}) -> N > N1 end,
+ ReleaseList),
+
+ ?INFO_MSG("sorted list is ~p~n", [SortedList]),
+
+
lists:reverse(ordsets:to_list(ordsets:from_list(epkg_util:remove_tuple_dups(2,
SortedList)))).
list_releases_for_erts_vsn(InstallationPath, ErtsVsn) ->
RelDir = ewl_installed_paths:release_container_path(InstallationPath),
Paths = filelib:wildcard(RelDir ++ "/*"),
lists:filter(fun({RelName, RelVsn}) ->
try
- RelFilePath =
ewl_installed_paths:installed_release_rel_file_path(InstallationPath, RelName,
RelVsn),
+ RelFilePath =
ewl_installed_paths:installed_release_rel_file_path(InstallationPath,
+
RelName, RelVsn),
ErtsVsn_ = epkg_util:consult_rel_file(erts_vsn,
RelFilePath),
ErtsVsn_ == ErtsVsn
catch
diff --git a/lib/epkg/src/epkg_util.erl b/lib/epkg/src/epkg_util.erl
index 0905648..694f30a 100644
--- a/lib/epkg/src/epkg_util.erl
+++ b/lib/epkg/src/epkg_util.erl
@@ -64,9 +64,8 @@
%%--------------------------------------------------------------------
remove_tuple_dups(Element, [E1|T]) ->
case remove_tuple_dups(Element, T) of
- [] -> E1;
+ [] -> [E1];
[E2|_] = L when element(Element, E1) == element(Element, E2) -> L;
- E2 when element(Element, E1) == element(Element, E2) -> E2;
L when is_list(L) -> [E1|L];
E2 -> [E1, E2]
end;
diff --git a/lib/faxien/ebin/faxien.app b/lib/faxien/ebin/faxien.app
index 74d5775..6669408 100755
--- a/lib/faxien/ebin/faxien.app
+++ b/lib/faxien/ebin/faxien.app
@@ -5,7 +5,7 @@
{description, "The erlang package management tool."},
% The version of the applicaton
- {vsn, "0.34.1.0"},
+ {vsn, "0.35.0.0"},
% All modules used by the application.
{modules,
diff --git a/lib/faxien/src/fax_manage.erl b/lib/faxien/src/fax_manage.erl
index 1e1d1f8..29f8151 100644
--- a/lib/faxien/src/fax_manage.erl
+++ b/lib/faxien/src/fax_manage.erl
@@ -184,6 +184,7 @@ add_repo_to_fetch_from(Repo, ConfigFilePath) ->
get_signature(ConfigFilePath) ->
case gas:get_env(faxien, signature) of
undefined ->
+ ?INFO_MSG("no signature found, creating and writing one to ~s~n",
[ConfigFilePath]),
{ok, {{public_key, {N, E}}, {private_key, {N, D}},
{max_message_size, _Bytes}}} = cg_rsa:keygen(),
Sig = {{public_key, {N, E}}, {private_key, {N, D}}},
gas:modify_config_file(ConfigFilePath, faxien, signature, Sig),
--
1.5.3.5
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"erlware-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/erlware-dev?hl=en
-~----------~----~----~----~------~----~------~--~---