OSDN Git Service

A bug at the end of a reinstallation process is fixed.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Fri, 1 Jul 2016 15:25:55 +0000 (00:25 +0900)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Fri, 1 Jul 2016 15:25:55 +0000 (00:25 +0900)
Changes to be committed:
deleted:    bin/.portsreinstall.kate-swp
modified:   bin/portsreinstall
modified:   lib/libdatabase_build.sh
modified:   lib/libreinstall.sh

bin/.portsreinstall.kate-swp [deleted file]
bin/portsreinstall
lib/libdatabase_build.sh
lib/libreinstall.sh

diff --git a/bin/.portsreinstall.kate-swp b/bin/.portsreinstall.kate-swp
deleted file mode 100644 (file)
index 687be59..0000000
Binary files a/bin/.portsreinstall.kate-swp and /dev/null differ
index a7413eb..67ea4dc 100755 (executable)
@@ -15,7 +15,7 @@ APPNAME=`basename "$0"`
 MYVERSION=3.3.0
 COMPATIBLE_VERSIONS='^(3\.[1-3]\.[0-9]+)$'
 # Template for development versions
-MYVERSION=3.2.1+toward_3.3.0_20160630210812
+MYVERSION=3.2.1+toward_3.3.0_20160701234032
 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}
@@ -865,11 +865,29 @@ _program_exec_and_record_completion__operation ()
        local dbrequires_valesc
        message_section_title "Removing duplicated items in dependents lists"
        program_exec_restartable_loop_operation make_dependents_lists_unique
-       program_exec_restartable_loop_operation make_ignored_dependents_lists_unique
        message_echo
 }
 program_exec_and_record_completion MAKE_DEPENDENTS_LISTS_UNIQUE
 
+# Remove duplicated lines in ignored dependents lists
+PROGRAM_DEPENDS='CONVERT_REQUIREMENTS_LIST INSPECT_DEPENDENTS'
+_program_exec_restartable_loop_operation__routine ()
+{
+       local dbpath tag level dstdb
+       dstdb=$1
+       cat "$dstdb" "$dstdb.raw" 2> /dev/null | sort -u > $dstdb.tmp
+       mv "$dstdb.tmp" "$dstdb"
+       rm -f "$dstdb.raw"
+}
+_program_exec_and_record_completion__operation ()
+{
+       local dbrequires_valesc
+       message_section_title "Removing duplicated items in ignored dependents lists"
+       program_exec_restartable_loop_operation make_ignored_dependents_lists_unique
+       message_echo
+}
+program_exec_and_record_completion MAKE_IGNORED_DEPENDENTS_LISTS_UNIQUE
+
 # Preparation of target attribute information
 for _TARGET_ATTR_INFO_table in requirements dependents itself
 do
@@ -916,7 +934,7 @@ do
 done
 
 # Post-process after the preparation of target attribute information
