diff options
author | Thomas Orgis | 2020-09-30 13:54:32 +0200 |
---|---|---|
committer | Thomas Orgis | 2021-02-26 12:31:51 +0100 |
commit | c42677de4c5321d09f0889a220deec1bafdd573d (patch) | |
tree | 52d06543734714aebdc4a6b3c378318f83261302 | |
parent | 18a0f4352f1ecc392d8b7ac1fba2e2502a55290b (diff) |
libdepengine: more avoidance of casts after failures
-rw-r--r-- | ChangeLog | 2 | ||||
-rwxr-xr-x | var/lib/sorcery/modules/libdepengine | 10 |
2 files changed, 12 insertions, 0 deletions
@@ -3,6 +3,8 @@ 2020-09-30 Thomas Orgis <sobukus@sourcemage.org> * libgrimoire: default to default size of tmpfs (half of RAM) + * libdepengine: avoid cast of spells whose dependencies failed, + also before the actual cast phase 2020-09-19 Thomas Orgis <sobukus@sourcemage.org> * protected: added readline, ncurses, isl, icu (bug 16112) diff --git a/var/lib/sorcery/modules/libdepengine b/var/lib/sorcery/modules/libdepengine index 02e9b329..486fb63c 100755 --- a/var/lib/sorcery/modules/libdepengine +++ b/var/lib/sorcery/modules/libdepengine @@ -135,10 +135,20 @@ depengine_cast_engine() { rc=$? fi + # Crude hacks to avoid casting spells whose dependencies failed. + # Since sorcery does not properly keep track of spell state with + # its multiple passes, some grepping in files that store failures + # does the trick. if grep -qs "^$spell$" "$FAILED_LIST"; then message "${MESSAGE_COLOR}The spell ${SPELL_COLOR}$spell$MESSAGE_COLOR" \ " failed to cast. Remembering that.$DEFAULT_COLOR" rc=1 + # pre_sub_depends failure is non-fatal, just means re-cast + elif grep -s "^$spell " "$CAST_BACKUPDIR/failure_reason_log" \ + | grep -q -v pre_sub_depends; then + message "${MESSAGE_COLOR}The spell ${SPELL_COLOR}$spell$MESSAGE_COLOR" \ + " failed before cast. Remembering that.$DEFAULT_COLOR" + rc=1 fi dpgn_set_spell_color $spell brown |