summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-22 19:59:07 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-22 19:59:07 +0000
commit61ba136088ee6400697c4f6ecb09fe1bbc4076e7 (patch)
tree2f1b3b775efd1ae0ea18544f5c58c9076cdff5cc /subr
parentd18b1a13558fd4c78372fe610e7f6391f9eae874 (diff)
downloadmidipix_build-61ba136088ee6400697c4f6ecb09fe1bbc4076e7.tar.bz2
midipix_build-61ba136088ee6400697c4f6ecb09fe1bbc4076e7.tar.xz
subr/ex_pkg_{dispatch,env}.subr: move ${PKG_DISABLED} check.
Diffstat (limited to 'subr')
-rw-r--r--subr/ex_pkg_dispatch.subr27
-rw-r--r--subr/ex_pkg_env.subr3
2 files changed, 16 insertions, 14 deletions
diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr
index 3f4f5e5a..a83e46d5 100644
--- a/subr/ex_pkg_dispatch.subr
+++ b/subr/ex_pkg_dispatch.subr
@@ -3,13 +3,13 @@
#
ex_pkg_dispatch() {
- local _tgt_name="${1}" _pkg_name="${2}" \
- _restart="${3}" _restart_at="${4}" \
- _stdout_path _stderr_path \
- _pipe_path _pipe_path2 _pipe_msg \
+ local _tgt_name="${1}" _pkg_name="${2}" \
+ _restart="${3}" _restart_at="${4}" \
+ _stdout_path _stderr_path \
+ _pipe_path _pipe_path2 _pipe_msg \
_script_rc=1;
- if ex_pkg_state_test "${_pkg_name}" finish \
- && [ -z "${_restart}" ] \
+ if ex_pkg_state_test "${_pkg_name}" finish \
+ && [ -z "${_restart}" ] \
&& [ "${_tgt_name}" != "INVARIANTS" ]; then
return 0;
else
@@ -22,11 +22,16 @@ ex_pkg_dispatch() {
ex_build_fileop rm "${_stderr_path}" "${_stdout_path}";
fi;
(set -o errexit -o noglob;
- ex_pkg_vars; ex_pkg_env;
- ex_pkg_steps "${_tgt_name}" "${_pkg_name}" \
- "${_restart}" "${_restart_at}";
- echo "done ${PKG_BASE_DIR}" >&3; read __ <&4;) \
- 1>"${_stdout_path}" 2>"${_stderr_path}" \
+ ex_pkg_vars;
+ if [ "${PKG_DISABLED:-0}" -eq 1 ]; then
+ ex_log_msg vnfo "Skipping disabled package \`${PKG_NAME}.'";
+ else
+ ex_pkg_env;
+ ex_pkg_steps "${_tgt_name}" "${_pkg_name}" \
+ "${_restart}" "${_restart_at}";
+ fi;
+ echo "done ${PKG_BASE_DIR}" >&3; read __ <&4;) \
+ 1>"${_stdout_path}" 2>"${_stderr_path}" \
3<>"${_pipe_path}" 4<>"${_pipe2_path}" &
while read _pipe_msg <"${_pipe_path}"; do
case "${_pipe_msg%% *}" in
diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr
index a3310797..5eff40ed 100644
--- a/subr/ex_pkg_env.subr
+++ b/subr/ex_pkg_env.subr
@@ -10,9 +10,6 @@ ex_pkg_env() {
&& ! ex_test_cmd "pkg_${PKG_NAME}_all"; then
ex_log_msg failexit "Error: package \`${PKG_NAME}' missing in build.vars.";
return 1;
- elif [ "${PKG_DISABLED:-0}" -eq 1 ]; then
- ex_log_msg vnfo "Skipping disabled package \`${PKG_NAME}.'";
- return 0;
else
[ -z "${MIDIPIX_BUILD_PWD}" ] && MIDIPIX_BUILD_PWD="$(pwd)";
[ -z "${PKG_FNAME}" ] && PKG_FNAME="${PKG_URL##*/}";