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"
+ while read origin
+ do
+ [ -d "${PORTSDIR}/$origin" ] || echo "$origin"
+ done < ${DBDIR}/stage.loop_list/ports_to_inspect > ${DBDIR}/obsoletes_to_escape_for_inspection
message_echo
}
program_exec_and_record_completion DETERMINE_ALL_TARGET_PORTS
_program_exec_and_record_completion__operation ()
{
message_section_title "Preparing for inspection of all dependencies"
+ database_build_escape "${DBDIR}/escaped_obsoletes" < ${DBDIR}/obsoletes_to_escape_for_inspection
cp /dev/null "${DBDIR}/done_required_ports_to_inspect"
message_echo
}
program_exec_and_record_completion INSPECT_DEPENDENTS
}
+# ============= Restore escaped obsolete packages for inspection =============
+command_do_restore_escaped_obsoletes ()
+{
+ local PROGRAM_DEPENDS
+ PROGRAM_DEPENDS='INSPECT_DEPENDENTS'
+ _program_exec_and_record_completion__operation ()
+ {
+ message_section_title "Restoring escaped obsolete packages for inspection"
+ cat "${DBDIR}/escaped_obsoletes" 2> /dev/null | database_build_restore
+ rm -f "${DBDIR}/escaped_obsoletes"
+ message_echo
+ }
+ program_exec_and_record_completion RESTORE_ESCAPED_OBSOLETE_PACKAGES_FOR_INSPECTION
+}
+
# ============= Remove duplicated lines in dependents lists =============
command_do_remove_duplicated_lines_in_dependents_lists ()
{
command_do_completion_of_building_the_temporary_database ()
{
local PROGRAM_DEPENDS
- 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_DEPENDS='REDO_INIT SETUP_REINST_TODO CLEANUP_REINST_STATUS PARSE_CONF INSPECT_ALL_DEPENDENCIES RESTORE_ESCAPED_OBSOLETE_PACKAGES_FOR_INSPECTION 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"
temp_set_msg_current_stage "${_MSG_CURRENT_STAGE_general}"
message_section_title "Reinstallation"
program_exec_restartable_loop_operation reinst_todo
+ [ "x$PROGRAM_STEP_COUNTER_LAST_SKIPPED" = xyes ] && message_stage_title "$PROGRAM_STEP_COUNTER"
reinstall_restore_conflicts
temp_set_msg_current_stage
message_echo
temp_set_msg_current_stage "${_MSG_CURRENT_STAGE_general}"
message_section_title "Restoration of unselected obsolete/leaf packages"
program_exec_restartable_loop_operation ports_to_restore
+ [ "x$PROGRAM_STEP_COUNTER_LAST_SKIPPED" = xyes ] && message_stage_title "$PROGRAM_STEP_COUNTER"
temp_set_msg_current_stage
message_echo
}
temp_set_msg_current_stage "${_MSG_CURRENT_STAGE_general}"
message_section_title "Deinstallation of unused obsolete/leaf packages"
program_exec_restartable_loop_operation ports_to_delete
+ [ "x$PROGRAM_STEP_COUNTER_LAST_SKIPPED" = xyes ] && message_stage_title "$PROGRAM_STEP_COUNTER"
temp_set_msg_current_stage
message_echo
}
command_do_reset_changed_portdb && break
done
+ # Restore escaped obsolete packages for inspection
+ command_do_restore_escaped_obsoletes
+
# Remove duplicated lines in dependents lists
command_do_remove_duplicated_lines_in_dependents_lists
if [ $opt_no_opening_message = yes ]
then
message_echo "Done as ${APPNAME}"
- return
+ else
+ message_section_title "COMPLETELY DONE"
fi
- message_section_title "COMPLETELY DONE"
if [ $opt_fetch_only = no -a $opt_dry_run = no ]
- then
+ then
PROGRAM_DEPENDS='REBUILD_PKGDB CLEANUP_OBSLETE_DISTFILES '
_program_exec_and_record_completion__operation ()
{
}
program_exec_and_record_completion ALL_COMPLETE
- message_echo "- E N D -"
+ [ $opt_no_opening_message = yes ] || message_echo "- E N D -"
else
message_echo "INFO: Redo for the real (re)installation."
fi