Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (e4192cbc8efd5a4174212aaebe4ac189af6fdf34)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (e4192cbc8efd5a4174212aaebe4ac189af6fdf34)
  • Date: Sat, 6 Sep 2008 05:08:20 -0500

GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 5 +++++
var/lib/sorcery/modules/libdepends | 10 +++++++---
var/lib/sorcery/modules/libmisc | 5 ++++-
3 files changed, 16 insertions(+), 4 deletions(-)

New commits:
commit e4192cbc8efd5a4174212aaebe4ac189af6fdf34
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

* libmisc: made log_failure_reason idempotent and added an optional
arg
* libdepends: improved the way exiled spells are handled for the cast
summary failure reason feature

diff --git a/ChangeLog b/ChangeLog
index 325f8b3..86555ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-06 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libmisc: made log_failure_reason idempotent and added an optional
arg
+ * libdepends: improved the way exiled spells are handled for the cast
+ summary failure reason feature
+
2008-09-05 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* *: added more locking calls #7917
* cleanse: simplified a few lines and made the symlink check locale
diff --git a/var/lib/sorcery/modules/libdepends
b/var/lib/sorcery/modules/libdepends
index 5476e9b..f6fa34f 100755
--- a/var/lib/sorcery/modules/libdepends
+++ b/var/lib/sorcery/modules/libdepends
@@ -460,10 +460,11 @@ function private_run_depends()
if private_should_cast $SPELL ; then

# this cant go in private_should_cast because then the dependee wont
- # have a chance at being fixed, ideally we should check in
- # depends/optional_depends and fail there
+ # have a chance at being fixed
+ # we check already here, so a specified spell isn't needlessly run
if spell_exiled $1; then
depends_message "${SPELL}" "is exiled and will not be cast."
+ log_failure_reason exiled $1
return 1
fi
get_uncommitted_depends_file $SPELL spell_depends
@@ -1036,6 +1037,8 @@ function work_depends_spell()
depends_message "${1}" "has been exiled!"
if [[ $failure_ok == "no" ]] || ! query "Build $1 anyway?" y; then
hash_put $CANNOT_CAST_HASH "$1" "Exiled"
+ grep -qs $1 $FAILED_LIST || echo $1 >> $FAILED_LIST
+ log_failure_reason exiled $1
return 1
fi
fi
@@ -1185,7 +1188,8 @@ function work_optional_depends_spell()
# if $1 optionally depends on something exiled we always say no
if spell_exiled $1 ; then
depends_message "${1}" "has been exiled! not using as $article
$query_term"
- hash_put $CANNOT_CAST_HASH "$1" "Exiled"
+ # don't put it into the bad_spells hash, since it wasn't specified
directly
+ #hash_put $CANNOT_CAST_HASH "$1" "Exiled"
private_common_depends "$1" "off" "$database_term" "$2" "$3"
return 0
fi
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 09d8cff..5603d6b 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1552,9 +1552,12 @@ function log_failure_reason() {
# delve has a different TMP_DIR, so we can't use it
local failure_reason_log=$CAST_BACKUPDIR/failure_reason_log
local frl
+ local spell=${2:-$SPELL}
+
+ grep -sq "^$spell ($1)$" $failure_reason_log && return 0

lock_start_transaction "$failure_reason_log" frl
- echo "$SPELL ($1)" >> "$frl"
+ echo "$spell ($1)" >> "$frl"
lock_commit_transaction "$failure_reason_log"
}




  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (e4192cbc8efd5a4174212aaebe4ac189af6fdf34), Jaka Kranjc, 09/06/2008

Archive powered by MHonArc 2.6.24.

Top of Page