sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to test-1.13 sorcery by Jaka Kranjc (61345e62d0b761ef6d808b360dc13ed6e838f8d2)
- From: Jaka Kranjc <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to test-1.13 sorcery by Jaka Kranjc (61345e62d0b761ef6d808b360dc13ed6e838f8d2)
- Date: Sat, 5 Jan 2008 10:20:12 -0600
GIT changes to test-1.13 sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:
var/lib/sorcery/modules/libdepends | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
New commits:
commit 61345e62d0b761ef6d808b360dc13ed6e838f8d2
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
wip: libdepends optimisations for stable
(cherry picked from commit a7007c512d96434a482ad3a9628d7c6698946042)
diff --git a/var/lib/sorcery/modules/libdepends
b/var/lib/sorcery/modules/libdepends
index 5de0593..778eaeb 100755
--- a/var/lib/sorcery/modules/libdepends
+++ b/var/lib/sorcery/modules/libdepends
@@ -299,7 +299,7 @@ function compute_uninstalled_depends()
local spell spells
spells=( $@ )
- PRETEND_NOT_INSTALLED=$(echo "$@"|tr " " "\n")
+ PRETEND_NOT_INSTALLED=" $@ "
local _idx
@@ -404,7 +404,7 @@ function private_should_cast()
# order is important here...
if ! codex_does_spell_exist $1; then
return 1
- elif echo "$PRETEND_NOT_INSTALLED" | grep -x -q "$1" ; then
+ elif echo "$PRETEND_NOT_INSTALLED" | grep -q " $1 " ; then
# always look at stuff on the command line unless its exiled
return 0
# from here on the spell was not on the command line...
@@ -691,7 +691,7 @@ function work_depends_provider()
# check if we've already answered this question
if [[ ! $default ]]; then
for tmp in $CANDIDATES; do
- echo ${spells[@]} | tr " " "\n"| grep -x -q "$tmp" && default=$tmp &&
break
+ echo " ${spells[@]} " | grep -q " $tmp " && default=$tmp && break
done
fi
@@ -799,7 +799,7 @@ function work_optional_depends_provider()
# check if we've already answered this question
if [[ ! $default ]]; then
for tmp in $CANDIDATES; do
- echo ${spells[@]} | tr " " "\n" | grep -x -q "$tmp" && default=$tmp &&
break
+ echo " ${spells[@]} " | grep -q " $tmp " && default=$tmp && break
done
fi
@@ -892,8 +892,7 @@ function work_optional_depends_spell()
# check the install queue
if [[ ! $default ]]; then
debug "libdepends" "Checking in queue"
- #\< and \> match the empty string at the start and end of a word
- echo ${spells[@]}|tr " " "\n" | grep -x -q "$1" && default=on
+ echo " ${spells[@]} " | grep -q " $1 " && default=on
fi
# check if installed/held
@@ -1017,7 +1016,7 @@ function private_up_trigger() {
# afk 6-7-06 Im not sure this line is correct, it seems to only
# make a circular depends, instead we want $TARGET to depend on $SPELL
- echo ${NEW_DEPENDS[@]} |tr " " "\n"| grep -x -q "$TARGET" ||
+ echo " ${NEW_DEPENDS[@]} " | grep -q " $TARGET " ||
NEW_DEPENDS=( ${NEW_DEPENDS[*]} $spell)
triggerees=( ${triggerees[*]} $TARGET )
- [SM-Commit] GIT changes to test-1.13 sorcery by Jaka Kranjc (61345e62d0b761ef6d808b360dc13ed6e838f8d2), Jaka Kranjc, 01/05/2008
Archive powered by MHonArc 2.6.24.