OSDN Git Service

Fixed a bug that incompletion of necessary build dependent detection caused incomlete...
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sun, 16 Sep 2018 13:14:24 +0000 (22:14 +0900)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sun, 16 Sep 2018 13:14:24 +0000 (22:14 +0900)
 Changes to be committed:
modified:   lib/libcommand_do.sh
modified:   lib/libdatabase_query.sh
modified:   lib/libmain.sh

lib/libcommand_do.sh
lib/libdatabase_query.sh
lib/libmain.sh

index 649cf2c..77ef626 100644 (file)
@@ -704,6 +704,7 @@ command_do_inspection_of_necessity ()
                do
                        find "${DBDIR}/requires" -depth 3 -type f -name "necessary_port.${level}" \
                                > ${DBDIR}/stage.loop_list/necessary_ports.${level}
+                       cp "${DBDIR}/stage.loop_list/necessary_ports.${level}" "${DBDIR}/stage.loop_list/complete_necessary_ports.${level}"
                done
                message_echo
        }
@@ -727,12 +728,12 @@ command_do_inspection_of_necessary_upgrades ()
                        database_query_does_a_port_need_update "$origin" || return 0
                        for tag in all run build none
                        do
-                               touch "$dbpath/necessary_upgrade.$tag.${level}"
-                               [ -e "$dbpath/dependents.$tag.${level}" -o "$dbpath/ignored_dependents.$tag" ] || continue
-                               cat "$dbpath/dependents.$tag.${level}" "$dbpath/ignored_dependents.$tag" 2> /dev/null | \
+                               touch "$dbpath/necessary_upgrade.${tag}.${level}"
+                               [ -e "$dbpath/dependents.${tag}.${level}" -o "$dbpath/ignored_dependents.${tag}" ] || continue
+                               cat "$dbpath/dependents.${tag}.${level}" "$dbpath/ignored_dependents.${tag}" 2> /dev/null | \
                                        while read origin_dependent
                                        do
-                                               touch "${DBDIR}/requires/$origin_dependent/necessary_upgrade.$tag.${level}"
+                                               touch "${DBDIR}/requires/$origin_dependent/necessary_upgrade.${tag}.${level}"
                                        done
                        done
                }
@@ -748,6 +749,40 @@ command_do_inspection_of_necessary_upgrades ()
        done
 }
 
