main_collect_all_installed_packages
# Preliminary inspection of tools which have to be up-to-date
+main_determine_all_target_ports_of_tools
+main_preliminary_inspection_of_initial_tools
main_preliminary_inspection_of_tools
# Upgrade of pkg(8) if new
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 "${DBDIR}/stage.loop_list/ports_to_inspect" "${DBDIR}/stage.loop_list/ports_to_inspect_initial"
while read origin
do
[ -d "${PORTSDIR}/$origin" ] || echo "$origin"
program_exec_and_record_completion DETERMINE_ALL_TARGET_PORTS
}
+# ============= Inspection of all initial dependencies =============
+command_do_inspection_of_all_initial_dependencies ()
+{
+ local PROGRAM_DEPENDS
+ PROGRAM_DEPENDS='DETERMINE_ALL_TARGET_PORTS'
+ _program_exec_restartable_loop_operation__routine ()
+ {
+ local origin
+ origin=$1
+ database_build_setup_initial_node "$origin"
+ }
+ _program_exec_and_record_completion__operation ()
+ {
+ local DEPTH_INDEX
+ message_section_title "Inspecting initial dependencies of the all installed packages"
+ [ $opt_only_target_scope = no -a -n "$opt_target_itself$opt_target_dependents$opt_target_requirements" ] && \
+ message_echo "INFO: Ports which seem irrelevant to the targets are also inspected in order to get complete information."
+ program_exec_restartable_loop_operation ports_to_inspect_initial
+ database_build_post_inspect_initial_dependencies
+ message_echo
+ }
+ program_exec_and_record_completion INSPECT_ALL_INITIAL_DEPENDENCIES
+}
+
# ============= Prepare for inspecting all dependencies =============
command_do_prepare_for_inspect_all_dependencies ()
{
local PROGRAM_DEPENDS
- PROGRAM_DEPENDS='PARSE_CONF DETERMINE_ALL_TARGET_PORTS'
+ PROGRAM_DEPENDS='PARSE_CONF INSPECT_ALL_INITIAL_DEPENDENCIES'
_program_exec_and_record_completion__operation ()
{
message_section_title "Preparing for inspection of all dependencies"
# Determine all target ports
command_do_determine_all_target_ports
+ # Inspection of all initial dependencies
+ command_do_inspection_of_all_initial_dependencies
+
# Loop considering cases that port options are changed after inspection
while true
do
message_echo "${DEPTH_INDEX} $origin_orig"
database_build_convert_and_register_origin_if_obsolete__reset_origins_old
origin_id=`echo "$origin_orig" | tr / :`
- database_build_setup_initial_node "$origin_orig"
# Replacement specified by the configuration file, knobs and port options
- tmp_config=${TMPDIR}/database_build_inspect_dependencies:confi
+ tmp_config=${TMPDIR}/database_build_inspect_dependencies:config
database_build_setup_replace_node "$origin_orig" "$tmp_config.before" "$tmp_config.after"
if [ -e "${DBDIR}/replace/$origin_orig/origin" ]
then
database_build_clear_db_dirs "$origin"
}
+# ============= Post-processes after finishing to inspect initial dependencies =============
+database_build_post_inspect_initial_dependencies ()
+{
+ find "${DBDIR}/initial" -depth 2 -type d \
+ | sed -E 's|.*/([^/]+/[^/]+)$|\1|' > ${DBDIR}/inspected_ports.initial
+}
+
# ============= Post-processes after finishing to inspect dependencies =============
database_build_post_inspect_dependencies ()
{
touch "${DBDIR}/obsolete_ports" "${DBDIR}/inspected_ports.update"
find "${DBDIR}/requires" -depth 2 -type d \
| sed -E 's|.*/([^/]+/[^/]+)$|\1|' > ${DBDIR}/inspected_ports
- find "${DBDIR}/initial" -depth 2 -type d \
- | sed -E 's|.*/([^/]+/[^/]+)$|\1|' > ${DBDIR}/inspected_ports.initial
sort -u "${DBDIR}/inspected_ports" "${DBDIR}/inspected_ports.initial" > ${DBDIR}/inspected_ports.all
{
cat "${DBDIR}/conf/HOLD:PORTS.parsed" || :
MYVERSION=4.1.0
COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$'
# Template for development versions
- MYVERSION=4.0.0+toward_4.1.0_20180913004127
+ MYVERSION=4.0.0+toward_4.1.0_20180914003252
COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$'
}
program_exec_and_record_completion COLLECT_ALL_INSTALLED_PACKAGES
}
+# ============= Determine all target ports of tools which have to be up-to-date =============
+main_determine_all_target_ports_of_tools ()
+{
+ local PROGRAM_DEPENDS
+ PROGRAM_DEPENDS=
+ _program_exec_and_record_completion__operation ()
+ {
+ message_section_title "Determining all target ports of tools which have to be up-to-date"
+ {
+ [ "$PKGSYS_USE_PKGNG" = yes ] && pkgsys_portsmgmt_pkg
+ pkgsys_is_dialog4ports_used && pkgsys_portsmgmt_dialog4ports
+ [ -n "$MYPORTORIGIN" ] && echo "$MYPORTORIGIN"
+ } 2> /dev/null > ${DBDIR}/stage.loop_list/tools_to_inspect
+ cp "${DBDIR}/stage.loop_list/tools_to_inspect" "${DBDIR}/stage.loop_list/tools_to_inspect_initial"
+ message_echo
+ }
+ program_exec_and_record_completion DETERMINE_ALL_TARGET_PORTS_OF_TOOLS
+}
+
+# ============= Preliminary inspection of initially installed tools which have to be up-to-date =============
+# (No need depend on PARSE_CONF because INSPECT_ALL_DEPENDENCIES will take the task.)
+main_preliminary_inspection_of_initial_tools ()
+{
+ local PROGRAM_DEPENDS
+ PROGRAM_DEPENDS='DETERMINE_ALL_TARGET_PORTS_OF_TOOLS'
+ _program_exec_restartable_loop_operation__routine ()
+ {
+ local origin
+ origin=$1
+ database_build_setup_initial_node "$origin"
+ }
+ _program_exec_and_record_completion__operation ()
+ {
+ local DEPTH_INDEX
+ message_section_title "Preliminary inspection of initially installed tools which have to be up-to-date"
+ program_exec_restartable_loop_operation tools_to_inspect_initial
+ database_build_post_inspect_initial_dependencies
+ message_echo
+ }
+ program_exec_and_record_completion PRELIMINARY_INSPECTION_OF_INITIAL_TOOLS
+}
+
# ============= Preliminary inspection of tools which have to be up-to-date =============
# (No need depend on PARSE_CONF because INSPECT_ALL_DEPENDENCIES will take the task.)
main_preliminary_inspection_of_tools ()
{
local PROGRAM_DEPENDS
- PROGRAM_DEPENDS=
+ PROGRAM_DEPENDS='PRELIMINARY_INSPECTION_OF_INITIAL_TOOLS'
_program_exec_restartable_loop_operation__routine ()
{
local origin
{
local DEPTH_INDEX
message_section_title "Preliminary inspection of tools which have to be up-to-date"
- {
- [ "$PKGSYS_USE_PKGNG" = yes ] && pkgsys_portsmgmt_pkg
- pkgsys_is_dialog4ports_used && pkgsys_portsmgmt_dialog4ports
- [ -n "$MYPORTORIGIN" ] && echo "$MYPORTORIGIN"
- } 2> /dev/null > ${DBDIR}/stage.loop_list/tools_to_inspect
cp /dev/null "${DBDIR}/done_required_ports_to_inspect"
DEPTH_INDEX='--'
program_exec_restartable_loop_operation tools_to_inspect