OSDN Git Service

The bug in transferring option values to restarted run is fixed again.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sun, 18 Nov 2012 07:03:44 +0000 (16:03 +0900)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sun, 18 Nov 2012 07:03:44 +0000 (16:03 +0900)
modified:   portsreinstall
modified:   portsreinstall~

portsreinstall
portsreinstall~

index 0228e3a..e6e9dcf 100755 (executable)
@@ -10,7 +10,7 @@
 # ================================================
 
 APPNAME=`basename "$0"`
-MYVERSION=2.0.0+toward_2.0.1_20121118154840
+MYVERSION=2.0.0+toward_2.0.1_20121118160208
 
 PREFIX=${PREFIX:-/usr/local}
 CONFFILE=${PREFIX}/etc/${APPNAME}.conf
@@ -1396,8 +1396,7 @@ then
                -e '^renew_options=' \
                -e '^supress_self_upadte=' \
                -e '^supress_obsolete_db_clean=' \
-               > ${DBDIR}/saved_options.sh << eof
-eof
+               > ${DBDIR}/saved_options.sh || :
        touch "${DBDIR}/COMPLETE_SAVE_OPTIONS"
 else
        t_avoid_vulner=$avoid_vulner
@@ -1408,6 +1407,7 @@ else
        [ $t_skip_unchanged = no -o $t_skip_unchanged = $skip_unchanged ] || echo "WARNING: -q option is specified but ignored by transferring the settings from the previous run." >&2
        [ $t_keep_distfiles = no -o $t_keep_distfiles = $keep_distfiles ] || echo "WARNING: -d option is specified but ignored by transferring the settings from the previous run." >&2
 fi
+
 echo "INFO: List of option values:"
 echo "-----------------------------------------"
 cat "${DBDIR}"/saved_options.sh
index 4480be2..48ca078 100755 (executable)
@@ -10,7 +10,7 @@
 # ================================================
 
 APPNAME=`basename "$0"`
-MYVERSION=2.0.0+toward_2.0.1_20121118153031
+MYVERSION=2.0.0+toward_2.0.1_20121118155412
 
 PREFIX=${PREFIX:-/usr/local}
 CONFFILE=${PREFIX}/etc/${APPNAME}.conf
@@ -1332,7 +1332,6 @@ redo)
                touch "${DBDIR}/REQUIRE_CHK_NEW_TARGET"
        fi
        echo "[REDO mode]"
-set -x
        ;;
 prepare)
        chk_privilege
@@ -1384,21 +1383,20 @@ terminate_process ()
 if [ ! -e "${DBDIR}/COMPLETE_SAVE_OPTIONS" ]
 then
        [ ! -e "${DBDIR}"/saved_options.sh ] || echo "(Previous option settings for '-s', '-q' and '-d' are reset.)"
-       cat > ${DBDIR}/saved_options.sh << eof
-target_dependent_ports=$target_dependent_ports
-target_required_ports=$target_required_ports
-target_dependent_ports_form2=$target_dependent_ports_form2
-target_required_ports_form2=$target_required_ports_form2
-taboo_ports=$taboo_ports
-taboo_ports_form2=$taboo_ports_form2
-load_pkgtoolsconf=$load_pkgtoolsconf
-avoid_vulner=$avoid_vulner
-skip_unchanged=$skip_unchanged
-keep_distfiles=$keep_distfiles
-renew_options=$renew_options
-supress_self_upadte=$supress_self_upadte
-supress_obsolete_db_clean=$supress_obsolete_db_clean
-eof
+       set | grep -e '^target_dependent_ports=' \
+               -e '^target_required_ports=' \
+               -e '^target_dependent_ports_form2=' \
+               -e '^target_required_ports_form2=' \
+               -e '^taboo_ports=' \
+               -e '^taboo_ports_form2=' \
+               -e '^load_pkgtoolsconf=' \
+               -e '^avoid_vulner=' \
+               -e '^skip_unchanged=' \
+               -e '^keep_distfiles=' \
+               -e '^renew_options=' \
+               -e '^supress_self_upadte=' \
+               -e '^supress_obsolete_db_clean=' \
+               > ${DBDIR}/saved_options.sh || :
        touch "${DBDIR}/COMPLETE_SAVE_OPTIONS"
 else
        t_avoid_vulner=$avoid_vulner
@@ -1409,6 +1407,7 @@ else
        [ $t_skip_unchanged = no -o $t_skip_unchanged = $skip_unchanged ] || echo "WARNING: -q option is specified but ignored by transferring the settings from the previous run." >&2
        [ $t_keep_distfiles = no -o $t_keep_distfiles = $keep_distfiles ] || echo "WARNING: -d option is specified but ignored by transferring the settings from the previous run." >&2
 fi
+
 echo "INFO: List of option values:"
 echo "-----------------------------------------"
 cat "${DBDIR}"/saved_options.sh