~sourcemage/sorcery

fbfada5bd2de363237e9e247c4c3167cf3e788c9 — Jaka Kranjc 9 years ago 8228f57 + 473f677
Merge branch 'my-test' into stable-1.15

Thomas' fix for #662 and version bump
M ChangeLog => ChangeLog +8 -0
@@ 1,3 1,11 @@
2015-04-22 Jaka Kranjc <lynxlynxlynx@sourcemage.org>
	* version: 1.15.4 released!

2015-04-03 Thomas Orgis <sobukus@sourcemage.org>
	* build_api/common, libdepengine: Delete uncommitted depends files only
	  after all spells are cast, preserving configuration for triggered
	  casts #662

2015-02-03 Jaka Kranjc <lynxlynxlynx@sourcemage.org>
	* version: 1.15.3 released!


M etc/sorcery/version => etc/sorcery/version +1 -1
@@ 1,1 1,1 @@
1.15.3
1.15.4

M var/lib/sorcery/modules/build_api/common => var/lib/sorcery/modules/build_api/common +2 -3
@@ 311,7 311,7 @@ function run_spell_success() {
              "$DEFAULT_COLOR"

      rm_source_dir
      rm -f "$C_LOG" "$spell_sub_depends" "$spell_rsub_depends" "$spell_depends"
      rm -f "$C_LOG"
      return
    fi



@@ 363,8 363,7 @@ function run_spell_success() {
    create_cache_archive $TMP_INST_LOG $CACHE $CACHE_COMP

    report_install
    rm  -f $IW_LOG $C_LOG $TMP_INST_LOG $TMP_MD5_LOG "$STAGE_INST_LOG" \
           "$spell_sub_depends" "$spell_rsub_depends" "$spell_depends"
    rm  -f $IW_LOG $C_LOG $TMP_INST_LOG $TMP_MD5_LOG "$STAGE_INST_LOG"
}

#---------------------------------------------------------------------

M var/lib/sorcery/modules/libdepengine => var/lib/sorcery/modules/libdepengine +17 -0
@@ 43,6 43,8 @@ function depengine_entry_point() {
  local spell_list=$1
  local need_cast_list=$2
  local spell pending_list spell_status rc
  local spell_depends spell_sub_depends spell_rsub_depends

  for spell in $(hash_get_table_fields dep_f_hash); do
    dpgn_set_spell_color $spell white
  done


@@ 67,6 69,21 @@ function depengine_entry_point() {
    done
    pending_list=$(dpgn_get_all_pending_triggers)
  done

  if [[ $CAST_PASS == "four" ]]; then
    # Now clean up uncommitted dependency files.
    # During cast it is too early, since things can get re-cast via triggers
    # and then miss the configuration (empty OPTS).
    # See issue #662 in chiliproject.
    debug "libdepengine" "Cleanup of all uncommitted files"
    for spell in $spell_list; do
      get_uncommitted_depends_file      $spell spell_depends
      get_uncommitted_sub_depends_file  $spell spell_sub_depends
      get_uncommitted_rsub_depends_file $spell spell_rsub_depends
      rm -f "$spell_sub_depends" "$spell_rsub_depends" "$spell_depends"
    done
  fi

  return 0
}