OSDN Git Service

Fixed a bug that the redo list was not recorded correctly when any requirement succeeds.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Mon, 10 Sep 2018 02:36:44 +0000 (10:36 +0800)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Mon, 10 Sep 2018 02:36:44 +0000 (10:36 +0800)
 Changes to be committed:
modified:   lib/libcommand_do.sh
modified:   lib/libdatabase_query.sh
modified:   lib/libmain.sh
modified:   lib/libprogram.sh
modified:   lib/libreinstall.sh

lib/libcommand_do.sh
lib/libdatabase_query.sh
lib/libmain.sh
lib/libprogram.sh
lib/libreinstall.sh

index 40adf2b..86ba96d 100644 (file)
@@ -42,7 +42,7 @@ command_do_meta_process_for_redo ()
 }
 
 # ============= Determine specified targets =============
-command_do_determin_specified_targets ()
+command_do_determine_specified_targets ()
 {
        local PROGRAM_DEPENDS
        PROGRAM_DEPENDS=''
@@ -1244,7 +1244,7 @@ command_do_prepare ()
        command_do_meta_process_for_redo
        
        # Determine specified targets
-       command_do_determin_specified_targets
+       command_do_determine_specified_targets
        
        # Show specified targets
        command_do_show_specified_targets
index 70f454f..6ce890a 100644 (file)
@@ -616,7 +616,7 @@ database_query_show_single_list_exec ()
                flag_filter_only_target=y
                ;;
        redo )
-               message_echo "The following ports need (re)installation but are to be skipped until any of their failed requirements succeeds:"
+               message_echo "The following ports need (re)installation after success of the all requirements:"
                message_dependency_scope "$deptag" "$level"
                message_echo
                list=todo_after_requirements_succeed.$dbsuffix.list
index 3b093e8..5be867f 100644 (file)
@@ -12,7 +12,7 @@ main_set_version ()
        MYVERSION=4.1.0
        COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$'
        # Template for development versions
-       MYVERSION=4.0.0+toward_4.1.0_20180909155220
+       MYVERSION=4.0.0+toward_4.1.0_20180910103620
        COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$'
 }
 
index e24d601..e3a79ba 100644 (file)
@@ -130,7 +130,7 @@ program_reset_exec_restartable_loop_operation
 # ============= Execute a restartable loop operation =============
 program_exec_restartable_loop_operation ()
 {
-       local inputdb tmp_diff looplist nlines PROGRAM_NUM_STEPS PROGRAM_STEP_PROGRESS iline item
+       local inputdb tmp_diff looplist nlines PROGRAM_NUM_STEPS PROGRAM_STEP_PROGRESS PROGRAM_STEP_COUNTER iline item
        inputdb=$1
        tmp_diff=${TMPDIR}/program_exec_restartable_loop_operation:diff
        looplist=${DBDIR}/stage.loop_list/$inputdb
@@ -138,10 +138,8 @@ program_exec_restartable_loop_operation ()
        then
                if [ -f "$looplist.remain" -a ! -e "${DBDIR}/stage.reinit_loop/$PROGRAM_STAGETAG" ]
                then
-                       cp "$looplist.remain" "$looplist.remain.tmp"
-                       cat "$looplist.remain.new" >> $looplist.remain.tmp
-                       sort -u "$looplist.remain.tmp" >  $looplist.remain.tmp2
-                       mv "$looplist.remain.tmp2" "$looplist.remain"
+                       sort -u "$looplist.remain" "$looplist.remain.new" > $looplist.remain.tmp
+                       mv "$looplist.remain.tmp" "$looplist.remain"
                fi
                cat "$looplist" 2> /dev/null > $looplist.tmp || :
                mv "$looplist.tmp" "$looplist.prev"
index 238ed49..bed58eb 100644 (file)
@@ -23,7 +23,6 @@ reinstall_skip ()
        message=$1
        message_echo "($message)"
        message_target_relations "$REINSTALL_ORIGIN"
-       fileedit_rm_a_line "$REINSTALL_ORIGIN" "${DBDIR}/stage.loop_list/reinst_todo.remain"
 }
 
 # ============= Check whether a package is forbidden due to conflict =============
@@ -182,7 +181,6 @@ reinstall_errproc ()
        mkdir -p "${DBDIR}/notes/$REINSTALL_ORIGIN"
        echo "$position" > ${DBDIR}/notes/$REINSTALL_ORIGIN/note_failtre
        database_record_failure "$REINSTALL_ORIGIN" noclean
-       fileedit_rm_a_line "$REINSTALL_ORIGIN" "${DBDIR}/stage.loop_list/reinst_todo.remain"
        message_report_failure_for_a_port "$REINSTALL_ORIGIN"
 }
 
@@ -701,7 +699,7 @@ reinstall_tell_update_to_depandents ()
                                touch "${DBDIR}/requires/$origin_dependent/need_reinstall_due_to_upgraded_requirements.$dbsuffix"
                                fileedit_rm_a_line "$origin_dependent" \
                                        "${DBDIR}/success.$dbsuffix.list"
-                               fileedit_rm_a_line "$origin_dependent" \
+                               fileedit_add_a_line_if_new "$origin_dependent" \
                                        "${DBDIR}/todo_after_requirements_succeed.$dbsuffix.list"
                        done
                done
@@ -1328,7 +1326,6 @@ reinstall_exec_reinstall_chk_interactive_mode ()
                        reinstall_restore_if_temporarily_deinstalled
                        database_build_update_pkgname "$REINSTALL_ORIGIN" > /dev/null
                        message_echo "INFO: Further processes for this port are skipped because it is $msg_is_interactive."
-                       fileedit_rm_a_line "$REINSTALL_ORIGIN" "${DBDIR}/stage.loop_list/reinst_todo.remain"
                        return 1
                fi
        fi
@@ -1687,6 +1684,7 @@ reinstall_exec ()
        REINSTALL_NEWPKGNAME=`database_build_get_new_pkgname "$REINSTALL_ORIGIN"`
        REINSTALL_IS_FROZEN=no
        grep -qFx "$REINSTALL_ORIGIN" "${DBDIR}/freeze.all.list" 2> /dev/null && REINSTALL_IS_FROZEN=yes
+       set +x
        message_stage_title "$PROGRAM_STEP_COUNTER $REINSTALL_ORIGPKGTAG"
        reinstall_exec_chk_skip && reinstall_exec_reinstall || :
        message_echo