• R/O
  • HTTP
  • SSH
  • HTTPS

current: Commit

This is for active development.
New funtionalities are to be added actively.


Commit MetaInfo

Revision8e68db0a6ae39ee5ffd5123174b23cb896b6336a (tree)
Time2018-09-19 23:11:31
AuthorMamoru Sakaue / MwGhennndo <glmwghennndo@user...>
CommiterMamoru Sakaue / MwGhennndo

Log Message

Fixed the wrong implementation of command_do_complete_necessary_upgrades_for_build ().

Changes to be committed:

modified: HISTORY
modified: lib/libcommand_do.sh
modified: lib/libdatabase_build.sh
modified: lib/libmain.sh

Change Summary

Incremental Difference

--- a/HISTORY
+++ b/HISTORY
@@ -32,6 +32,7 @@
3232 [BUG FIX] Evaluation of globs was incorrect for the regular expression form.
3333 [BUG FIX] Flavored requirements were incorrectly inspected. This also caused disability of the use of default packages for flavord ports with the default configuration.
3434 [BUG FIX] The message about the evaluated dependency level in show command was wrong.
35+[BUG FIX] Unselected leaf ports were skipped in (re)installtion.
3536
3637 4.0.0 (29 June 2018)
3738 [NEW] Flavor is supported. Related to this feature, representations of port origins without flavor is recognized to exactly match the unflavored ones.
--- a/lib/libcommand_do.sh
+++ b/lib/libcommand_do.sh
@@ -702,9 +702,8 @@ command_do_inspection_of_necessity ()
702702 program_exec_restartable_loop_operation inspect_necessity
703703 for level in direct full
704704 do
705- find "${DBDIR}/requires" -depth 3 -type f -name "necessary_port.${level}" \
706- > ${DBDIR}/stage.loop_list/necessary_ports.${level}
707- cp "${DBDIR}/stage.loop_list/necessary_ports.${level}" "${DBDIR}/stage.loop_list/complete_necessary_ports.${level}"
705+ find "${DBDIR}/requires" -depth 3 -type f -name "necessary_port.${level}" | \
706+ sed -E 's|.*/([^/]+/[^/]+)/[^/]*$|\1|' > ${DBDIR}/stage.loop_list/necessary_ports.${level}
708707 done
709708 message_echo
710709 }
@@ -721,10 +720,9 @@ command_do_inspection_of_necessary_upgrades ()
721720 _program_exec_restartable_loop_operation__routine ()
722721 {
723722 local markerpath level dbpath origin tag
724- markerpath=$1
723+ origin=$1
725724 level=${_NECESSARY_UPDATES_level}
726- dbpath=`dirname "$markerpath"`
727- origin=`str_dirpath_to_origin "$dbpath"`
725+ dbpath=${DBDIR}/requires/$origin
728726 database_query_does_a_port_need_update "$origin" || return 0
729727 for tag in all run build none
730728 do
@@ -743,6 +741,8 @@ command_do_inspection_of_necessary_upgrades ()
743741 level=${_NECESSARY_UPDATES_level}
744742 message_section_title "Inspection of necessary upgrades at the $level level"
745743 program_exec_restartable_loop_operation necessary_ports.${level}
744+ find "${DBDIR}/requires" -depth 3 -type f -name "necessary_upgrade.run.${level}" | \
745+ sed -E 's|.*/([^/]+/[^/]+)/[^/]*$|\1|' > ${DBDIR}/stage.loop_list/complete_necessary_ports.${level}
746746 message_echo
747747 }
748748 program_exec_and_record_completion NECESSARY_UPDATES:${_NECESSARY_UPDATES_level}
@@ -758,19 +758,10 @@ command_do_complete_necessary_upgrades_for_build ()
758758 PROGRAM_DEPENDS="INSPECT_NECESSITY NECESSARY_UPDATES:${_NECESSARY_UPDATES_level}"
759759 _program_exec_restartable_loop_operation__routine ()
760760 {
761- local markerpath level dbpath origin_requirement dbpath_requirement
762- markerpath=$1
761+ local origin level
762+ origin=$1
763763 level=${_NECESSARY_UPDATES_level}
764- dbpath=`dirname "$markerpath"`
765- [ -e "$dbpath/requirements.build.${level}" -a -e "$dbpath/necessary_upgrade.run.${level}" ] || return 0
766- while read origin_requirement
767- do
768- dbpath_requirement=${DBDIR}/requires/$origin_requirement
769- [ -e "$dbpath_requirement/necessary_upgrade.build.${level}" ] || continue
770- [ `cat "${DBDIR}/moved_from/$origin_requirement/current_version" 2> /dev/null | wc -l` -eq 0 ] || return 0
771- touch "$dbpath_requirement/necessary_upgrade.run.${level}"
772- done < $dbpath/requirements.build.${level}
773- :
764+ database_build_complete_necessary_upgrades_for_build "$origin" "$level"
774765 }
775766 _program_exec_and_record_completion__operation ()
776767 {
--- a/lib/libdatabase_build.sh
+++ b/lib/libdatabase_build.sh
@@ -1019,6 +1019,25 @@ database_build_complement_to_new_dependents_for_targets ()
10191019 fi
10201020 }
10211021
1022+# ============= Recursively complete necessary upgrades for build =============
1023+database_build_complete_necessary_upgrades_for_build ()
1024+{
1025+ local origin level dbpath origin_requirement dbpath_requirement
1026+ origin=$1
1027+ level=$2
1028+ dbpath=${DBDIR}/requires/$origin
1029+ [ -e "$dbpath/requirements.build.${level}" ] || return 0
1030+ while read origin_requirement
1031+ do
1032+ dbpath_requirement=${DBDIR}/requires/$origin_requirement
1033+ [ -e "$dbpath_requirement/necessary_upgrade.build.${level}" ] || continue
1034+ [ `cat "${DBDIR}/moved_from/$origin_requirement/current_version" 2> /dev/null | wc -l` -eq 0 ] || return 0
1035+ touch "$dbpath_requirement/necessary_upgrade.run.${level}"
1036+ database_build_complete_necessary_upgrades_for_build "$origin_requirement" "$level"
1037+ done < $dbpath/requirements.build.${level}
1038+ :
1039+}
1040+
10221041 # ============= Build target attribute files recursively =============
10231042 database_build_target_attributes ()
10241043 {
--- a/lib/libmain.sh
+++ b/lib/libmain.sh
@@ -12,7 +12,7 @@ main_set_version ()
1212 MYVERSION=4.1.0
1313 COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$'
1414 # Template for development versions
15- MYVERSION=4.0.0+toward_4.1.0_20180919111149
15+ MYVERSION=4.0.0+toward_4.1.0_20180919231118
1616 COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$'
1717 }
1818
Show on old repository browser