This is for active development.
New funtionalities are to be added actively.
Revision | eef49b58a1d722e712e56987cda9de0875549c1a (tree) |
---|---|
Time | 2018-09-14 00:33:07 |
Author | Mamoru Sakaue / MwGhennndo <glmwghennndo@user...> |
Commiter | Mamoru Sakaue / MwGhennndo |
Fixed a bug that obsolete or moved ports were not inspected. For this purpose, the inspection of ports is split to ones for initially installed packages and finally installed ports.
modified: bin/portsreinstall
modified: lib/libcommand_do.sh
modified: lib/libdatabase_build.sh
modified: lib/libmain.sh
@@ -92,6 +92,8 @@ MYPORTORIGIN=`pkgsys_get_my_origin 2> /dev/null` || : | ||
92 | 92 | main_collect_all_installed_packages |
93 | 93 | |
94 | 94 | # Preliminary inspection of tools which have to be up-to-date |
95 | +main_determine_all_target_ports_of_tools | |
96 | +main_preliminary_inspection_of_initial_tools | |
95 | 97 | main_preliminary_inspection_of_tools |
96 | 98 | |
97 | 99 | # Upgrade of pkg(8) if new |
@@ -169,6 +169,7 @@ command_do_determine_all_target_ports () | ||
169 | 169 | cat "${DBDIR}/stage.loop_list/target_requirements.specified" || : |
170 | 170 | cat "${DBDIR}/targets_specified_so_far" || : |
171 | 171 | } 2> /dev/null | sort -u > "${DBDIR}/stage.loop_list/ports_to_inspect" |
172 | + cp "${DBDIR}/stage.loop_list/ports_to_inspect" "${DBDIR}/stage.loop_list/ports_to_inspect_initial" | |
172 | 173 | while read origin |
173 | 174 | do |
174 | 175 | [ -d "${PORTSDIR}/$origin" ] || echo "$origin" |
@@ -178,11 +179,35 @@ command_do_determine_all_target_ports () | ||
178 | 179 | program_exec_and_record_completion DETERMINE_ALL_TARGET_PORTS |
179 | 180 | } |
180 | 181 | |
182 | +# ============= Inspection of all initial dependencies ============= | |
183 | +command_do_inspection_of_all_initial_dependencies () | |
184 | +{ | |
185 | + local PROGRAM_DEPENDS | |
186 | + PROGRAM_DEPENDS='DETERMINE_ALL_TARGET_PORTS' | |
187 | + _program_exec_restartable_loop_operation__routine () | |
188 | + { | |
189 | + local origin | |
190 | + origin=$1 | |
191 | + database_build_setup_initial_node "$origin" | |
192 | + } | |
193 | + _program_exec_and_record_completion__operation () | |
194 | + { | |
195 | + local DEPTH_INDEX | |
196 | + message_section_title "Inspecting initial dependencies of the all installed packages" | |
197 | + [ $opt_only_target_scope = no -a -n "$opt_target_itself$opt_target_dependents$opt_target_requirements" ] && \ | |
198 | + message_echo "INFO: Ports which seem irrelevant to the targets are also inspected in order to get complete information." | |
199 | + program_exec_restartable_loop_operation ports_to_inspect_initial | |
200 | + database_build_post_inspect_initial_dependencies | |
201 | + message_echo | |
202 | + } | |
203 | + program_exec_and_record_completion INSPECT_ALL_INITIAL_DEPENDENCIES | |
204 | +} | |
205 | + | |
181 | 206 | # ============= Prepare for inspecting all dependencies ============= |
182 | 207 | command_do_prepare_for_inspect_all_dependencies () |
183 | 208 | { |
184 | 209 | local PROGRAM_DEPENDS |
185 | - PROGRAM_DEPENDS='PARSE_CONF DETERMINE_ALL_TARGET_PORTS' | |
210 | + PROGRAM_DEPENDS='PARSE_CONF INSPECT_ALL_INITIAL_DEPENDENCIES' | |
186 | 211 | _program_exec_and_record_completion__operation () |
187 | 212 | { |
188 | 213 | message_section_title "Preparing for inspection of all dependencies" |
@@ -1275,6 +1300,9 @@ command_do_prepare () | ||
1275 | 1300 | # Determine all target ports |
1276 | 1301 | command_do_determine_all_target_ports |
1277 | 1302 | |
1303 | + # Inspection of all initial dependencies | |
1304 | + command_do_inspection_of_all_initial_dependencies | |
1305 | + | |
1278 | 1306 | # Loop considering cases that port options are changed after inspection |
1279 | 1307 | while true |
1280 | 1308 | do |
@@ -552,9 +552,8 @@ database_build_inspect_dependencies () | ||
552 | 552 | message_echo "${DEPTH_INDEX} $origin_orig" |
553 | 553 | database_build_convert_and_register_origin_if_obsolete__reset_origins_old |
554 | 554 | origin_id=`echo "$origin_orig" | tr / :` |
555 | - database_build_setup_initial_node "$origin_orig" | |
556 | 555 | # Replacement specified by the configuration file, knobs and port options |
557 | - tmp_config=${TMPDIR}/database_build_inspect_dependencies:confi | |
556 | + tmp_config=${TMPDIR}/database_build_inspect_dependencies:config | |
558 | 557 | database_build_setup_replace_node "$origin_orig" "$tmp_config.before" "$tmp_config.after" |
559 | 558 | if [ -e "${DBDIR}/replace/$origin_orig/origin" ] |
560 | 559 | then |
@@ -1149,6 +1148,13 @@ database_build_patch_reconf () | ||
1149 | 1148 | database_build_clear_db_dirs "$origin" |
1150 | 1149 | } |
1151 | 1150 | |
1151 | +# ============= Post-processes after finishing to inspect initial dependencies ============= | |
1152 | +database_build_post_inspect_initial_dependencies () | |
1153 | +{ | |
1154 | + find "${DBDIR}/initial" -depth 2 -type d \ | |
1155 | + | sed -E 's|.*/([^/]+/[^/]+)$|\1|' > ${DBDIR}/inspected_ports.initial | |
1156 | +} | |
1157 | + | |
1152 | 1158 | # ============= Post-processes after finishing to inspect dependencies ============= |
1153 | 1159 | database_build_post_inspect_dependencies () |
1154 | 1160 | { |
@@ -1157,8 +1163,6 @@ database_build_post_inspect_dependencies () | ||
1157 | 1163 | touch "${DBDIR}/obsolete_ports" "${DBDIR}/inspected_ports.update" |
1158 | 1164 | find "${DBDIR}/requires" -depth 2 -type d \ |
1159 | 1165 | | sed -E 's|.*/([^/]+/[^/]+)$|\1|' > ${DBDIR}/inspected_ports |
1160 | - find "${DBDIR}/initial" -depth 2 -type d \ | |
1161 | - | sed -E 's|.*/([^/]+/[^/]+)$|\1|' > ${DBDIR}/inspected_ports.initial | |
1162 | 1166 | sort -u "${DBDIR}/inspected_ports" "${DBDIR}/inspected_ports.initial" > ${DBDIR}/inspected_ports.all |
1163 | 1167 | { |
1164 | 1168 | cat "${DBDIR}/conf/HOLD:PORTS.parsed" || : |
@@ -12,7 +12,7 @@ main_set_version () | ||
12 | 12 | MYVERSION=4.1.0 |
13 | 13 | COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$' |
14 | 14 | # Template for development versions |
15 | - MYVERSION=4.0.0+toward_4.1.0_20180913004127 | |
15 | + MYVERSION=4.0.0+toward_4.1.0_20180914003252 | |
16 | 16 | COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$' |
17 | 17 | } |
18 | 18 |
@@ -344,12 +344,54 @@ main_collect_all_installed_packages () | ||
344 | 344 | program_exec_and_record_completion COLLECT_ALL_INSTALLED_PACKAGES |
345 | 345 | } |
346 | 346 | |
347 | +# ============= Determine all target ports of tools which have to be up-to-date ============= | |
348 | +main_determine_all_target_ports_of_tools () | |
349 | +{ | |
350 | + local PROGRAM_DEPENDS | |
351 | + PROGRAM_DEPENDS= | |
352 | + _program_exec_and_record_completion__operation () | |
353 | + { | |
354 | + message_section_title "Determining all target ports of tools which have to be up-to-date" | |
355 | + { | |
356 | + [ "$PKGSYS_USE_PKGNG" = yes ] && pkgsys_portsmgmt_pkg | |
357 | + pkgsys_is_dialog4ports_used && pkgsys_portsmgmt_dialog4ports | |
358 | + [ -n "$MYPORTORIGIN" ] && echo "$MYPORTORIGIN" | |
359 | + } 2> /dev/null > ${DBDIR}/stage.loop_list/tools_to_inspect | |
360 | + cp "${DBDIR}/stage.loop_list/tools_to_inspect" "${DBDIR}/stage.loop_list/tools_to_inspect_initial" | |
361 | + message_echo | |
362 | + } | |
363 | + program_exec_and_record_completion DETERMINE_ALL_TARGET_PORTS_OF_TOOLS | |
364 | +} | |
365 | + | |
366 | +# ============= Preliminary inspection of initially installed tools which have to be up-to-date ============= | |
367 | +# (No need depend on PARSE_CONF because INSPECT_ALL_DEPENDENCIES will take the task.) | |
368 | +main_preliminary_inspection_of_initial_tools () | |
369 | +{ | |
370 | + local PROGRAM_DEPENDS | |
371 | + PROGRAM_DEPENDS='DETERMINE_ALL_TARGET_PORTS_OF_TOOLS' | |
372 | + _program_exec_restartable_loop_operation__routine () | |
373 | + { | |
374 | + local origin | |
375 | + origin=$1 | |
376 | + database_build_setup_initial_node "$origin" | |
377 | + } | |
378 | + _program_exec_and_record_completion__operation () | |
379 | + { | |
380 | + local DEPTH_INDEX | |
381 | + message_section_title "Preliminary inspection of initially installed tools which have to be up-to-date" | |
382 | + program_exec_restartable_loop_operation tools_to_inspect_initial | |
383 | + database_build_post_inspect_initial_dependencies | |
384 | + message_echo | |
385 | + } | |
386 | + program_exec_and_record_completion PRELIMINARY_INSPECTION_OF_INITIAL_TOOLS | |
387 | +} | |
388 | + | |
347 | 389 | # ============= Preliminary inspection of tools which have to be up-to-date ============= |
348 | 390 | # (No need depend on PARSE_CONF because INSPECT_ALL_DEPENDENCIES will take the task.) |
349 | 391 | main_preliminary_inspection_of_tools () |
350 | 392 | { |
351 | 393 | local PROGRAM_DEPENDS |
352 | - PROGRAM_DEPENDS= | |
394 | + PROGRAM_DEPENDS='PRELIMINARY_INSPECTION_OF_INITIAL_TOOLS' | |
353 | 395 | _program_exec_restartable_loop_operation__routine () |
354 | 396 | { |
355 | 397 | local origin |
@@ -360,11 +402,6 @@ main_preliminary_inspection_of_tools () | ||
360 | 402 | { |
361 | 403 | local DEPTH_INDEX |
362 | 404 | message_section_title "Preliminary inspection of tools which have to be up-to-date" |
363 | - { | |
364 | - [ "$PKGSYS_USE_PKGNG" = yes ] && pkgsys_portsmgmt_pkg | |
365 | - pkgsys_is_dialog4ports_used && pkgsys_portsmgmt_dialog4ports | |
366 | - [ -n "$MYPORTORIGIN" ] && echo "$MYPORTORIGIN" | |
367 | - } 2> /dev/null > ${DBDIR}/stage.loop_list/tools_to_inspect | |
368 | 405 | cp /dev/null "${DBDIR}/done_required_ports_to_inspect" |
369 | 406 | DEPTH_INDEX='--' |
370 | 407 | program_exec_restartable_loop_operation tools_to_inspect |