+# ============= Completion of necessary upgrades for build =============
+command_do_complete_necessary_upgrades_for_build ()
+{
+       local PROGRAM_DEPENDS _NECESSARY_UPDATES_level
+       for _NECESSARY_UPDATES_level in direct full
+       do
+               PROGRAM_DEPENDS="INSPECT_NECESSITY NECESSARY_UPDATES:${_NECESSARY_UPDATES_level}"
+               _program_exec_restartable_loop_operation__routine ()
+               {
+                       local markerpath level dbpath origin_requirement dbpath_requirement
+                       markerpath=$1
+                       level=${_NECESSARY_UPDATES_level}
+                       dbpath=`dirname "$markerpath"`
+                       [ -e "$dbpath/requirements.build.${level}" -a -e "$dbpath/necessary_upgrade.run.${level}" ] || return 0
+                       while read origin_requirement
+                       do
+                               dbpath_requirement=${DBDIR}/requires/$origin_requirement
+                               [ -e "$dbpath_requirement/necessary_upgrade.build.${level}" ] || continue
+                               touch "$dbpath_requirement/necessary_upgrade.run.${level}"
+                       done < $dbpath/requirements.build.${level}
+                       :
+               }
+               _program_exec_and_record_completion__operation ()
+               {
+                       local level
+                       level=${_NECESSARY_UPDATES_level}
+                       message_section_title "Completion of necessary upgrades for build at the $level level"
+                       program_exec_restartable_loop_operation complete_necessary_ports.${level}
+                       message_echo
+               }
+               program_exec_and_record_completion COMPLETE_NECESSARY_UPDATES:${_NECESSARY_UPDATES_level}
+       done
+}
+
 # ============= Preparation for inspection of new leaf ports =============
 command_do_preparation_for_inspection_of_new_leaf_ports ()
 {
@@ -1355,6 +1390,9 @@ command_do_prepare ()
        # Inspection of necessary upgrades
        command_do_inspection_of_necessary_upgrades
        
+       # Completion of necessary upgrades for build
+       command_do_complete_necessary_upgrades_for_build
+       
        # Preparation for inspection of new leaf ports
        command_do_preparation_for_inspection_of_new_leaf_ports
        
index 807ee2a..55cfb8c 100644 (file)
@@ -506,11 +506,15 @@ database_query_show_two_column_lists ()
 # ============= Output of "show" command for a single list =============
 database_query_show_single_list ()
 {
-       local list pkgnamedb flag_filter_skip_unchanged flag_filter_only_target tmpflag_exists put_blankline
+       local list pkgnamedb flag_filter_skip_unchanged flag_filter_only_target flag_negative_listdb tmpflag_exists put_blankline origin matches flag pkg table
+       local currentorigin_is_alll currentorigin_is_target currentorigin_is_requires_requirements
+       local currentorigin_is_initial_requirements currentorigin_is_requires_dependents
+       local currentorigin_is_initial_dependents currentorigin_is_requires_requirements_complement currentorigin_is_relevant
        list=$1
        pkgnamedb=$2
        flag_filter_skip_unchanged=$3
        flag_filter_only_target=$4
+       flag_negative_listdb=$5
        tmpflag_exists=${TMPDIR}/database_query_show_single_list::exists_item
        if [ `cat "${DBDIR}/$list" 2> /dev/null | wc -l` -eq 0 ]
        then
@@ -539,9 +543,20 @@ database_query_show_single_list ()
        [ -n "$put_blankline" ] && message_echo
        while read origin
        do
-               [ -n "$flag_filter_skip_unchanged" -a $opt_skip_unchanged = yes \
-                       -a ! -e "${DBDIR}/requires/$origin/$flag_filter_skip_unchanged" ] \
-                       && continue
+               [ -n "$flag_negative_listdb" ] && grep -Fx "$origin" "${DBDIR}/$flag_negative_listdb" 2> /dev/null && continue
+               if [ -n "$flag_filter_skip_unchanged" -a $opt_skip_unchanged = yes ]
+               then
+                       matches=no
+                       for flag in $flag_filter_skip_unchanged
+                       do
+                               if [ -e "${DBDIR}/requires/$origin/$flag" ]
+                               then
+                                       matches=yes
+                                       break
+                               gi
+                       done
+                       [ $matches = no ] && continue
+               fi
                if [ -n "$flag_filter_only_target" ]
                then
                        database_query_get_target_attributes currentorigin "$origin"
@@ -622,13 +637,14 @@ database_query_show_list_moved ()
 # ============= Actual operations of "show" command for a single list =============
 database_query_show_single_list_exec ()
 {
-       local subject deptag level dbsuffix flag_filter_skip_unchanged flag_filter_only_target pkgnamedb
+       local subject deptag level dbsuffix flag_filter_skip_unchanged flag_filter_only_target flag_negative_listdb pkgnamedb
        subject=$1
        deptag=$2
        level=$3
        dbsuffix=$deptag.$level
        flag_filter_skip_unchanged=
        flag_filter_only_target=
+       flag_negative_listdb=
        pkgnamedb='moved_from obsolete initial'
        case $subject in
        todo )
@@ -654,8 +670,9 @@ database_query_show_single_list_exec ()
                message_dependency_scope "$deptag" "$level"
                message_echo
                list=todo_after_requirements_succeed.$dbsuffix.list
-               flag_filter_skip_unchanged=necessary_upgrade.$dbsuffix
+               flag_filter_skip_unchanged="necessary_upgrade.$dbsuffix necessary_upgrade_completed.$dbsuffix"
                flag_filter_only_target=y
+               flag_negative_listdb=leaf_ports_to_delete.unselected
                ;;
        resolved )
                message_echo "The following ports had problems which have been manually resolved:"
@@ -763,7 +780,7 @@ database_query_show_single_list_exec ()
                ;;
        esac
        database_query_show_single_list "$list" "$pkgnamedb" \
-               "$flag_filter_skip_unchanged" "$flag_filter_only_target"
+               "$flag_filter_skip_unchanged" "$flag_filter_only_target" "$flag_negative_listdb"
 }
 
 # ============= Check whether a port is registered in a list =============
index eca2bf7..4f572ba 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_20180914121445
+       MYVERSION=4.0.0+toward_4.1.0_20180916221406
        COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$'
 }