M ChangeLog => ChangeLog +4 -0
@@ 1,6 1,10 @@
2008-09-02 Jaka Kranjc <lynxlynxlynx@sourcemage.org>
* common, libmisc: moved the notice and failure log functions to
libmisc and added a check to log_failure_reason for being in cast
+ * cast: when looking for dropped spells, also check the bad_spells
+ hash, since we're removing spells from to_cast when things go awry
+ * libdepends: only put the broken spell into the failed list, "drop"
+ the dependees and dependencies
2008-09-01 Jaka Kranjc <lynxlynxlynx@sourcemage.org>
* cast, libspell, libsorcery, libcast, libsummon: fixed bug #2209
M usr/sbin/cast => usr/sbin/cast +2 -3
@@ 672,9 672,8 @@ function pass_five() {
local NOT_CAST
NOT_CAST=$( { hash_get_table_fields to_cast
- cat $SUCCESS_LIST
- cat $FAILED_LIST
- cat $CHECK_TRIGGERS_SUCCESS
+ hash_get_table_fields bad_spells
+ cat $SUCCESS_LIST $FAILED_LIST $CHECK_TRIGGERS_SUCCESS
} | sort | uniq -u ) # all not caught otherwise
if [[ "$NOT_CAST" ]] ;then
message "${DEFAULT_COLOR}" #being paranoid
M var/lib/sorcery/modules/libdepends => var/lib/sorcery/modules/libdepends +7 -3
@@ 1623,7 1623,7 @@ function private_remove_dependees()
message "${PROBLEM_COLOR}Removing dependees of $SPELL_COLOR$spell$DEFAULT_COLOR"
# take care of the spell
- private_discard_spell $spell
+ private_discard_spell $spell fail
# take care of the dependees and their dependees and ...
recurse_remove_dependees() {
@@ 1677,11 1677,15 @@ function private_remove_dependees()
function private_discard_spell()
{
local spell=$1
+ local failed=$2
grep -qs $spell $FAILED_LIST && return 0
- # spell is being removed from cast list, add to FAILED_LIST
- echo "$spell" >> $FAILED_LIST
+ if [[ $failed == fail ]]; then
+ # spell is being removed from cast list, add to FAILED_LIST
+ # the rest we want to just show up as dropped
+ echo "$spell" >> $FAILED_LIST
+ fi
hash_put depends_looked_at $spell failed
hash_unset "$CAST_HASH" "$spell"
hash_put $CANNOT_CAST_HASH "$spell" "Failed"