• R/O
  • HTTP
  • SSH
  • HTTPS

current: Commit

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


Commit MetaInfo

Revisionb3593f7aa560eeae1fa7ce80a3793762b876ccbc (tree)
Time2018-09-16 22:14:24
AuthorMamoru Sakaue / MwGhennndo <glmwghennndo@user...>
CommiterMamoru Sakaue / MwGhennndo

Log Message

Fixed a bug that incompletion of necessary build dependent detection caused incomlete reinstallation.

Changes to be committed:

modified: lib/libcommand_do.sh
modified: lib/libdatabase_query.sh
modified: lib/libmain.sh

Change Summary

Incremental Difference

--- a/lib/libcommand_do.sh
+++ b/lib/libcommand_do.sh
@@ -704,6 +704,7 @@ command_do_inspection_of_necessity ()
704704 do
705705 find "${DBDIR}/requires" -depth 3 -type f -name "necessary_port.${level}" \
706706 > ${DBDIR}/stage.loop_list/necessary_ports.${level}
707+ cp "${DBDIR}/stage.loop_list/necessary_ports.${level}" "${DBDIR}/stage.loop_list/complete_necessary_ports.${level}"
707708 done
708709 message_echo
709710 }
@@ -727,12 +728,12 @@ command_do_inspection_of_necessary_upgrades ()
727728 database_query_does_a_port_need_update "$origin" || return 0
728729 for tag in all run build none
729730 do
730- touch "$dbpath/necessary_upgrade.$tag.${level}"
731- [ -e "$dbpath/dependents.$tag.${level}" -o "$dbpath/ignored_dependents.$tag" ] || continue
732- cat "$dbpath/dependents.$tag.${level}" "$dbpath/ignored_dependents.$tag" 2> /dev/null | \
731+ touch "$dbpath/necessary_upgrade.${tag}.${level}"
732+ [ -e "$dbpath/dependents.${tag}.${level}" -o "$dbpath/ignored_dependents.${tag}" ] || continue
733+ cat "$dbpath/dependents.${tag}.${level}" "$dbpath/ignored_dependents.${tag}" 2> /dev/null | \
733734 while read origin_dependent
734735 do
735- touch "${DBDIR}/requires/$origin_dependent/necessary_upgrade.$tag.${level}"
736+ touch "${DBDIR}/requires/$origin_dependent/necessary_upgrade.${tag}.${level}"
736737 done
737738 done
738739 }
@@ -748,6 +749,40 @@ command_do_inspection_of_necessary_upgrades ()
748749 done
749750 }
750751
752+# ============= Completion of necessary upgrades for build =============
753+command_do_complete_necessary_upgrades_for_build ()
754+{
755+ local PROGRAM_DEPENDS _NECESSARY_UPDATES_level
756+ for _NECESSARY_UPDATES_level in direct full
757+ do
758+ PROGRAM_DEPENDS="INSPECT_NECESSITY NECESSARY_UPDATES:${_NECESSARY_UPDATES_level}"
759+ _program_exec_restartable_loop_operation__routine ()
760+ {
761+ local markerpath level dbpath origin_requirement dbpath_requirement
762+ markerpath=$1
763+ 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+ touch "$dbpath_requirement/necessary_upgrade.run.${level}"
771+ done < $dbpath/requirements.build.${level}
772+ :
773+ }
774+ _program_exec_and_record_completion__operation ()
775+ {
776+ local level
777+ level=${_NECESSARY_UPDATES_level}
778+ message_section_title "Completion of necessary upgrades for build at the $level level"
779+ program_exec_restartable_loop_operation complete_necessary_ports.${level}
780+ message_echo
781+ }
782+ program_exec_and_record_completion COMPLETE_NECESSARY_UPDATES:${_NECESSARY_UPDATES_level}
783+ done
784+}
785+
751786 # ============= Preparation for inspection of new leaf ports =============
752787 command_do_preparation_for_inspection_of_new_leaf_ports ()
753788 {
@@ -1355,6 +1390,9 @@ command_do_prepare ()
13551390 # Inspection of necessary upgrades
13561391 command_do_inspection_of_necessary_upgrades
13571392
1393+ # Completion of necessary upgrades for build
1394+ command_do_complete_necessary_upgrades_for_build
1395+
13581396 # Preparation for inspection of new leaf ports
13591397 command_do_preparation_for_inspection_of_new_leaf_ports
13601398
--- a/lib/libdatabase_query.sh
+++ b/lib/libdatabase_query.sh
@@ -506,11 +506,15 @@ database_query_show_two_column_lists ()
506506 # ============= Output of "show" command for a single list =============
507507 database_query_show_single_list ()
508508 {
509- local list pkgnamedb flag_filter_skip_unchanged flag_filter_only_target tmpflag_exists put_blankline
509+ local list pkgnamedb flag_filter_skip_unchanged flag_filter_only_target flag_negative_listdb tmpflag_exists put_blankline origin matches flag pkg table
510+ local currentorigin_is_alll currentorigin_is_target currentorigin_is_requires_requirements
511+ local currentorigin_is_initial_requirements currentorigin_is_requires_dependents
512+ local currentorigin_is_initial_dependents currentorigin_is_requires_requirements_complement currentorigin_is_relevant
510513 list=$1
511514 pkgnamedb=$2
512515 flag_filter_skip_unchanged=$3
513516 flag_filter_only_target=$4
517+ flag_negative_listdb=$5
514518 tmpflag_exists=${TMPDIR}/database_query_show_single_list::exists_item
515519 if [ `cat "${DBDIR}/$list" 2> /dev/null | wc -l` -eq 0 ]
516520 then
@@ -539,9 +543,20 @@ database_query_show_single_list ()
539543 [ -n "$put_blankline" ] && message_echo
540544 while read origin
541545 do
542- [ -n "$flag_filter_skip_unchanged" -a $opt_skip_unchanged = yes \
543- -a ! -e "${DBDIR}/requires/$origin/$flag_filter_skip_unchanged" ] \
544- && continue
546+ [ -n "$flag_negative_listdb" ] && grep -Fx "$origin" "${DBDIR}/$flag_negative_listdb" 2> /dev/null && continue
547+ if [ -n "$flag_filter_skip_unchanged" -a $opt_skip_unchanged = yes ]
548+ then
549+ matches=no
550+ for flag in $flag_filter_skip_unchanged
551+ do
552+ if [ -e "${DBDIR}/requires/$origin/$flag" ]
553+ then
554+ matches=yes
555+ break
556+ gi
557+ done
558+ [ $matches = no ] && continue
559+ fi
545560 if [ -n "$flag_filter_only_target" ]
546561 then
547562 database_query_get_target_attributes currentorigin "$origin"
@@ -622,13 +637,14 @@ database_query_show_list_moved ()
622637 # ============= Actual operations of "show" command for a single list =============
623638 database_query_show_single_list_exec ()
624639 {
625- local subject deptag level dbsuffix flag_filter_skip_unchanged flag_filter_only_target pkgnamedb
640+ local subject deptag level dbsuffix flag_filter_skip_unchanged flag_filter_only_target flag_negative_listdb pkgnamedb
626641 subject=$1
627642 deptag=$2
628643 level=$3
629644 dbsuffix=$deptag.$level
630645 flag_filter_skip_unchanged=
631646 flag_filter_only_target=
647+ flag_negative_listdb=
632648 pkgnamedb='moved_from obsolete initial'
633649 case $subject in
634650 todo )
@@ -654,8 +670,9 @@ database_query_show_single_list_exec ()
654670 message_dependency_scope "$deptag" "$level"
655671 message_echo
656672 list=todo_after_requirements_succeed.$dbsuffix.list
657- flag_filter_skip_unchanged=necessary_upgrade.$dbsuffix
673+ flag_filter_skip_unchanged="necessary_upgrade.$dbsuffix necessary_upgrade_completed.$dbsuffix"
658674 flag_filter_only_target=y
675+ flag_negative_listdb=leaf_ports_to_delete.unselected
659676 ;;
660677 resolved )
661678 message_echo "The following ports had problems which have been manually resolved:"
@@ -763,7 +780,7 @@ database_query_show_single_list_exec ()
763780 ;;
764781 esac
765782 database_query_show_single_list "$list" "$pkgnamedb" \
766- "$flag_filter_skip_unchanged" "$flag_filter_only_target"
783+ "$flag_filter_skip_unchanged" "$flag_filter_only_target" "$flag_negative_listdb"
767784 }
768785
769786 # ============= Check whether a port is registered in a list =============
--- 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_20180914121445
15+ MYVERSION=4.0.0+toward_4.1.0_20180916221406
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