OSDN Git Service

[BUG FIX] Error messages from failed detection of option configuration were not output.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Thu, 18 Aug 2016 04:21:11 +0000 (13:21 +0900)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Thu, 18 Aug 2016 04:21:11 +0000 (13:21 +0900)
Changes to be committed:
modified:   README
modified:   bin/portsreinstall
modified:   lib/libdatabase_build.sh
modified:   man/portsreinstall.8

README
bin/portsreinstall
lib/libdatabase_build.sh
man/portsreinstall.8

diff --git a/README b/README
index 07bbcc1..668aedd 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 ================================================================================
  portsreinstall - ports upgrading utility for massive forced reinstallation
-  Version 3.3.1, August 17, 2016
+  Version 3.3.1, August 18, 2016
  Copyright (C) 2010-2016 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
 ================================================================================
 
index 9ae6bf3..ee70834 100755 (executable)
@@ -15,7 +15,7 @@ APPNAME=`basename "$0"`
 MYVERSION=3.3.1
 COMPATIBLE_VERSIONS='^(3\.[1-3]\.[0-9]+)$'
 # Template for development versions
-MYVERSION=3.3.0+toward_3.3.1_20160817145426
+MYVERSION=3.3.0+toward_3.3.1_20160818131629
 COMPATIBLE_VERSIONS='^(3\.[1-3]\.[0-9]+\+toward_3\.[1-3]\.[0-9]+_[0-9]+|3\.[1-3]\.[0-9]+)$'
 MYPREFIX=`dirname "\`dirname \"$0\"\`" | sed 's|/bin$||'`
 MYPREFIX=${MYPREFIX:-/usr/local}
index a56c60c..0b83431 100644 (file)
@@ -459,7 +459,7 @@ database_build_is_currentpkg_latest ()
 # ============= Recursively inspect dependencies of a port and build a node database of the information =============
 database_build_inspect_dependencies ()
 {
-       local origin_orig origin_dependent origin_orig_regexp origin origin_regexp tag stage dbpath origin_id origin_dependency DEPTH_INDEX_orig nlines iline dist_subdir_rpl inspected_level inspected_levels_compatible origin_tmp inspected_level_tmp conf_updated
+       local origin_orig origin_dependent origin_orig_regexp origin origin_regexp tag stage dbpath origin_id origin_dependency DEPTH_INDEX_orig nlines iline dist_subdir_rpl inspected_level inspected_levels_compatible origin_tmp inspected_level_tmp conf_updated tmp_portsdb_work tmp_portopt
        origin_orig=$1
        origin_dependent=$2
        [ -z "$origin_orig" ] && return
@@ -503,11 +503,19 @@ database_build_inspect_dependencies ()
                                cp -R "${DBDIR}/conf/each_port/$origin/"* "$dbpath/" > /dev/null 2>&1 || :
                        fi
                        tmp_portsdb_work=${TMPDIR}/database_build_inspect_dependencies:portsdb_work
+                       tmp_portopt=${TMPDIR}/database_build_inspect_dependencies:portopt
                        [ -d "$tmp_portsdb_work" ] || mkdir "$tmp_portsdb_work"
                        ( set -e
                                export PORT_DBDIR=$tmp_portsdb_work
                                export __MAKE_CONF=
-                               database_build_make "$origin" showconfig > $dbpath/ports_options.default
+                               if database_build_make "$origin" showconfig > $tmp_portopt
+                               then
+                                       cp "$tmp_portopt" "$dbpath"/ports_options.default
+                               else
+                                       cat "$tmp_portopt" >&2
+                                       message_echo 'Error in detecting the default options.' 2>&1
+                                       exit 1
+                               fi
                        )
                        if [ `wc -c < $dbpath/ports_options.default` -gt 0 ]
                        then
@@ -520,7 +528,14 @@ database_build_inspect_dependencies ()
                                else
                                        database_build_make "$origin" config-conditional
                                fi
-                               database_build_make "$origin" showconfig > $dbpath/ports_options.current
+                               if database_build_make "$origin" showconfig > $tmp_portopt
+                               then
+                                       cp "$tmp_portopt" "$dbpath"/ports_options.current
+                               else
+                                       cat "$tmp_portopt" >&2
+                                       message_echo 'Error in detecting the current options.' 2>&1
+                                       exit 1
+                               fi
                        else
                                cp /dev/null "$dbpath/ports_options.current"
                        fi
index af83e9e..9729587 100644 (file)
@@ -2,7 +2,7 @@
 .\" ports reinstall installation guide
 .\" Copyright (C) 2010-2016 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
 .\" ==================================================================================
-.TH PORTSREINSTALL 8 "10 July 2016" "FreeBSD" "FreeBSD System Manager's Manual"
+.TH PORTSREINSTALL 8 "18 August 2016" "FreeBSD" "FreeBSD System Manager's Manual"
 .SH NAME
 portsreinstall \- ports upgrading utility for massive forced reinstallation
 .SH SYNOPSIS
@@ -939,9 +939,11 @@ Configuration file of \fBportupgrade\fR(1).
 .SH HISTORY
 \fBportsreinstall\fR has been developed as below.
 .TP
-3.3.1 (17 August 2016)
+3.3.1 (18 August 2016)
 .RS
 [BUG FIX] Detection of the default option configuration was unsuccessful or wrong when /etc/make.conf was configured; some ports caused aborting in the phase of inspection.
+.PP
+[BUG FIX] Error messages from failed detection of option configuration were not output.
 .RE
 .TP
 3.3.0 (10 July 2016)