diff --git a/etc/README.md b/etc/README.md index 31bbaff..e501b35 100644 --- a/etc/README.md +++ b/etc/README.md @@ -229,7 +229,7 @@ usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-C dir[,..]] [-d] [-D kind[ new commits. --debug-minipix Don't strip(1) minipix binaries to facilitate debugging minipix. --dump-on-abort Produce package environment dump files on build failure to be - used in conjuction with pkg_shell.sh script. + used in conjuction with pkg_shell.sh script (excludes -R.) [ ..] One of: dev_packages, dist, host_deps, host_deps_rpm, host_toolchain, host_tools, minipix, native_packages, native_runtime, native_toolchain, native_tools. diff --git a/etc/build.usage b/etc/build.usage index d945317..f287b98 100644 --- a/etc/build.usage +++ b/etc/build.usage @@ -48,7 +48,7 @@ usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-C dir[,..]] [-d] [-D kind[ new commits. --debug-minipix Don't strip(1) minipix binaries to facilitate debugging minipix. --dump-on-abort Produce package environment dump files on build failure to be - used in conjuction with pkg_shell.sh script. + used in conjuction with pkg_shell.sh script (excludes -R.) [ ..] One of: dev_packages, dist, host_deps, host_deps_rpm, host_toolchain, host_tools, minipix, native_packages, native_runtime, native_toolchain, native_tools. diff --git a/subr/build_init.subr b/subr/build_init.subr index e07faca..c5f9117 100644 --- a/subr/build_init.subr +++ b/subr/build_init.subr @@ -162,18 +162,22 @@ buildp_init_getopts() { fi; done; if [ "${_rc}" -eq 0 ]; then - while [ ${#} -gt 0 ]; do - if [ "${1#\*}" != "${1}" ]; then - BUILD_GROUPS_INHIBIT_DEPS=1; _arg="${1#\*}"; - else - _arg="${1}"; + if [ "${ARG_DUMP_ON_ABORT:-0}" -eq 1 ]\ + && [ "${ARG_RELAXED:-0}" -eq 1 ]; then + _rc=1; _status="Error: --dump-on-abort excludes -R."; + else while [ ${#} -gt 0 ]; do + if [ "${1#\*}" != "${1}" ]; then + BUILD_GROUPS_INHIBIT_DEPS=1; _arg="${1#\*}"; + else + _arg="${1}"; + fi; + case "${_arg}" in + *=*) rtl_set_var_unsafe "${_arg%%=*}" "${_arg#*=}"; ;; + [^a-zA-Z]*) _rc=1; _status="Error: build group names must start with [a-zA-Z] (in argument \`${_arg}'.)"; ;; + *[^_a-zA-Z]*) _rc=1; _status="Error: build group names must not contain [^_a-zA-Z] (in argument \`${_arg}'.)"; ;; + *) BUILD_GROUPS="$(rtl_lconcat "${BUILD_GROUPS}" "${_arg}")"; ;; + esac; shift; done; fi; - case "${_arg}" in - *=*) rtl_set_var_unsafe "${_arg%%=*}" "${_arg#*=}"; ;; - [^a-zA-Z]*) _rc=1; _status="Error: build group names must start with [a-zA-Z] (in argument \`${_arg}'.)"; ;; - *[^_a-zA-Z]*) _rc=1; _status="Error: build group names must not contain [^_a-zA-Z] (in argument \`${_arg}'.)"; ;; - *) BUILD_GROUPS="$(rtl_lconcat "${BUILD_GROUPS}" "${_arg}")"; ;; - esac; shift; done; fi; return "${_rc}"; };