OSDN Git Service

[IMPROVED] It is changed to show messages of reset ports at the stage of reloading...
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Tue, 3 Jul 2018 08:35:38 +0000 (16:35 +0800)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Tue, 3 Jul 2018 08:35:38 +0000 (16:35 +0800)
[BUG FIX] Changes made by commands or in ${LOCALBASE}/etc/portsreinstall.conf were not reflected to dependents of the specified ports in the redo runs with incorrect messages notifying as already inspected merged ports.

 Changes to be committed:
modified:   lib/libcommand_do.sh
modified:   lib/libcommand_forget.sh
modified:   lib/libcommand_pkgs.sh
modified:   lib/libdatabase_build.sh
modified:   lib/libmain.sh
modified:   man/portsreinstall.8

lib/libcommand_do.sh
lib/libcommand_forget.sh
lib/libcommand_pkgs.sh
lib/libdatabase_build.sh
lib/libmain.sh
man/portsreinstall.8

index 8924600..489f6c7 100644 (file)
@@ -20,7 +20,7 @@ command_do_redo__command_all_exec_before_build_database ()
        if [ $opt_reset_targets = yes ]
        then
                program_deregister_stage_complete DETERMINE_SPECIFIED_TARGETS
-               program_deregister_stage_complete INSPECT_ALL_DEPENDENCIES
+               program_deregister_stage_complete PREPARE_FOR_INSPECT_ALL_DEPENDENCIES
                rm -rf "${DBDIR}/targets"
        fi
        command_do_do__command_all_exec_before_build_database
@@ -169,12 +169,25 @@ command_do_determine_all_target_ports ()
                        cat "${DBDIR}/stage.loop_list/target_requirements.specified" || :
                        cat "${DBDIR}/targets_specified_so_far" || :
                }  2> /dev/null | sort -u > "${DBDIR}/stage.loop_list/ports_to_inspect"
-               cp /dev/null "${DBDIR}/done_required_ports_to_inspect"
                message_echo
        }
        program_exec_and_record_completion DETERMINE_ALL_TARGET_PORTS
 }
 
+# ============= Prepare for inspecting all dependencies =============
+command_do_prepare_for_inspect_all_dependencies ()
+{
+       local PROGRAM_DEPENDS
+       PROGRAM_DEPENDS='PARSE_CONF  DETERMINE_ALL_TARGET_PORTS'
+       _program_exec_and_record_completion__operation ()
+       {
+               message_section_title "Preparing for inspection of all dependencies"
+               cp /dev/null "${DBDIR}/done_required_ports_to_inspect"
+               message_echo
+       }
+       program_exec_and_record_completion PREPARE_FOR_INSPECT_ALL_DEPENDENCIES
+}
+
 # ============= Check ports of which the port options are changed and reset their databases =============
 # Return status 0 for no need to update of inspected ports and 1 for needed to do it
 command_do_reset_changed_portdb ()
@@ -218,7 +231,7 @@ command_do_reset_changed_portdb ()
                then
                        message_echo "Change detected on $origin: Resetting"
                        database_build_patch_reconf "$origin"
-                       program_deregister_stage_complete INSPECT_ALL_DEPENDENCIES
+                       program_deregister_stage_complete PREPARE_FOR_INSPECT_ALL_DEPENDENCIES
                        program_deregister_stage_complete ALL_COMPLETE
                        touch "$tmp_ls.updated"
                else
