summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh44
-rw-r--r--dist/dist_zipdist.dist18
l---------etc/build.msgs.C1
-rw-r--r--etc/build.msgs.en39
l---------etc/pkgtool.msgs.C1
-rw-r--r--etc/pkgtool.msgs.en35
l---------etc/rtl.msgs.C1
-rw-r--r--etc/rtl.msgs.en35
-rwxr-xr-xpkgtool.sh72
-rw-r--r--subr/build_init.subr23
-rw-r--r--subr/ex_pkg.subr6
-rw-r--r--subr/ex_pkg_dispatch.subr4
-rw-r--r--subr/ex_pkg_env.subr2
-rw-r--r--subr/pkg_fetch_download.subr2
-rw-r--r--subr/pkg_install_files.subr2
-rw-r--r--subr/pkgtool_init.subr26
16 files changed, 219 insertions, 92 deletions
diff --git a/build.sh b/build.sh
index 6b174e47..34bb21c7 100755
--- a/build.sh
+++ b/build.sh
@@ -6,7 +6,7 @@ buildp_ast() {
trap '' HUP INT TERM USR1 USR2;
local _param="${1}" _pids="" _pids_niter=0 _pkg_name="" RTL_KILL_TREE_PIDS="";
if [ "${_param}" = "abort" ]; then
- rtl_log_msg "fatalexit" "Build aborted.";
+ rtl_log_msg "fatalexit" "${MSG_build_aborted}";
fi;
while [ "${_pids_niter}" -lt 8 ]; do
_pids="$(rtl_lconcat "${_pids}" "${RTL_KILL_TREE_PIDS}")"; RTL_KILL_TREE_PIDS="";
@@ -18,14 +18,14 @@ buildp_ast() {
fi;
done;
if [ -n "${_pids}" ]; then
- rtl_log_msg "verbose" "Killed PID(s): %s" "$(rtl_uniq ${_pids})";
+ rtl_log_msg "verbose" "${MSG_build_killed_pids}" "$(rtl_uniq ${_pids})";
fi;
if [ -n "${EX_PKG_DISPATCH_WAIT}" ]\
&& [ "${ARG_RESET_PKG}" -eq 1 ]; then
for _pkg_name in ${EX_PKG_DISPATCH_WAIT}; do
rtl_state_clear "${BUILD_WORKDIR}" "${_pkg_name}";
done;
- rtl_log_msg "verbose" "Reset package state for: %s" "${EX_PKG_DISPATCH_WAIT}";
+ rtl_log_msg "verbose" "${MSG_build_reset_pkg_state}" "${EX_PKG_DISPATCH_WAIT}";
fi;
if [ -n "${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}" ]; then
rtl_fileop rm "${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}";
@@ -36,18 +36,17 @@ buildp_dispatch_fail_pkg() {
local _group_name="${1}" _pkg_name="${2}";
: $((BUILD_NFAIL+=1)); BUILD_PKGS_FAILED="$(rtl_lconcat "${BUILD_PKGS_FAILED}" "${_pkg_name}")";
if [ "${ARG_RELAXED:-0}" -eq 0 ]; then
- rtl_log_msg "fatal" "${BUILD_WORKDIR}/${_pkg_name}_stderrout.log:";
+ rtl_log_msg "fatal" "${MSG_pkg_stderrout_log}" "${BUILD_WORKDIR}" "${_pkg_name}";
cat "${BUILD_WORKDIR}/${_pkg_name}_stderrout.log";
if [ -n "${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}" ]; then
printf "%s\n" "${_pkg_name}" > "${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}";
fi;
- rtl_log_msg "fatal" "Build failed in \`%s', check \`%s' for details." "${_pkg_name}" "${BUILD_WORKDIR}/${_pkg_name}_stderrout.log";
- else rtl_log_msg "warning" "Build failed in \`%s', check \`%s' for details." "${_pkg_name}" "${BUILD_WORKDIR}/${_pkg_name}_stderrout.log";
+ rtl_log_msg "fatal" "${MSG_build_failed_in}" "${_pkg_name}" "${BUILD_WORKDIR}/${_pkg_name}_stderrout.log";
+ else rtl_log_msg "warning" "${MSG_build_failed_in}" "${_pkg_name}" "${BUILD_WORKDIR}/${_pkg_name}_stderrout.log";
fi;
if [ "${ARG_DUMP_ON_ABORT:-0}" -eq 1 ]; then
- rtl_log_msg "pkg_faildump" "Logged environment dump for failed package \`%s' to \`%s'." "${_pkg_name}" "${BUILD_WORKDIR}/${_pkg_name}.dump";
- rtl_log_msg "pkg_faildump" "Enter an interactive package build shell w/ the command line: ./pkgtool.sh -a %s -b %s \"%s\" PREFIX=\"%s\""\
- "${ARCH}" "${BUILD_KIND}" "${_pkg_name}" "${PREFIX}";
+ rtl_log_msg "pkg_faildump" "${MSG_pkg_faildump1}" "${_pkg_name}" "${BUILD_WORKDIR}/${_pkg_name}.dump";
+ rtl_log_msg "pkg_faildump" "${MSG_pkg_faildump2}" "${ARCH}" "${BUILD_KIND}" "${_pkg_name}" "${PREFIX}";
fi;
if [ "${ARG_RELAXED:-0}" -eq 0 ]; then
exit 1;
@@ -57,26 +56,26 @@ buildp_dispatch_fail_pkg() {
buildp_dispatch_group_state() {
local _msg="${1}" _group_name="${2}";
case "${_msg}" in
- finish_group) rtl_log_msg "group_finish" "[%3d%% ] [%03d/%03d] Finished \`%s' build group." "${6}" "${4}" "${5}" "${_group_name}"; ;;
- start_group) rtl_log_msg "group_begin" "[%3d%% ] [%03d/%03d] Starting \`%s' build group..." "${6}" "${4}" "${5}" "${_group_name}"; ;;
+ finish_group) rtl_log_msg "group_finish" "${MSG_group_finish}" "${6}" "${4}" "${5}" "${_group_name}"; ;;
+ start_group) rtl_log_msg "group_begin" "${MSG_group_begin}" "${6}" "${4}" "${5}" "${_group_name}"; ;;
esac;
};
buildp_dispatch_pkg_state() {
local _msg="${1}" _group_name="${2}" _pkg_name="${3}";
case "${_msg}" in
- disabled_pkg) : $((BUILD_NSKIP+=1)); rtl_log_msg "pkg_skip" "Skipping disabled package \`%s'." "${_pkg_name}"; ;;
- missing_pkg) rtl_log_msg "fatalexit" "Error: unknown package \`%s'." "${_pkg_name}"; ;;
- msg_pkg) shift 3; rtl_log_msg "pkg_msg" "%s/%s: %s" "${_group_name}" "${_pkg_name}" "${*}"; ;;
- skipped_pkg) : $((BUILD_NSKIP+=1)); rtl_log_msg "pkg_skip" "Skipping finished package \`%s'." "${_pkg_name}"; ;;
- start_pkg) rtl_log_msg "pkg_begin" "[%3d%%/%3d%%] [%03d/%03d] Starting \`%s' build..." "${7}" "${6}" "${4}" "${5}" "${_pkg_name}"; ;;
- step_pkg) rtl_log_msg "pkg_step" "Finished build step %s of package \`%s'." "${4}" "${_pkg_name}"; ;;
+ disabled_pkg) : $((BUILD_NSKIP+=1)); rtl_log_msg "pkg_skip" "${MSG_pkg_skip_disabled}" "${_pkg_name}"; ;;
+ missing_pkg) rtl_log_msg "fatalexit" "${MSG_pkg_skip_unknown}" "${_pkg_name}"; ;;
+ msg_pkg) shift 3; rtl_log_msg "${MSG_pkg_msg}" "${_group_name}" "${_pkg_name}" "${*}"; ;;
+ skipped_pkg) : $((BUILD_NSKIP+=1)); rtl_log_msg "pkg_skip" "${MSG_pkg_skip_finished}" "${_pkg_name}"; ;;
+ start_pkg) rtl_log_msg "pkg_begin" "${MSG_pkg_begin}" "${7}" "${6}" "${4}" "${5}" "${_pkg_name}"; ;;
+ step_pkg) rtl_log_msg "pkg_step" "${MSG_pkg_step}" "${4}" "${_pkg_name}"; ;;
finish_pkg)
: $((BUILD_NFINI+=1));
if rtl_lmatch "${ARG_VERBOSE_TAGS}" "build" ","; then
cat "${BUILD_WORKDIR}/${_pkg_name}_stderrout.log";
fi;
- rtl_log_msg "pkg_finish" "[%3d%%/%3d%%] [%03d/%03d] Finished \`%s' build." "${7}" "${6}" "${4}" "${5}" "${_pkg_name}"; ;;
+ rtl_log_msg "pkg_finish" "${MSG_pkg_finish}" "${7}" "${6}" "${4}" "${5}" "${_pkg_name}"; ;;
start_pkg_child)
if [ "${PKG_NO_LOG_VARS:-0}" -eq 0 ]; then
rtl_log_env_vars "notice" "build" $(rtl_get_vars_fast "^PKG_");
@@ -129,15 +128,15 @@ build() {
_rc=0; _status="${_status}";
else trap "buildp_ast exit" EXIT; trap "buildp_ast abort" HUP INT TERM USR1 USR2;
buildp_time_init;
- rtl_log_msg "build_begin" "Build started by %s@%s at %s." "${BUILD_USER}" "${BUILD_HNAME}" "${BUILD_DATE_START}";
+ rtl_log_msg "build_begin" "${MSG_build_begin}" "${BUILD_USER}" "${BUILD_HNAME}" "${BUILD_DATE_START}";
rtl_log_env_vars "build_vars" "build (global)" ${DEFAULT_LOG_ENV_VARS};
ex_pkg_dispatch "${DEFAULT_BUILD_STEPS}" "${DEFAULT_BUILD_VARS}" \
buildp_dispatch "${BUILD_GROUPS}" "${BUILD_GROUPS_INHIBIT_DEPS}" \
"${ARG_PARALLEL}" "${BUILD_WORKDIR}/build.fifo" "${ARG_RESTART}" \
"${ARG_RESTART_AT}" "${ARG_RESTART_RECURSIVE}" "${BUILD_WORKDIR}";
buildp_time_update;
- rtl_log_msg "build_finish" "%s finished, %s skipped, and %s failed package(s)." "${BUILD_NFINI:-0}" "${BUILD_NSKIP:-0}" "${BUILD_NFAIL:-0}";
- rtl_log_msg "build_finish_time" "Build time: %s hour(s), %s minute(s), and %s second(s)." "${_build_time_hours:-0}" "${_build_time_minutes:-0}" "${_build_time_secs:-0}";
+ rtl_log_msg "build_finish" "${MSG_build_finish}" "${BUILD_NFINI:-0}" "${BUILD_NSKIP:-0}" "${BUILD_NFAIL:-0}";
+ rtl_log_msg "build_finish_time" "${MSG_build_finish_time}" "${_build_time_hours:-0}" "${_build_time_minutes:-0}" "${_build_time_secs:-0}";
if [ -n "${BUILD_PKGS_FAILED}" ]; then
_rc=1; _status="Build script failure(s) in: ${BUILD_PKGS_FAILED}.";
fi;
@@ -149,7 +148,6 @@ build() {
fi;
};
-set +o errexit -o noglob -o nounset;
-export LANG=C LC_ALL=C; build "${@}";
+set +o errexit -o noglob -o nounset; build "${@}";
# vim:filetype=sh textwidth=0
diff --git a/dist/dist_zipdist.dist b/dist/dist_zipdist.dist
index 7361a8a4..1b0c193a 100644
--- a/dist/dist_zipdist.dist
+++ b/dist/dist_zipdist.dist
@@ -5,11 +5,11 @@
pkg_dist_zipdist_all() {
local _dist_fname="" _pkg_name="" _pkglist_fname="${PREFIX}/pkglist.native";
if rtl_lmatch "${ARG_DIST}" "zipdist" ","; then
- echo "msg_pkg dist dist_zipdist Building deployable distribution ZIP archive..." >&3;
- rtl_log_msg "zipdist" "Finished building deployable distribution ZIP archive.";
+ echo "msg_pkg dist dist_zipdist ${MSG_zipdist_begin}" >&3;
+ rtl_log_msg "zipdist" "${MSG_zipdist_begin}";
for _pkg_name in $(cat "${_pkglist_fname}"); do
if [ ! -e "${BUILD_WORKDIR}/${_pkg_name}-native-${DEFAULT_TARGET}" ]; then
- rtl_log_msg "fatalexit" "Error: missing package build directory for package \`%s'." "${_pkg_name}";
+ rtl_log_msg "fatalexit" "${MSG_zipdist_missing_pkg_build_dir}" "${_pkg_name}";
fi;
done;
_dist_fname="${DEFAULT_ZIPDIST_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.zip";
@@ -33,20 +33,20 @@ pkg_dist_zipdist_all() {
--zipfile="${PREFIX}/${_dist_fname}"; then
return 1;
else
- echo "msg_pkg dist dist_zipdist Finished building deployable distribution ZIP archive." >&3;
- rtl_log_msg "zipdist" "Finished building deployable distribution ZIP archive.";
+ echo "msg_pkg dist dist_zipdist ${MSG_zipdist_finished}" >&3;
+ rtl_log_msg "zipdist" "${MSG_zipdist_finished}";
if [ -n "${DEFAULT_ZIPDIST_SIGN_GPG_KEY:-}" ]\
&& [ -x "$(which gpg 2>/dev/null)" ]\
&& gpg --list-keys "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" >/dev/null 2>&1; then
- echo "msg_pkg dist dist_zipdist Signing deployable distribution ZIP archive..." >&3;
- rtl_log_msg "zipdist" "Signing deployable distribution ZIP archive...";
+ echo "msg_pkg dist dist_zipdist ${MSG_zipdist_signing}" >&3;
+ rtl_log_msg "zipdist" "${MSG_zipdist_signing}";
if ! gpg --armor --passphrase-file /dev/null \
--local-user "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" \
--sign "${PREFIX}/${_dist_fname}"; then
return 1;
fi;
- echo "msg_pkg dist dist_zipdist Signed deployable distribution ZIP archive." >&3;
- rtl_log_msg "zipdist" "Signed deployable distribution ZIP archive.";
+ echo "msg_pkg dist dist_zipdist ${MSG_zipdist_signed}" >&3;
+ rtl_log_msg "zipdist" "${MSG_zipdist_signed}";
fi;
fi;
fi;
diff --git a/etc/build.msgs.C b/etc/build.msgs.C
new file mode 120000
index 00000000..9cd7e665
--- /dev/null
+++ b/etc/build.msgs.C
@@ -0,0 +1 @@
+build.msgs.en \ No newline at end of file
diff --git a/etc/build.msgs.en b/etc/build.msgs.en
new file mode 100644
index 00000000..9eee95b2
--- /dev/null
+++ b/etc/build.msgs.en
@@ -0,0 +1,39 @@
+#
+# en_* locale messages file for build.sh
+#
+
+MSG_build_aborted="Build aborted.";
+MSG_build_begin="Build started by %s@%s at %s.";
+MSG_build_clean_prefix="-C prefix specified, cleaning prefix...";
+MSG_build_failed_in="Build failed in \`%s', check \`%s' for details.";
+MSG_build_finish="%s finished, %s skipped, and %s failed package(s).";
+MSG_build_finish_time="Build time: %s hour(s), %s minute(s), and %s second(s).";
+MSG_build_killed_pids="Killed PID(s): %s";
+MSG_build_reset_pkg_state="Reset package state for: %s";
+MSG_build_resolved_deps="Resolved \`%s' dependencies.";
+MSG_build_resolving_deps="Resolving \`%s' dependencies...";
+MSG_build_unknown_dep="Error: dependency \`%s' of \`%s' unknown.";
+
+MSG_group_begin="[%3d%% ] [%03d/%03d] Starting \`%s' build group...";
+MSG_group_finish="[%3d%% ] [%03d/%03d] Finished \`%s' build group.";
+
+MSG_pkg_begin="[%3d%%/%3d%%] [%03d/%03d] Starting \`%s' build...";
+MSG_pkg_faildump1="Logged environment dump for failed package \`%s' to \`%s'.";
+MSG_pkg_faildump2="Enter an interactive package build shell w/ the command line: ./pkgtool.sh -a %s -b %s \"%s\" PREFIX=\"%s\"";
+MSG_pkg_fail_missing_vars="Error: \${PKG_SUBDIR} must be specified given both \${PKG_FNAME} and \${PKG_URLS_GIT}.";
+MSG_pkg_finish="[%3d%%/%3d%%] [%03d/%03d] Finished \`%s' build.";
+MSG_pkg_msg="%s/%s: %s";
+MSG_pkg_skip_disabled="Skipping disabled package \`%s'.";
+MSG_pkg_skip_finished="Skipping finished package \`%s'.";
+MSG_pkg_skip_unknown="Error: unknown package \`%s'.";
+MSG_pkg_stderrout_log="%s/%s_stderrout.log:";
+MSG_pkg_step="Finished build step %s of package \`%s'.";
+MSG_pkg_strip="Stripping %s...";
+
+MSG_zipdist_begin="Building deployable distribution ZIP archive...";
+MSG_zipdist_finished="Finished building deployable distribution ZIP archive.";
+MSG_zipdist_missing_pkg_build_dir="Error: missing package build directory for package \`%s'.";
+MSG_zipdist_signed="Signed deployable distribution ZIP archive.";
+MSG_zipdist_signing="Signing deployable distribution ZIP archive...";
+
+# vim:foldmethod=marker ft=sh
diff --git a/etc/pkgtool.msgs.C b/etc/pkgtool.msgs.C
new file mode 120000
index 00000000..8b2e808d
--- /dev/null
+++ b/etc/pkgtool.msgs.C
@@ -0,0 +1 @@
+pkgtool.msgs.en \ No newline at end of file
diff --git a/etc/pkgtool.msgs.en b/etc/pkgtool.msgs.en
new file mode 100644
index 00000000..bf3fc772
--- /dev/null
+++ b/etc/pkgtool.msgs.en
@@ -0,0 +1,35 @@
+#
+# en_* locale messages file for pkgtool.sh
+#
+
+MSG_pkgtool_build_group="Build group: %s";
+MSG_pkgtool_no_env_dump="Warning: failed to locate environment dump for package \`%s' in \`%s'.";
+MSG_pkgtool_pkg_archive_mirroring="Mirroring package \`%s', archive URL(s): \`%s'...";
+MSG_pkgtool_pkg_archive_mirroring_parent="Mirroring package \`%s' (parent package: \`%s'), archive URL(s): \`%s'...";
+MSG_pkgtool_pkg_deps_fail="Warning: failed to unfold dependency-expanded package name list for \`%s'.";
+MSG_pkgtool_pkg_deps_full_disabled="Full dependencies of \`%s' (disabled packages:) %s";
+MSG_pkgtool_pkg_deps_full="Full dependencies of \`%s': %s";
+MSG_pkgtool_pkg_deps_rev_none="Package \`%s' has no reverse dependencies.";
+MSG_pkgtool_pkg_direct_deps="Direct dependencies of \`%s': %s";
+MSG_pkgtool_pkg_disabled="Package \`%s' (parent package: \`%s') disabled, skipping.";
+MSG_pkgtool_pkg_git_mirroring="Mirroring package \`%s', Git URL(s): \`%s'...";
+MSG_pkgtool_pkg_git_mirroring_parent="Mirroring package \`%s' (parent package: \`%s'), Git URL(s): \`%s'...";
+MSG_pkgtool_pkg_link_fail="Failed to create symbolic link \`%s' for package \`%s' w/ parent package \`%s'.";
+MSG_pkgtool_pkg_mirror_fail="Failed to mirror package \`%s', skipping.";
+MSG_pkgtool_pkg_no_deps="Package \`%s' has no dependencies.";
+MSG_pkgtool_pkgs_deps_rev_disabled="Reverse dependencies of \`%s' (disabled packages:) %s";
+MSG_pkgtool_pkgs_deps_rev="Reverse dependencies of \`%s': %s";
+MSG_pkgtool_pkg_skip_archive_mirror="Archive URL(s) mirroring disabled, skipping \`%s'.";
+MSG_pkgtool_pkg_skip_git_mirror_disabled="Package \`%s' specifies to skip Git URL(s) mirroring, skipping.";
+MSG_pkgtool_pkg_skip_git_mirror="Git URL(s) mirroring disabled, skipping \`%s'.";
+MSG_pkgtool_pkg_skip_no_urls="Package \`%s' has neither archive nor Git URL(s), skipping.";
+MSG_pkgtool_rebuilding_pkg="Rebuilding package \`%s' w/ --dump-in build...";
+MSG_pkgtool_shell_env1="Launching shell \`%s' within package environment and \`%s'.";
+MSG_pkgtool_shell_env2="Run \$R to rebuild \`%s'.";
+MSG_pkgtool_shell_env3="Run \$RS <step> to restart the specified build step of \`%s'";
+MSG_pkgtool_shell_env4="Run \$D to automatically regenerate the patch for \`%s'.";
+MSG_pkgtool_tarball_created="Created compressed tarball of \`%s' and \`%s_stderrout.log'.";
+MSG_pkgtool_tarball_creating="Creating compressed tarball of \`%s' and \`%s_stderrout.log'...";
+MSG_pkgtool_updated_patches="Updated \`%s/patches/%s'.";
+
+# vim:foldmethod=marker ft=sh
diff --git a/etc/rtl.msgs.C b/etc/rtl.msgs.C
new file mode 120000
index 00000000..6cbc93ed
--- /dev/null
+++ b/etc/rtl.msgs.C
@@ -0,0 +1 @@
+rtl.msgs.en \ No newline at end of file
diff --git a/etc/rtl.msgs.en b/etc/rtl.msgs.en
new file mode 100644
index 00000000..aee15ab4
--- /dev/null
+++ b/etc/rtl.msgs.en
@@ -0,0 +1,35 @@
+#
+# en_* locale messages file for subr.rtl/*.subr
+#
+
+MSG_rtl_fetch_fail="Error: failed to fetch URL \`%s' (wget(1) exit status: %s)";
+MSG_rtl_fetch_fail_retryurl="Warning: failed to fetch URL \`%s', retrying with alternative URL... (wget(1) exit status: %s)";
+MSG_rtl_fetch_hashfail1="Error: hash mismatch for URL \`%s' (should be: %s vs.: %s.)";
+MSG_rtl_fetch_hashfail2="Error: hash mismatch for URL \`%s' (should be: %s.)";
+MSG_rtl_fetch_hashfail_retryurl="Warning: hash mismatch for URL \`%s', retrying with alternative URL... (from build variables: %s.)";
+MSG_rtl_fetch_lockfail="Error: failed to acquire fetching lock for URL \`%s'.";
+MSG_rtl_fetch_lockfail_retryurl="Warning: failed to acquire fetching lock for URL \`%s', retrying with alternative URL...";
+MSG_rtl_fetch_rm_redundant="Deleting redundant file \`%s' for package \`%s'.";
+
+MSG_rtl_fileop_invalid_dir="Error: Invalid or non-existent directory \`%s'.";
+MSG_rtl_fileop_invparm_chgrp="Error: Missing parameters (in: chgrp %s.)";
+MSG_rtl_fileop_invparm_chmod="Error: Missing parameters (in: chmod %s.)";
+MSG_rtl_fileop_invparm_chown="Error: Missing parameters (in: chown %s.)";
+MSG_rtl_fileop_invparm_cp="Error: Missing parameters (in: cp %s.)";
+MSG_rtl_fileop_invparm_cp_follow="Error: Missing parameters (in: cp_follow %s}.)";
+MSG_rtl_fileop_invparm="Error: Missing parameters (in: %s %s.)";
+MSG_rtl_fileop_invparm_fileop="Error: rtl_fileop() called w/ invalid parameter(s): %s";
+MSG_rtl_fileop_invparm_install="Error: Missing parameters (in: install %s.)";
+MSG_rtl_fileop_invparm_ln_symbolic="Error: Missing parameters (in: ln_symbolic %s.)";
+MSG_rtl_fileop_invparm_mv="Error: Missing parameters (in: mv %s.)";
+MSG_rtl_fileop_invparm_touch="Error: Missing parameters (in: touch %s.)";
+
+MSG_rtl_install_v2_rc="%s";
+
+MSG_rtl_log_vars_header="Variables for this %s:";
+MSG_rtl_log_unknown_tag="==> FIXME TODO XXX UNKNOWN TAG \`%s' PASSED TO rtl_log_msg()\n";
+
+MSG_rtl_platform_rc1="Command line: %s %s";
+MSG_rtl_platform_rc2="Command line: %s";
+
+# vim:foldmethod=marker ft=sh
diff --git a/pkgtool.sh b/pkgtool.sh
index c8eb3510..76faf5f4 100755
--- a/pkgtool.sh
+++ b/pkgtool.sh
@@ -5,6 +5,7 @@
pkgtoolp_info() {
local _pkg_name="${1}" _group_name="" _pkg_name_uc="$(rtl_toupper "${1}")" _fname="" _pkg_names=""\
_rc=0 EX_PKG_BUILD_GROUPS="" EX_PKG_DISABLED="" EX_PKG_FINISHED="" EX_PKG_NAMES=""; _status="";
+
if ! ex_pkg_load_groups; then
_rc=1; _status="Error: failed to load build groups.";
elif ! _group_name="$(ex_pkg_find_package "${EX_PKG_BUILD_GROUPS}" "${_pkg_name}")"; then
@@ -16,19 +17,19 @@ pkgtoolp_info() {
_rc=1; _status="Error: failed to set package environment for \`${_pkg_name}'.";
else _pkg_version="$(rtl_get_var_unsafe -u "PKG_"${_pkg_name}"_VERSION")";
rtl_log_env_vars "verbose" "package" $(rtl_get_vars_fast "^PKG_${_pkg_name_uc}");
- rtl_log_msg "info" "Build group: %s" "${_group_name}";
+ rtl_log_msg "info" "${MSG_pkgtool_build_group}" "${_group_name}";
if [ -z "${PKG_DEPENDS:-}" ]; then
- rtl_log_msg "info" "Package \`%s' has no dependencies." "${_pkg_name}";
- else rtl_log_msg "info" "Direct dependencies of \`%s': %s" "${_pkg_name}" "${PKG_DEPENDS}";
+ rtl_log_msg "info" "${MSG_pkgtool_pkg_no_deps}" "${_pkg_name}";
+ else rtl_log_msg "info" "${MSG_pkgtool_pkg_direct_deps}" "${_pkg_name}" "${PKG_DEPENDS}";
if ! ex_pkg_unfold_depends 1 1 "${_group_name}" "${_pkg_names}" "${_pkg_name}" 0; then
- rtl_log_msg "warning" "Warning: failed to unfold dependency-expanded package name list for \`%s'." "${_pkg_name}";
+ rtl_log_msg "warning" "${MSG_pkgtool_pkg_deps_fail}" "${_pkg_name}";
else EX_PKG_NAMES="$(rtl_lfilter "${EX_PKG_NAMES}" "${_pkg_name}")";
if [ -n "${EX_PKG_NAMES}" ]; then
- rtl_log_msg "info" "Full dependencies of \`%s': %s"\
+ rtl_log_msg "info" "${MSG_pkgtool_pkg_deps_full}"\
"${_pkg_name}" "$(rtl_lsort "${EX_PKG_NAMES}")";
fi;
if [ -n "${EX_PKG_DISABLED}" ]; then
- rtl_log_msg "info" "Full dependencies of \`%s' (disabled packages:) %s"\
+ rtl_log_msg "info" "${MSG_pkgtool_pkg_deps_full_disabled}"\
"${_pkg_name}" "$(rtl_lsort "${EX_PKG_DISABLED}")";
fi;
fi;
@@ -84,25 +85,25 @@ pkgtoolp_mirror_fetch() {
if _pkg_disabled="$(rtl_get_var_unsafe -u "PKG_${_pkg_name_real}_DISABLED")"\
&& [ "${_pkg_disabled:-0}" -eq 1 ]; then
- rtl_log_msg "verbose" "Package \`%s' (parent package: \`%s') disabled, skipping." "${_pkg_name}" "${_pkg_name_real}";
+ rtl_log_msg "verbose" "${MSG_pkgtool_pkg_disabled}" "${_pkg_name}" "${_pkg_name_real}";
else if _pkg_url="$(rtl_get_var_unsafe -u "PKG_${_pkg_name_real}_URL")"\
&& _pkg_sha256sum="$(rtl_get_var_unsafe -u "PKG_${_pkg_name_real}_SHA256SUM")"; then
if [ -z "${_mirror_dname}" ]; then
- _rc=0; rtl_log_msg "verbose" "Archive URL(s) mirroring disabled, skipping \`%s'." "${_pkg_name}";
+ _rc=0; rtl_log_msg "verbose" "${MSG_pkgtool_pkg_skip_archive_mirror}" "${_pkg_name}";
elif [ "${_pkg_name}" != "${_pkg_name_real}" ]; then
- rtl_log_msg "info" "Mirroring package \`%s' (parent package: \`%s'), archive URL(s): \`%s'..." "${_pkg_name}" "${_pkg_name_real}" "${_pkg_url}";
+ rtl_log_msg "info" "${MSG_pkgtool_pkg_archive_mirroring_parent}" "${_pkg_name}" "${_pkg_name_real}" "${_pkg_url}";
if ! rtl_fileop ln_symbolic "${_pkg_name_real}" "${_mirror_dname}/${_pkg_name}"; then
- _rc=1; rtl_log_msg "warning" "Failed to create symbolic link \`%s' for package \`%s' w/ parent package \`%s'."\
+ _rc=1; rtl_log_msg "warning" "${MSG_pkgtool_pkg_link_fail}"\
"${_mirror_dname}/${_pkg_name}" "${_pkg_name}" "${_pkg_name_real}";
fi;
else
if ! _pkg_fname="$(rtl_get_var_unsafe -u "PKG_${_pkg_name_real}_FNAME")"; then
_pkg_fname="${_pkg_url##*/}";
fi;
- rtl_log_msg "info" "Mirroring package \`%s', archive URL(s): \`%s'..." "${_pkg_name}" "${_pkg_url}";
+ rtl_log_msg "info" "${MSG_pkgtool_pkg_archive_mirroring}" "${_pkg_name}" "${_pkg_url}";
if ! rtl_fileop mkdir "${_mirror_dname}/${_pkg_name}"\
|| ! rtl_fetch_url_wget "${_pkg_url}" "${_pkg_sha256sum}" "${_mirror_dname}/${_pkg_name}" "${_pkg_fname}" "${_pkg_name_real}" ""; then
- _rc=1; rtl_log_msg "warning" "Failed to mirror package \`%s', skipping." "${_pkg_name}";
+ _rc=1; rtl_log_msg "warning" "${MSG_pkgtool_pkg_mirror_fail}" "${_pkg_name}";
else
pkg_fetch_download_clean_dlcache "${_mirror_dname}" "${_pkg_name}" "${_pkg_fname}" "${_pkg_urls_git}";
fi;
@@ -110,20 +111,20 @@ pkgtoolp_mirror_fetch() {
fi;
if _pkg_urls_git="$(rtl_get_var_unsafe -u "PKG_${_pkg_name_real}_URLS_GIT")"; then
if [ -z "${_mirror_dname_git}" ]; then
- _rc=0; rtl_log_msg "verbose" "Git URL(s) mirroring disabled, skipping \`%s'." "${_pkg_name}";
+ _rc=0; rtl_log_msg "verbose" "${MSG_pkgtool_pkg_skip_git_mirror}" "${_pkg_name}";
elif [ "$(rtl_get_var_unsafe -u "PKG_${_pkg_name_real}_MIRRORS_GIT")" = "skip" ]; then
- _rc=0; rtl_log_msg "verbose" "Package \`%s' specifies to skip Git URL(s) mirroring, skipping." "${_pkg_name}";
+ _rc=0; rtl_log_msg "verbose" "${MSG_pkgtool_pkg_skip_git_mirror_disabled}" "${_pkg_name}";
elif [ "${_pkg_name}" != "${_pkg_name_real}" ]; then
- rtl_log_msg "info" "Mirroring package \`%s' (parent package: \`%s'), Git URL(s): \`%s'..." "${_pkg_name}" "${_pkg_name_real}" "${_pkg_urls_git}";
+ rtl_log_msg "info" "${MSG_pkgtool_pkg_git_mirroring_parent}" "${_pkg_name}" "${_pkg_name_real}" "${_pkg_urls_git}";
if ! rtl_fileop ln_symbolic "${_pkg_name_real}" "${_mirror_dname_git}/${_pkg_name}"; then
- _rc=1; rtl_log_msg "warning" "Failed to create symbolic link \`%s' for package \`%s' w/ parent package \`%s'."\
+ _rc=1; rtl_log_msg "warning" "${MSG_pkgtool_pkg_link_fail}"\
"${_mirror_dname_git}/${_pkg_name}" "${_pkg_name}" "${_pkg_name_real}";
fi;
else
- rtl_log_msg "info" "Mirroring package \`%s', Git URL(s): \`%s'..." "${_pkg_name}" "${_pkg_urls_git}";
+ rtl_log_msg "info" "${MSG_pkgtool_pkg_git_mirroring}" "${_pkg_name}" "${_pkg_urls_git}";
if ! rtl_fileop mkdir "${_mirror_dname_git}/${_pkg_name}"\
|| ! rtl_fetch_mirror_urls_git "${DEFAULT_GIT_ARGS}" "${_mirror_dname_git}/${_pkg_name}" ${_pkg_urls_git}; then
- _rc=1; rtl_log_msg "warning" "Failed to mirror package \`%s', skipping." "${_pkg_name}";
+ _rc=1; rtl_log_msg "warning" "${MSG_pkgtool_pkg_mirror_fail}" "${_pkg_name}";
else
pkg_fetch_download_clean_dlcache "${_mirror_dname_git}" "${_pkg_name}" "${_pkg_fname}" "${_pkg_urls_git}";
fi;
@@ -132,13 +133,14 @@ pkgtoolp_mirror_fetch() {
if [ -z "${_pkg_url}" ]\
&& [ -z "${_pkg_sha256sum}" ]\
&& [ -z "${_pkg_urls_git}" ]; then
- _rc=0; rtl_log_msg "verbose" "Package \`%s' has neither archive nor Git URL(s), skipping." "${_pkg_name}";
+ _rc=0; rtl_log_msg "verbose" "${MSG_pkgtool_pkg_skip_no_urls}" "${_pkg_name}";
fi;
fi; return "${_rc}";
};
pkgtoolp_restart_at() {
local _pkg_name="${1}" _rc=0; _status="";
+
if ! ex_pkg_load_dump "${_pkg_name}" "${BUILD_WORKDIR}"; then
_rc=1; _status="${_status}";
else case "${ARG_RESTART_AT}" in
@@ -155,6 +157,7 @@ pkgtoolp_restart_at() {
pkgtoolp_rdepends() {
local _pkg_name="${1}" _group_name="" _pkg_depends="" _pkg_name_rdepend="" _pkg_names=""\
_pkg_rdepends="" _rc=0 EX_PKG_BUILD_GROUPS="" EX_PKG_DISABLED="" EX_PKG_RDEPENDS_DIRECT=""; _status="";
+
if ! ex_pkg_load_groups; then
_rc=1; _status="Error: failed to load build groups.";
elif ! _group_name="$(ex_pkg_find_package "${EX_PKG_BUILD_GROUPS}" "${_pkg_name}")"; then
@@ -164,7 +167,7 @@ pkgtoolp_rdepends() {
elif ! ex_pkg_unfold_rdepends_direct "${_group_name}" "${_pkg_names}" "${_pkg_name}"; then
_rc=1; _status="Error: failed to unfold reverse dependency-expanded package name list for \`${_pkg_name}'.";
elif [ -z "${EX_PKG_DISABLED}" ] && [ -z "${EX_PKG_RDEPENDS_DIRECT}" ]; then
- rtl_log_msg "info" "Package \`%s' has no reverse dependencies." "${_pkg_name}";
+ rtl_log_msg "info" "${MSG_pkgtool_pkg_deps_rev_none}" "${_pkg_name}";
else for _pkg_name_rdepend in $(rtl_lsort "${EX_PKG_RDEPENDS_DIRECT}"); do
_pkg_rdepends="$(rtl_lconcat "${_pkg_rdepends}" "${_pkg_name_rdepend}")";
if _pkg_depends="$(rtl_lunfold_depends 'PKG_${_name}_DEPENDS' $(rtl_get_var_unsafe -u "PKG_"${_pkg_name}"_DEPENDS"))"\
@@ -173,24 +176,24 @@ pkgtoolp_rdepends() {
fi;
done;
if [ -n "${_pkg_rdepends}" ]; then
- rtl_log_msg "info" "Reverse dependencies of \`%s': %s" "${_pkg_name}" "${_pkg_rdepends}";
+ rtl_log_msg "info" "${MSG_pkgtool_pkgs_deps_rev}" "${_pkg_name}" "${_pkg_rdepends}";
fi;
if [ -n "${EX_PKG_DISABLED}" ]; then
- rtl_log_msg "info" "Reverse dependencies of \`%s' (disabled packages:) %s"\
- "${_pkg_name}" "$(rtl_lsort "${EX_PKG_DISABLED}")";
+ rtl_log_msg "info" "${MSG_pkgtool_pkgs_deps_rev_disabled}" "${_pkg_name}" "$(rtl_lsort "${EX_PKG_DISABLED}")";
fi;
fi; return "${_rc}";
};
pkgtoolp_shell() {
local _pkg_name="${1}" _rc=0; _status="";
+
if ! ex_pkg_load_dump "${_pkg_name}" "${BUILD_WORKDIR}"; then
_rc=1; _status="${_status}";
else rtl_log_env_vars "verbose" "package" $(rtl_get_vars_fast "^PKG_");
- rtl_log_msg "info" "Launching shell \`%s' within package environment and \`%s'." "${SHELL}" "${PKG_BUILD_DIR}";
- rtl_log_msg "info" "Run \$R to rebuild \`%s'." "${_pkg_name}";
- rtl_log_msg "info" "Run \$RS <step> to restart the specified build step of \`%s'" "${_pkg_name}";
- rtl_log_msg "info" "Run \$D to automatically regenerate the patch for \`%s'." "${_pkg_name}";
+ rtl_log_msg "info" "${MSG_pkgtool_shell_env1}" "${SHELL}" "${PKG_BUILD_DIR}";
+ rtl_log_msg "info" "${MSG_pkgtool_shell_env2}" "${_pkg_name}";
+ rtl_log_msg "info" "${MSG_pkgtool_shell_env3}" "${_pkg_name}";
+ rtl_log_msg "info" "${MSG_pkgtool_shell_env4}" "${_pkg_name}";
export ARCH BUILD_KIND \
BUILD_DLCACHEDIR BUILD_WORKDIR \
MAKE="make LIBTOOL=${PKG_LIBTOOL:-slibtool}" \
@@ -208,6 +211,7 @@ pkgtoolp_shell() {
pkgtoolp_tarball() {
local _pkg_name="${1}" _date="" _group_name="" _hname="" _pkg_name_full=""\
_pkg_version="" _rc=0 _tarball_fname="" EX_PKG_BUILD_GROUPS=""; _status="";
+
if ! ex_pkg_load_groups; then
_rc=1; _status="Error: failed to load build groups.";
elif ! _group_name="$(ex_pkg_find_package "${EX_PKG_BUILD_GROUPS}" "${_pkg_name}")"; then
@@ -225,16 +229,14 @@ pkgtoolp_tarball() {
_pkg_name_full="${_pkg_name}";
fi;
_tarball_fname="${_pkg_name_full}@${_hname}-${_date}.tbz2";
- rtl_log_msg "info" "Creating compressed tarball of \`%s' and \`%s_stderrout.log'..."\
- "${PKG_BASE_DIR}" "${_pkg_name}";
+ rtl_log_msg "info" "${MSG_pkgtool_tarball_creating}" "${PKG_BASE_DIR}" "${_pkg_name}";
if ! tar -C "${BUILD_WORKDIR}" -cpf - \
"${PKG_BASE_DIR#${BUILD_WORKDIR%/}/}" \
"${_pkg_name}_stderrout.log" |\
bzip2 -c -9 - > "${_tarball_fname}"; then
_rc=1; _status="Error: failed to create compressed tarball of \`${PKG_BASE_DIR}' and \`${_pkg_name}_stderrout.log'.";
else
- rtl_log_msg "info" "Created compressed tarball of \`%s' and \`%s_stderrout.log'."\
- "${PKG_BASE_DIR}" "${_pkg_name}";
+ rtl_log_msg "info" "${MSG_pkgtool_tarball_created}" "${PKG_BASE_DIR}" "${_pkg_name}";
fi;
fi; return "${_rc}";
};
@@ -242,6 +244,7 @@ pkgtoolp_tarball() {
pkgtoolp_update_diff() {
local _pkg_name="${1}" _diff_fname_dst="" _diff_fname_src="" _fname=""\
_fname_base="" _rc=0; _status="";
+
if ! ex_pkg_load_dump "${_pkg_name}" "${BUILD_WORKDIR}"; then
_rc=1; _status="${_status}";
else if [ -n "${PKG_VERSION}" ]; then
@@ -266,8 +269,7 @@ pkgtoolp_update_diff() {
elif ! rtl_fileop mv "${_diff_fname_src}" "${MIDIPIX_BUILD_PWD}/patches/${_diff_fname_dst}"; then
_rc=1; _status="Error: failed to rename diff(1) to \`${MIDIPIX_BUILD_PWD}/patches/${_diff_fname_dst}'.";
else trap - EXIT HUP INT TERM USR1 USR2;
- rtl_log_msg "info" "Updated \`%s/patches/%s'."\
- "${MIDIPIX_BUILD_PWD}" "${_diff_fname_dst}";
+ rtl_log_msg "info" "${MSG_pkgtool_updated_patches}" "${MIDIPIX_BUILD_PWD}" "${_diff_fname_dst}";
fi;
fi;
fi; return "${_rc}";
@@ -275,6 +277,7 @@ pkgtoolp_update_diff() {
pkgtool() {
local _rc=0 _status="" BUILD_GROUPS="" ARCH BUILD_KIND BUILD_WORKDIR PKGTOOL_PKGNAME PREFIX;
+
if ! . "${0%/*}/subr/pkgtool_init.subr"; then
_rc=1; printf "Error: failed to source \`${0%/*}/subr/pkgtool_init.subr'." >&2;
elif ! pkgtool_init "${@}"; then
@@ -296,7 +299,6 @@ pkgtool() {
fi;
};
-set +o errexit -o noglob -o nounset;
-export LANG=C LC_ALL=C; pkgtool "${@}";
+set +o errexit -o noglob -o nounset; pkgtool "${@}";
# vim:filetype=sh textwidth=0
diff --git a/subr/build_init.subr b/subr/build_init.subr
index 13819de6..c7669f14 100644
--- a/subr/build_init.subr
+++ b/subr/build_init.subr
@@ -68,7 +68,7 @@ buildp_init_args() {
};
buildp_init_env() {
- local _fname="" _rc=0; _status="";
+ local _fname="" _lang="${LANG:-C}" _rc=0; _status=""; _lang="${_lang%%_*}";
if ! cd "${0%/*}"; then
printf "Error: failed to change working directory to \`${0%/*}'." >&2; exit 1;
@@ -80,18 +80,25 @@ buildp_init_env() {
$(find subr.rtl -name *.subr) \
$(find subr -name *.subr) \
etc/build.theme \
+ "etc/build.msgs.${_lang}" \
+ "etc/rtl.msgs.${_lang}" \
;
do
if ! . "${_fname}"; then
printf "Error: failed to source \`%s'.\n" "${_fname}" >&2; exit 1;
fi;
done;
- if [ -e "etc/build.theme.local" ]; then
- if ! . "etc/build.theme.local"; then
- printf "Error: failed to source \`%s'.\n" "etc/build.theme.local" >&2; exit 1;
+ for _fname in \
+ "etc/build.theme.local" \
+ "etc/build.msgs.${_lang}.local" \
+ "etc/rtl.msgs.${_lang}.local" \
+ ;
+ do
+ if [ -e "${_fname}" ]; then
+ printf "Error: failed to source \`%s'.\n" "${_fname}" >&2; exit 1;
fi;
- fi;
- fi; return "${_rc}";
+ done;
+ fi; export LANG=C LC_ALL=C; return "${_rc}";
};
buildp_init_files() {
@@ -119,8 +126,8 @@ buildp_init_files() {
fi;
rtl_fileop touch "${DEFAULT_BUILD_LOG_FNAME}"; rtl_log_set_fname "${DEFAULT_BUILD_LOG_FNAME}";
if rtl_lmatch "${ARG_CLEAN_BUILDS}" "prefix" ","; then
- trap "rm -f \"${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}\" 2>/dev/null; rtl_log_msg \"fatalexit\" \"Build aborted.\"" HUP INT TERM USR1 USR2;
- rtl_log_msg "info" "-C prefix specified, cleaning prefix...";
+ trap "rm -f \"${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}\" 2>/dev/null; rtl_log_msg \"fatalexit\" \"${MSG_build_aborted}\"" HUP INT TERM USR1 USR2;
+ rtl_log_msg "info" "${MSG_build_clean_prefix}";
for _pname in ${DEFAULT_CLEAR_PREFIX_PATHS}; do
if ! rtl_fileop rm "${PREFIX}/${_pname}"; then
_rc=1; _status="failed to remove \`${PREFIX}/${_pname}'."; break;
diff --git a/subr/ex_pkg.subr b/subr/ex_pkg.subr
index f8267f54..e8e3ecb4 100644
--- a/subr/ex_pkg.subr
+++ b/subr/ex_pkg.subr
@@ -21,7 +21,7 @@ ex_pkg_check_depends() {
if ! rtl_lmatch "${_pkg_disabled}" "${_pkg_name_depend}"\
&& ! rtl_lmatch "${_pkg_finished}" "${_pkg_name_depend}"; then
if ! rtl_lmatch "${_pkg_names}" "${_pkg_name_depend}"; then
- rtl_log_msg "fatalexit" "Error: dependency \`%s' of \`%s' unknown." "${_pkg_name_depend}" "${_pkg_name}";
+ rtl_log_msg "fatalexit" "${MSG_build_unknown_dep}" "${_pkg_name_depend}" "${_pkg_name}";
else
_dependfl=1; break;
fi;
@@ -78,8 +78,8 @@ ex_pkg_get_packages() {
ex_pkg_load_dump() {
local _pkg_name="${1}" _workdir="${2}" _rc=0; _status="";
if [ ! -e "${_workdir}/${_pkg_name}.dump" ]; then
- rtl_log_msg "warning" "Warning: failed to locate environment dump for package \`%s' in \`%s'." "${_pkg_name}" "${_workdir}";
- rtl_log_msg "info" "Rebuilding package \`%s' w/ --dump-in build..." "${_pkg_name}";
+ rtl_log_msg "warning" "${MSG_pkgtool_no_env_dump}" "${_pkg_name}" "${_workdir}";
+ rtl_log_msg "info" "${MSG_pkgtool_rebuilding_pkg}" "${_pkg_name}";
(export ARCH BUILD_KIND BUILD_DLCACHEDIR BUILD_WORKDIR \
PREFIX PREFIX_CROSS PREFIX_MINGW32 PREFIX_MINIPIX \
PREFIX_NATIVE PREFIX_ROOT PREFIX_RPM;
diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr
index f91f536b..139cf94e 100644
--- a/subr/ex_pkg_dispatch.subr
+++ b/subr/ex_pkg_dispatch.subr
@@ -230,10 +230,10 @@ ex_pkg_dispatch() {
_perc_group="$(rtl_percentage "${EXP_PKG_DISPATCH_GROUP_CUR}" "${EXP_PKG_DISPATCH_GROUP_MAX}")";
if "${_dispatch_fn}" start_group "${_group_name}" "" "${EXP_PKG_DISPATCH_GROUP_CUR}" "${EXP_PKG_DISPATCH_GROUP_MAX}" "${_perc_group}"; then
if rtl_fileop mkdir "${_workdir}"\
- && rtl_log_msg "verbose" "Resolving \`%s' dependencies..." "${_group_name}"\
+ && rtl_log_msg "verbose" "${MSG_build_resolving_deps}" "${_group_name}"\
&& exp_pkg_dispatch_expand_packages "${_checkfl}" "${_forcefl}" "${_group_name}" "${_restart}" "${_reversefl}"\
&& exp_pkg_dispatch_complete "${_dispatch_fn}" "${_group_name}" "${EX_PKG_DISABLED}" "${EX_PKG_FINISHED}"\
- && rtl_log_msg "verbose" "Resolved \`%s' dependencies." "${_group_name}"\
+ && rtl_log_msg "verbose" "${MSG_build_resolved_deps}" "${_group_name}"\
&& EXP_PKG_DISPATCH_COUNT_MAX="$(rtl_llength "${EX_PKG_NAMES}")"\
&& [ "${EXP_PKG_DISPATCH_COUNT_MAX}" -gt 0 ]; then
_pkg_names="$(rtl_lconcat "${_pkg_names}" "${EX_PKG_NAMES}")";
diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr
index 5367172c..c13cfdfc 100644
--- a/subr/ex_pkg_env.subr
+++ b/subr/ex_pkg_env.subr
@@ -26,7 +26,7 @@ exp_pkg_env_defaults() {
if [ -z "${PKG_SUBDIR:-}" ]; then
if [ -n "${PKG_URLS_GIT:-}" ]\
&& [ -n "${PKG_FNAME:-}" ]; then
- rtl_log_msg "fatalexit" "Error: \${PKG_SUBDIR} must be specified given both \${PKG_FNAME} and \${PKG_URLS_GIT}.";
+ rtl_log_msg "fatalexit" "${MSG_pkg_fail_missing_vars}";
elif [ -n "${PKG_URLS_GIT:-}" ]; then
PKG_SUBDIR="${PKG_URLS_GIT%%=*}";
else case "${PKG_FNAME:-}" in
diff --git a/subr/pkg_fetch_download.subr b/subr/pkg_fetch_download.subr
index 9cd2fbe0..7a333947 100644
--- a/subr/pkg_fetch_download.subr
+++ b/subr/pkg_fetch_download.subr
@@ -20,7 +20,7 @@ pkg_fetch_download_clean_dlcache() {
done;
if [ "${_skipfl}" -eq 0 ]; then
_fname="${_dlcachedir}/${_pkg_name}/${_fname}";
- rtl_log_msg "verbose" "Deleting redundant file \`%s' for package \`%s'." "${_fname}" "${_pkg_name}";
+ rtl_log_msg "verbose" "${MSG_rtl_fetch_rm_redundant}" "${_fname}" "${_pkg_name}";
rtl_fileop rm "${_fname}";
fi;
done;
diff --git a/subr/pkg_install_files.subr b/subr/pkg_install_files.subr
index d387293b..0cd03e43 100644
--- a/subr/pkg_install_files.subr
+++ b/subr/pkg_install_files.subr
@@ -92,7 +92,7 @@ pkgp_install_files_strip() {
if [ "${_stripfl:-0}" -eq 1 ]; then
for _bin_path in $(find "${_tree_root}" -perm /a=x -type f); do
if objdump -sj .debug_frame -j .debug_info "${_bin_path}" >/dev/null 2>&1; then
- rtl_log_msg "pkg_strip" "Stripping %s..." "${_bin_path}";
+ rtl_log_msg "pkg_strip" "${MSG_pkg_strip}" "${_bin_path}";
if ! "${PKG_TARGET}-strip" "${_bin_path}"; then
return 1;
fi;
diff --git a/subr/pkgtool_init.subr b/subr/pkgtool_init.subr
index 2a408423..4a90cc2c 100644
--- a/subr/pkgtool_init.subr
+++ b/subr/pkgtool_init.subr
@@ -18,27 +18,35 @@ pkgtoolp_init_args() {
};
pkgtoolp_init_env() {
- local _fname="" _rc=0; _status="";
+ local _fname="" _lang="${LANG:-C}" _rc=0; _status=""; _lang="${_lang%%_*}";
+
if ! cd "${0%/*}"; then
printf "Error: failed to change working directory to \`${0%/*}'." >&2; exit 1;
elif ! umask 022; then
printf "Error: failed to set umask(2).\n" >&2; exit 1;
else for _fname in \
- $(find subr.rtl -name *.subr) \
- $(find subr -name *.subr) \
- etc/pkgtool.theme \
+ $(find subr.rtl -name *.subr) \
+ $(find subr -name *.subr) \
+ etc/pkgtool.theme \
+ "etc/pkgtool.msgs.${_lang}" \
+ "etc/rtl.msgs.${_lang}" \
;
do
if ! . "${_fname}"; then
printf "Error: failed to source \`%s'.\n" "${_fname}" >&2; exit 1;
fi;
done;
- if [ -e "etc/pkgtool.theme.local" ]; then
- if ! . "etc/pkgtool.theme.local"; then
- printf "Error: failed to source \`%s'.\n" "etc/pkgtool.theme.local" >&2; exit 1;
+ for _fname in \
+ "etc/pkgtool.theme.local" \
+ "etc/pkgtool.msgs.${_lang}.local" \
+ "etc/rtl.msgs.${_lang}.local" \
+ ;
+ do
+ if [ -e "${_fname}" ]; then
+ printf "Error: failed to source \`%s'.\n" "${_fname}" >&2; exit 1;
fi;
- fi;
- fi; return "${_rc}";
+ done;
+ fi; export LANG=C LC_ALL=C; return "${_rc}";
};
pkgtoolp_init_getopts() {