[BUG FIX] Some message output failed with a warning "3: Bad file descriptor" in some environment (detected in 10.0-RELEASE).
modified: bin/portsreinstall
modified: lib/libcommand.sh
modified: lib/libdatabase_query.sh
modified: lib/libmessage.sh
modified: man/portsreinstall.8
# MYVERSION=3.0.6
# COMPATIBLE_VERSIONS='^(3\.0\.[0-9]+)$'
# Template for development versions
-MYVERSION=3.0.5+toward_3.0.6_20140531053505
+MYVERSION=3.0.5+toward_3.0.6_20140531202509
COMPATIBLE_VERSIONS='^(3\.0\.[0-9]+\+toward_3\.0\.[0-9]+_[0-9]+|3\.0\.[0-9]+)$'
MYPREFIX=`dirname "\`dirname \"$0\"\`" | sed 's|/bin$||'`
MYPREFIX=${MYPREFIX:-/usr/local}
temp_terminate_process ()
{
+ local tmp_msg
+ tmp_msg=${TMPDIR}/temp_terminate_process:msg
[ $errno -eq 0 -o $opt_batch_mode = yes ] && return
temp_terminate_process_common
- [ -n "$COMMAND_RESTART" ] || message_cat 3<< eof
+ [ -n "$COMMAND_RESTART" ] && return
+ cat > $tmp_msg << eof
Instead, if you only want to construct the temporary database so as to stop before the actual reinstallation, execute as:
${APPNAME} prepare
eof
+ message_cat "$tmp_msg"
}
# ============= Opening title =============
tmp_pkgs=${TMPDIR}/command_exec_irrespective_of_saved_options:pkgs
tmp_orgs=${TMPDIR}/command_exec_irrespective_of_saved_options:orgs
tmp_pkgs_for_an_org=${TMPDIR}/command_exec_irrespective_of_saved_options:pkgs_for_an_org
+ tmp_pkgs_for_an_org_msg=${TMPDIR}/command_exec_irrespective_of_saved_options:pkgs_for_an_org_msg
_command_exec_irrespective_of_saved_options__notify_ignored_options
if [ $# -eq 0 ]
then
message_echo "Port [$origin] has multiply registered packages."
message_echo "The valid one will be [$pkg_valid]."
message_echo "Invalid one(s) will be as follows and to be deleted:"
- sed 1d "$tmp_pkgs_for_an_org" | cut -d ' ' -f 2 | message_cat <&3
+ sed 1d "$tmp_pkgs_for_an_org" | cut -d ' ' -f 2 > $tmp_pkgs_for_an_org_msg
+ message_cat "$tmp_pkgs_for_an_org_msg"
errout=/dev/stderr
[ "x$opt_batch_mode" = xyes ] && errout=/dev/null
if backup_pkg=`pkgsys_create_backup_pkg "$pkg_valid" "${DBDIR}/backup_packages"`
# ============= Execute command operations which must be done before actual (re/de)installation processes =============
command_exec_before_actual_re_de_installation ()
{
+ local tmp_msg
case $COMMAND_MODE in
do|redo)
case $COMMAND_DO_MODE in
prepare)
- message_cat 3<< eof
+ tmp_msg=${TMPDIR}/command_exec_before_actual_re_de_installation:msg
+ cat > "$tmp_msg" << eof
Done (skipped reinstallation) at `message_timestamp`
You can restart this process from the aborted/terminated point by executing without options or arguments as:
${APPNAME}
eof
+ message_cat "$tmp_msg"
temp_terminate_process ()
{
}
# ============= Check whether configurations for a port is default =============
database_query_is_default_conf ()
{
- local origin mode dbpath tmp_msg is_customized is_requiremnt_replaced files origin_regexp tmp_old tmp_new origin_requirement
+ local origin mode dbpath tmp_msg is_customized is_requiremnt_replaced files origin_regexp tmp_old tmp_new origin_requirement tmp_msg_customized
origin=$1
mode=$2
dbpath=${DBDIR}/requires/$origin
[ `wc -c < $dbpath/is_customized` -eq 0 ] && return
if [ "x$mode" != xquiet ]
then
+ tmp_msg_customized=${TMPDIR}/database_query_is_default_conf:msg_customized
message_echo "INFO: This port is configured to be non-default because of"
- sed 's/^/ /' "$dbpath/is_customized" | message_cat <&3
+ sed 's/^/ /' "$dbpath/is_customized" > $tmp_msg_customized
+ message_cat "$tmp_msg_customized"
message_echo " so the prebuilt package is not used."
fi
return 1
}
# ============= Output a message from stdin except for the batch mode =============
-# Input must be given via descriptor 3 if no file is given as the argument.
+# Use via pipe or redirection without argument is discouraged because it violates the screen size detection.
message_cat ()
{
local ncolumns
[ "x$opt_batch_mode" = xyes ] && return
ncolumns=`misc_get_console_column_size`
- if [ $# -eq 0 ]
- then
- fold -s -w $ncolumns <&3
- else
- fold -s -w $ncolumns "$@"
- fi
+ fold -s -w $ncolumns "$@"
}
# ============= Output a credit =============
[BUG FIX] It silently failed to launch if the ports tree is missing or broken.
.PP
[BUG FIX] The short help lacked descriptions on \fBneed\fR command.
+.PP
+[BUG FIX] Some message output failed with a warning "3: Bad file descriptor" in some environment (detected in 10.0-RELEASE).
.RE
.TP
3.0.5 (14 December 2013)