summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Orgis2020-09-08 00:45:21 +0200
committerIsmael Luceno2020-09-15 17:38:16 +0200
commit85b671af5ddb30d7a1c5682b3d9b5ee73d54ae8f (patch)
treed80915c70906d29bcb6b81d92a319f62c63fa945
parent511f1c101db05bee4b4468fbc5e6ccbea1ccb053 (diff)
libdepengine: avoid building dependees after dependencies failed
This is another hack on the horrid sorcery logic of running many times through the same code to do different things. The problem: Building of a dependency fails, but sorcery still tries to build the spell depending on the failed one, usually resulting in predictable failure, otherwise in a perhaps unintended build with an older installed version of the dependency. Example was nss failing for me (still have to figure out that weird one) and still firefox cast bein attempted after that. This is stupid behaviour. I solve that by grepping for the spell in $FAILED_LIST and using occurence there to indicate a nonzero return value where there is no value recorded from the depengine_cast_engine. The only justification is that it works. Caveat: It only works to avoid nonsense in the casting phase. If things fail in configure phase, we still have the pecuilarity that dependees are removed from the cast only if they have been processed before. If you specified cast a b where b depends on a and configuration of a fails, b is still attempted to be cast. This is for another night, or a proper rewrite. Note: There are other places with grep $spell $FAILED_LIST. I suggest checking if that should read "^$spell$" instead there, too.
-rwxr-xr-xvar/lib/sorcery/modules/libdepengine6
1 files changed, 6 insertions, 0 deletions
diff --git a/var/lib/sorcery/modules/libdepengine b/var/lib/sorcery/modules/libdepengine
index df4b9fe2..1ca39c51 100755
--- a/var/lib/sorcery/modules/libdepengine
+++ b/var/lib/sorcery/modules/libdepengine
@@ -116,6 +116,12 @@ depengine_cast_engine() {
rc=$?
fi
+ 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
+ fi
+
dpgn_set_spell_color $spell brown
if [[ $rc == 0 ]] ; then