From 8d3b351cf89d6c66b3d316e0a49bb07e604798e1 Mon Sep 17 00:00:00 2001 From: Mamoru Sakaue / MwGhennndo Date: Wed, 1 Aug 2018 23:54:58 +0800 Subject: [PATCH] Moved command_do_prepare_for_inspect_all_dependencies into the loop of catching port option changes so that the changes are correctly reflected. Changes to be committed: modified: lib/libcommand_do.sh modified: lib/libmain.sh modified: lib/libreinstall.sh --- lib/libcommand_do.sh | 6 +++--- lib/libmain.sh | 2 +- lib/libreinstall.sh | 46 ++++++++++++++++++++++++++-------------------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/lib/libcommand_do.sh b/lib/libcommand_do.sh index 489f6c7..0652e95 100644 --- a/lib/libcommand_do.sh +++ b/lib/libcommand_do.sh @@ -1251,12 +1251,12 @@ 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 + # Prepare for inspecting all dependencies + command_do_prepare_for_inspect_all_dependencies + # Inspection of all dependencies command_do_inspection_of_all_dependencies diff --git a/lib/libmain.sh b/lib/libmain.sh index 44937e0..ac8b889 100644 --- a/lib/libmain.sh +++ b/lib/libmain.sh @@ -12,7 +12,7 @@ main_set_version () MYVERSION=4.1.0 COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9])$' # Template for development versions - MYVERSION=4.0.0+toward_4.1.0_20180801184658 + MYVERSION=4.0.0+toward_4.1.0_20180801235435 COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$' } diff --git a/lib/libreinstall.sh b/lib/libreinstall.sh index 568e282..fc07d2a 100644 --- a/lib/libreinstall.sh +++ b/lib/libreinstall.sh @@ -795,6 +795,30 @@ reinstall_execcmd_getstdout_errlog () return 1 } +# ============= Check whether any required package is missing or too old for build by ports ============= +reinstall_chk_missing_requirement () +{ + local tmp_filter tmp_miising + tmp_filter=${TMPDIR}/reinstall_chk_missing_requirement::requirements.all_but_test.unflavored + tmp_miising=${TMPDIR}/reinstall_chk_missing_requirement::missing_requirements + message_echo "Checking whether any required package is missing or too old..." + sed 's/@.*//' "$REINSTALL_DBNODE_DIR/requirements.all.full" > $tmp_filter || : + if reinstall_make missing 2> /dev/null | grep -Fx -f "$tmp_filter" > $tmp_miising + then + message_echo "Found missing/too old requirements:" + message_cat < $tmp_miising + { + echo "Found missing/too old requirements:" + cat "$tmp_miising" + } > "$REINSTALL_DBNODE_DIR/error.log" + reinstall_restore_conflicts "$REINSTALL_ORIGIN" + reinstall_restore_if_temporarily_deinstalled + reinstall_errproc 'check of missing/too old packages' + temp_set_msg_current_stage "${_MSG_CURRENT_STAGE_general}" + return 1 + fi +} + # ============= Reinstallation for a flavored origin ============= reinstall_exec () { @@ -1166,7 +1190,7 @@ reinstall_exec () fi if [ $opt_fetch_only = no ] && ! reinstall_chk_stage_complete CLEAN_BEFORE_BUILD then - _reinstall_exec__tmpcmd () { reinstall_make_anymode clean; } + _reinstall_exec__tmpcmd () { reinstall_make_anymode clean NOCLEANDEPENDS=yes; } if ! reinstall_execcmd_tee_errlog _reinstall_exec__tmpcmd then reinstall_restore_if_temporarily_deinstalled @@ -1277,25 +1301,7 @@ reinstall_exec () then pkgsys_get_conflicting_installed_pkgs build "$REINSTALL_ORIGIN" \ | reinstall_backup_and_delete_conflicts - message_echo "Checking whether any required package is missing..." - sed 's/@.*//' "$REINSTALL_DBNODE_DIR/requirements.all.full" \ - > ${TMPDIR}/reinstall_exec::requirements.all_but_test.unflavored || : - if reinstall_make missing 2> /dev/null \ - | grep -Fx -f "${TMPDIR}/reinstall_exec::requirements.all_but_test.unflavored" \ - > ${TMPDIR}/reinstall_exec::missing_requirements - then - message_echo "Found missing requirements:" - message_cat < ${TMPDIR}/reinstall_exec::missing_requirements - { - echo "Found missing requirements:" - cat "${TMPDIR}/reinstall_exec::missing_requirements" - } > "$REINSTALL_DBNODE_DIR/error.log" - reinstall_restore_conflicts "$REINSTALL_ORIGIN" - reinstall_restore_if_temporarily_deinstalled - reinstall_errproc 'check of missing packages' - temp_set_msg_current_stage "${_MSG_CURRENT_STAGE_general}" - return - fi + reinstall_chk_missing_requirement || return 0 if ! reinstall_make build $build_args then reinstall_register_stage in_retrial_build -- 2.11.0