@@ -243,7 +256,7 @@ command_do_reset_changed_portdb ()
 command_do_inspection_of_all_dependencies ()
 {
        local PROGRAM_DEPENDS
-       PROGRAM_DEPENDS='PARSE_CONF DETERMINE_ALL_TARGET_PORTS'
+       PROGRAM_DEPENDS='PREPARE_FOR_INSPECT_ALL_DEPENDENCIES'
        _program_exec_restartable_loop_operation__routine ()
        {
                local origin
@@ -1238,6 +1251,9 @@ command_do_prepare ()
        # Determine all target ports
        command_do_determine_all_target_ports
        
+       # Prepare for inspecting all dependencies
+       command_do_prepare_for_inspect_all_dependencies
+       
        # Loop considering cases that port options are changed after inspection
        while true
        do
index 195d890..ad2fc06 100644 (file)
@@ -116,7 +116,7 @@ command_forget ()
        program_exec_and_record_completion FORGET::INSPECT_REQUIREMENTS_OF_REMOVED_PORTS
        
        # Set up so that ports are inspected again in the building process of the temporary database
-       program_deregister_stage_complete INSPECT_ALL_DEPENDENCIES
+       program_deregister_stage_complete PREPARE_FOR_INSPECT_ALL_DEPENDENCIES
        
        # Clean up the database for this command because it is no more effective
        program_deregister_stage_complete FORGET::PREPARATION_INSPECT_MASTER
index 0a581ed..a99c8f8 100644 (file)
@@ -27,7 +27,7 @@ command_pkgs_port_option_conf ()
                database_build_make "$origin" $make_target
                database_build_patch_reconf "$origin"
        done
-       program_deregister_stage_complete INSPECT_ALL_DEPENDENCIES
+       program_deregister_stage_complete PREPARE_FOR_INSPECT_ALL_DEPENDENCIES
        program_deregister_stage_complete ALL_COMPLETE
 }
 
index 75c44c5..c6337f0 100644 (file)
@@ -1055,10 +1055,10 @@ _database_build_reset_a_port_confdb ()
                        do
                                cat "${DBDIR}/$dbtag/$origin/$tabel.all.full" 2> /dev/null || :
                                cat "${DBDIR}/$dbtag/$origin/$tabel.all.full.orig" 2> /dev/null || :
-                               rm -f "${DBDIR}/$dbtag/$origin/$tabel.run.full" \
-                                       "${DBDIR}/$dbtag/$origin/$tabel.build.full" \
-                                       "${DBDIR}/$dbtag/$origin/is_customized" 2> /dev/null
+                               rm -rf "${DBDIR}/$dbtag/$origin/$tabel.run.full" \
+                                       "${DBDIR}/$dbtag/$origin/$tabel.build.full"
                        done
+                       rm -rf "${DBDIR}/$dbtag/$origin/is_customized"
                done
        } | sort -u >> ${DBDIR}/inspected_ports.update
        for level in full direct node
index b54a639..c4659eb 100644 (file)
@@ -12,8 +12,8 @@ main_set_version ()
        MYVERSION=4.0.0
        COMPATIBLE_VERSIONS='^(4\.[0]\.[0])$'
        # Template for development versions
-       # MYVERSION=3.3.2+toward_4.0.0_20180629133501
-       # COMPATIBLE_VERSIONS='^(4\.[0]\.[0]|3\.[1-3]\.[0-9]+(|\+toward_4\.[0]\.[0]+_[0-9]+))$'
+       MYVERSION=4.0.0+toward_4.0.1_20180703161959
+       COMPATIBLE_VERSIONS='^(4\.[0]\.[0]|4\.[0]\.[0]+(|\+toward_4\.[0]\.[1]+_[0-9]+))$'
 }
 
 # ============= Parse options, arguments and control parameters =============
@@ -521,9 +521,10 @@ main_reflect_conf_changes ()
                then
                        sort -u "$tmpfile_updated_ports" | while read origin
                        do
+                               message_echo "Reset for $origin"
                                database_build_patch_reconf "$origin"
                        done
-                       program_deregister_stage_complete INSPECT_ALL_DEPENDENCIES
+                       program_deregister_stage_complete PREPARE_FOR_INSPECT_ALL_DEPENDENCIES
                        program_deregister_stage_complete ALL_COMPLETE
                fi
                message_echo
index 1cb8efa..d9b94f6 100644 (file)
@@ -1066,6 +1066,13 @@ Configuration file of \fBportupgrade\fR(1).
 .SH HISTORY
 \fBportsreinstall\fR has been developed as below.
 .TP
+4.0.1 (?? July 2018)
+.RS
+[IMPROVED] It is changed to show messages of reset ports at the stage of reloading ${LOCALBASE}/etc/portsreinstall.conf.
+.PP
+[BUG FIX] Changes made by commands or in ${LOCALBASE}/etc/portsreinstall.conf were not reflected to dependents of the specified ports in the redo runs with incorrect messages notifying as already inspected merged ports.
+.RE
+.TP
 4.0.0 (29 June 2018)
 .RS
 [NEW] Flavor is supported. Related to this feature, representations of port origins without flavor is recognized to exactly match the unflavored ones.