sm-grimoire AT lists.ibiblio.org
Subject: Discussion of Spells and Grimoire items
List archive
[SM-Grimoire] [PATCH] Preserve OPTS set by $SPELL_CONFIG
- From: "Sergey A. Lipnevich" <sergey AT optimaltec.com>
- To: sm-sorcery AT lists.ibiblio.org, sm-grimoire AT lists.ibiblio.org
- Subject: [SM-Grimoire] [PATCH] Preserve OPTS set by $SPELL_CONFIG
- Date: Mon, 31 Mar 2003 11:45:09 -0500
Hi All,
There are a number of spells in the grimoire that set OPTS in the $SPELL_CONFIG file. Because $SPELL_CONFIG is run only once before libdepends::satisfy_depends(), where OPTS is reset, all such spells are not configured properly (configuration options setting OPTS directly are effectively lost). I intend to apply the following patch to fix satisfy_depends to preserve whatever OPTS have been accumulated from the run_spell_config() call, the patch is attached. Any objections?
Thanks!
Sergey.
==== //sgl/devel/sorcery/var/lib/sorcery/modules/libdepends#5 - /home/sergey/smgl-p4/devel/sorcery/var/lib/sorcery/modules/libdepends ====
@@ -100,7 +100,7 @@
debug "libdepends" "run_spell_config() - DEPENDS_CONFIG=$DEPENDS_CONFIG SPELL=$SPELL, SPELL_C
ONFIG=$SPELL_CONFIG DEPENDS_STATUS=$DEPENDS_STATUS"
if [ -x $SPELL_CONFIG ]; then
- debug "libdepends" "satisfy_depends() - found $SPELL_CONFIG"
+ debug "libdepends" "run_spell_config() - found $SPELL_CONFIG"
. $SPELL_CONFIG
fi
@@ -139,7 +139,9 @@
debug "libdepends" "Running satisfy_depends() on $SPELL"
local DEP
- unset OPTS
+ unset OPTS
+
+ # some spells apply changes to OPTS directly
run_spell_config
local LINE=''
@@ -195,7 +197,8 @@
# TODO: Do something about exiled spells so that they've got `off'
# in DEPENDS_STATUS file, or something else do improve this
#
- OPTS=`get_depends_options "$SPELL"`
+ local OPTS_DEPENDS=$(get_depends_options "$SPELL")
+ OPTS="$OPTS $OPTS_DEPENDS"
debug 'libdepends' "satisfy_depends() - final OPTS=$OPTS"
}
- [SM-Grimoire] [PATCH] Preserve OPTS set by $SPELL_CONFIG, Sergey A. Lipnevich, 03/31/2003
Archive powered by MHonArc 2.6.24.