-PROGRAM_DEPENDS='MAKE_DEPENDENTS_LISTS_UNIQUE TARGET_ATTR_INFO:requirements TARGET_ATTR_INFO:dependents'
+PROGRAM_DEPENDS='MAKE_DEPENDENTS_LISTS_UNIQUE MAKE_IGNORED_DEPENDENTS_LISTS_UNIQUE TARGET_ATTR_INFO:requirements TARGET_ATTR_INFO:dependents'
 _program_exec_and_record_completion__operation ()
 {
        message_section_title "Post-process after the preparation of target attribute information"
@@ -1000,7 +1018,7 @@ program_exec_and_record_completion INSPECT_NECESSITY
 # Inspection of necessary upgrades
 for _NECESSARY_UPDATES_level in direct full
 do
-       PROGRAM_DEPENDS='INSPECT_NECESSITY INSPECT_ALL_DEPENDENCIES MAKE_DEPENDENTS_LISTS_UNIQUE'
+       PROGRAM_DEPENDS='INSPECT_NECESSITY INSPECT_ALL_DEPENDENCIES MAKE_DEPENDENTS_LISTS_UNIQUE MAKE_IGNORED_DEPENDENTS_LISTS_UNIQUE'
        _program_exec_restartable_loop_operation__routine ()
        {
                local markerpath level dbpath origin tag
@@ -1034,7 +1052,7 @@ done
 # Preparation for inspection of new leaf ports
 if [ ! -e "${DBDIR}/inspected_ports_only_partially" ]
 then
-       PROGRAM_DEPENDS='INSPECT_ALL_DEPENDENCIES MAKE_DEPENDENTS_LISTS_UNIQUE PARSE_CONF'
+       PROGRAM_DEPENDS='INSPECT_ALL_DEPENDENCIES MAKE_DEPENDENTS_LISTS_UNIQUE MAKE_IGNORED_DEPENDENTS_LISTS_UNIQUE PARSE_CONF'
        _program_exec_and_record_completion__operation ()
        {
                message_section_title "Preparation for inspection of new leaf ports"
@@ -1057,7 +1075,7 @@ fi
 # Inspection of new primary leaf ports
 if [ ! -e "${DBDIR}/inspected_ports_only_partially" ]
 then
-       PROGRAM_DEPENDS='INSPECT_ALL_DEPENDENCIES MAKE_DEPENDENTS_LISTS_UNIQUE PREPARE_INSPECT_LEAF_PORTS PARSE_CONF'
+       PROGRAM_DEPENDS='INSPECT_ALL_DEPENDENCIES MAKE_DEPENDENTS_LISTS_UNIQUE MAKE_IGNORED_DEPENDENTS_LISTS_UNIQUE PREPARE_INSPECT_LEAF_PORTS PARSE_CONF'
        _program_exec_restartable_loop_operation__routine ()
        {
                local origin origin_ini origin_esc dbpath origin_req
@@ -1081,7 +1099,8 @@ then
                fi
                if [ -e "$dbpath/requirements.all.full" -o -e "$dbpath/ignored_requirements.all" ]
                then
-                       grep -v -E -f "${DBDIR}/conf/HOLD_PORTS.grep_pattern" "$dbpath/requirements.all.full" "$dbpath/ignored_requirements.all" | \
+                       cat "$dbpath/requirements.all.full" "$dbpath/ignored_requirements.all" 2> /dev/null | \
+                               grep -v -E -f "${DBDIR}/conf/HOLD_PORTS.grep_pattern" | \
                                fileedit_add_lines_if_new "${DBDIR}/stage.loop_list/leaf_ports_secondary_candidates" || :
                fi
                fileedit_add_a_line_if_new "^$origin_esc$" "${DBDIR}/grep.leaf_ports.pattern"
@@ -1102,7 +1121,7 @@ fi
 # Inspection of requirements of new leaf ports
 if [ ! -e "${DBDIR}/inspected_ports_only_partially" ]
 then
-       PROGRAM_DEPENDS='INSPECT_ALL_DEPENDENCIES MAKE_DEPENDENTS_LISTS_UNIQUE INSPECT_PRIMARY_LEAF_PORTS PARSE_CONF'
+       PROGRAM_DEPENDS='INSPECT_ALL_DEPENDENCIES MAKE_DEPENDENTS_LISTS_UNIQUE MAKE_IGNORED_DEPENDENTS_LISTS_UNIQUE INSPECT_PRIMARY_LEAF_PORTS PARSE_CONF'
        _program_exec_and_record_completion__operation ()
        {
                local num_leaves num_leaves_prev num_inspect num_leaves_new
@@ -1361,7 +1380,7 @@ _program_exec_and_record_completion__operation ()
 program_exec_and_record_completion CLEANUP_REINST_STATUS
 
 # Completion of building the temporary database
-PROGRAM_DEPENDS='REDO_INIT SETUP_REINST_TODO CLEANUP_REINST_STATUS PARSE_CONF INSPECT_ALL_DEPENDENCIES NECESSARY_UPDATES:direct NECESSARY_UPDATES:full PARSE_TARGET_ATTR_INFO MAKE_DEPENDENTS_LISTS_UNIQUE COLLECT_LEAF_PORTS_TO_DELETE'
+PROGRAM_DEPENDS='REDO_INIT SETUP_REINST_TODO CLEANUP_REINST_STATUS PARSE_CONF INSPECT_ALL_DEPENDENCIES NECESSARY_UPDATES:direct NECESSARY_UPDATES:full PARSE_TARGET_ATTR_INFO MAKE_DEPENDENTS_LISTS_UNIQUE MAKE_IGNORED_DEPENDENTS_LISTS_UNIQUE COLLECT_LEAF_PORTS_TO_DELETE'
 _program_exec_and_record_completion__operation ()
 {
        message_section_title "The temporary database is completely built up"
index 1b2a5b8..d25196a 100644 (file)
@@ -680,7 +680,7 @@ database_build_get_complete_recursive_dependency ()
                                message_echo "        ${APPNAME} -f" >&2
                                exit 1
                        else
-                               message_echo 'Exploring a node port to terminate the loop by evaluating only build-and-run-time dependencies as essential.' >&2
+                               message_echo 'Exploring a node port to terminate the loop by evaluating only build-and-run-time dependencies as essential ones.' >&2
                                echo "$origin" > $tmppath.ports_in_loop
                                cat "$tmppath.ports_in_loop.tmp" >> $tmppath.ports_in_loop
                                echo "$origin" >> $tmppath.ports_in_loop
index ce7e490..dc1f62b 100644 (file)
@@ -513,7 +513,7 @@ reinstall_tell_update_to_depandents ()
                do
                        dbsuffix=${tag}.${level}
                        cat "$REINSTALL_DBNODE_DIR/dependents.$dbsuffix" "$REINSTALL_DBNODE_DIR/dependents.$dbsuffix.orig" \
-                               "$REINSTALL_DBNODE_DIR/ignored_dependents.$tag" "$REINSTALL_DBNODE_DIR/ignored_dependents.$tag.orig"
+                               "$REINSTALL_DBNODE_DIR/ignored_dependents.$tag" "$REINSTALL_DBNODE_DIR/ignored_dependents.$tag.orig" \
                                2> /dev/null \
                                | sort -u \
                                | while read origin_dependent