sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master sorcery by Jaka Kranjc (013fcc2ed6286dc3111afb7f7eb1031dc7956676)
- From: Jaka Kranjc <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (013fcc2ed6286dc3111afb7f7eb1031dc7956676)
- Date: Tue, 26 May 2009 05:47:01 -0500
GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:
ChangeLog | 11 +++++++++++
var/lib/sorcery/modules/build_api/api2 | 23 +++++++++--------------
var/lib/sorcery/modules/libcast | 10 +++++-----
var/lib/sorcery/modules/libcodex | 2 +-
var/lib/sorcery/modules/libdepends | 6 +++---
var/lib/sorcery/modules/libdispel | 8 ++++----
var/lib/sorcery/modules/libgpg | 10 +++++-----
var/lib/sorcery/modules/libresurrect | 5 ++---
var/lib/sorcery/modules/libsorcery | 13 ++++++-------
var/lib/sorcery/modules/libunpack | 28 ++++++++++++++--------------
10 files changed, 60 insertions(+), 56 deletions(-)
New commits:
commit 7fc6445dc8d78851753616965fa67ab2798280e6
Author: Eric Sandall <sandalle AT sourcemage.org>
Commit: Eric Sandall <sandalle AT sourcemage.org>
modules/*: Fixes Bug #15237
Whenever SPELL_COLOR is set a corresponding DEFAULT_COLOR must also
be set after the spell name and before any other characters
(including escapes or grammar).
diff --git a/ChangeLog b/ChangeLog
index 561fee6..864f1eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-05-22 Eric Sandall <sandalle AT sourcemage.org>
+ * api2, libdepends, libunpack, libdispel: Changing back to
+ DEFAULT_COLOR needs to occur in the same call to message() as the
+ colour change. Fixes Bug #15237
+ * libgpg, libresurrect, libcodex, libsorcery: Changing back to
+ DEFAULT_COLOR needs to occur in the same call to message() as the
+ colour change. Fixes Bug #15237
+ * libcast: Changing back to DEFAULT_COLOR needs to occur in the same
+ call to message() as the colour change and before calls to different
+ colors. Fixes Bug #15237
+
2009-05-12 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* url_*: fixed url_verify_* to not break on empty optional parameters
* dl_git: updated for newer git, initial patch from Andraž Levstik
#15208
diff --git a/var/lib/sorcery/modules/build_api/api2
b/var/lib/sorcery/modules/build_api/api2
index d4f3cd1..595cbf4 100755
--- a/var/lib/sorcery/modules/build_api/api2
+++ b/var/lib/sorcery/modules/build_api/api2
@@ -123,8 +123,7 @@ function run_pre_build() {
debug "build_api/api2" "run_pre_build()"
message "${MESSAGE_COLOR}Preparing" \
- "${SPELL_COLOR}${SPELL}" \
- "${DEFAULT_COLOR}"
+ "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}"
rm_source_dir || return 1
mkdir -p $BUILD_DIRECTORY
@@ -147,8 +146,7 @@ function run_build() {
echo "Compile log for $SPELL $VERSION Built on `date -u`" > $C_LOG
echo "Using gcc version: `gcc -dumpversion`" >> $C_LOG
message "${MESSAGE_COLOR}Building" \
- "${SPELL_COLOR}${SPELL}" \
- "${DEFAULT_COLOR}" >&3
+ "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}" >&3
if [ -d "$SOURCE_DIRECTORY" ] ; then
cd "$SOURCE_DIRECTORY"
@@ -211,14 +209,12 @@ function run_install() {
debug "build_api/api2" "Starting run_install()"
if [[ $STAGED_INSTALL == on ]]; then
- message "${MESSAGE_COLOR}Installing" \
- "${SPELL_COLOR}${SPELL}" \
- "${MESSAGE_COLOR}into the stage" \
- "${DEFAULT_COLOR}" >&3
+ message "${MESSAGE_COLOR}Installing" \
+ "${SPELL_COLOR}${SPELL}${MESSAGE_COLOR}" \
+ "into the stage${DEFAULT_COLOR}" >&3
else
message "${MESSAGE_COLOR}Installing" \
- "${SPELL_COLOR}${SPELL}" \
- "${DEFAULT_COLOR}" >&3
+ "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}" >&3
fi
if [ -f $S_PWD ] ; then
@@ -274,10 +270,9 @@ function run_post_install() {
function run_transfer() {
if [[ "$STAGED_INSTALL" != "off" ]]
then
- message "${MESSAGE_COLOR}Installing" \
- "${SPELL_COLOR}${SPELL}" \
- "${MESSAGE_COLOR}into the system" \
- "${DEFAULT_COLOR}" >&3
+ message "${MESSAGE_COLOR}Installing" \
+ "${SPELL_COLOR}${SPELL}${MESSAGE_COLOR}" \
+ "into the system${DEFAULT_COLOR}" >&3
run_spell_file TRANSFER transfer
fi
}
diff --git a/var/lib/sorcery/modules/libcast b/var/lib/sorcery/modules/libcast
index 09747f3..db56bb9 100755
--- a/var/lib/sorcery/modules/libcast
+++ b/var/lib/sorcery/modules/libcast
@@ -109,7 +109,7 @@ function query_conflicts() {
list_find "$ignore_conflict" ${spell_and_default[0]} && continue
local text="${SPELL_COLOR}${SPELL}${MESSAGE_COLOR} conflicts with"
- text="$text ${SPELL_COLOR}${spell_and_default[0]}.${QUERY_COLOR}"
+ text="$text
${SPELL_COLOR}${spell_and_default[0]}${DEFAULT_COLOR}${QUERY_COLOR}."
text="$text Dispel"
text="$text ${SPELL_COLOR}${spell_and_default[0]}${MESSAGE_COLOR}?"
@@ -157,9 +157,9 @@ function run_security() {
message "${SPELL_COLOR}${SPELL}:${DEFAULT_COLOR}"
tee -a $SECURITY_LOG < $SCRIPT_DIRECTORY/SECURITY
if grep -q critical $SCRIPT_DIRECTORY/SECURITY; then
- query "${RED}SECURITY CRITICAL:${QUERY_COLOR} Do you still want to
cast ${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}?" "n"
+ query "${RED}SECURITY CRITICAL: ${QUERY_COLOR}Do you still want to
cast ${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}${QUERY_COLOR}?" "n"
else
- query "SECURITY: Do you still want to cast
${SPELL_COLOR}$SPELL${QUERY_COLOR}?" "y"
+ query "SECURITY: Do you still want to cast
${SPELL_COLOR}$SPELL${DEFAULT_COLOR}${QUERY_COLOR}?" "y"
fi
rc=$?
fi
@@ -646,8 +646,8 @@ function acquire_cast_lock() {
if test -f $SOLO && grep -q "^$SPELL$" $SOLO ||
[ -f $SCRIPT_DIRECTORY/SOLO ]
then #SOLO spell
- message -n "${MESSAGE_COLOR}Waiting for${DEFAULT_COLOR}${SPELL_COLOR}" \
- "all other${DEFAULT_COLOR} ${MESSAGE_COLOR}spells to" \
+ message -n "${MESSAGE_COLOR}Waiting for${DEFAULT_COLOR}" \
+ "${SPELL_COLOR}all other${DEFAULT_COLOR}
${MESSAGE_COLOR}spells to" \
"complete...${DEFAULT_COLOR}"
excllock_resources "cast" "$SPELL"
else
diff --git a/var/lib/sorcery/modules/libcodex
b/var/lib/sorcery/modules/libcodex
index 5ce28fd..b3e9c05 100755
--- a/var/lib/sorcery/modules/libcodex
+++ b/var/lib/sorcery/modules/libcodex
@@ -507,7 +507,7 @@ function codex_does_spell_exist() {
message "${PROBLEM_COLOR}Empty string is not a spell!${DEFAULT_COLOR}"
retValue=1
elif ! [[ $(codex_find_spell_by_name "$i") ]] ; then
- message "${SPELL_COLOR}$i${PROBLEM_COLOR} is not a
spell!${DEFAULT_COLOR}"
+ message "${SPELL_COLOR}$i${DEFAULT_COLOR}${PROBLEM_COLOR} is not a
spell!${DEFAULT_COLOR}"
retValue=1
fi
done
diff --git a/var/lib/sorcery/modules/libdepends
b/var/lib/sorcery/modules/libdepends
index 7ad7af8..6fe9b88 100755
--- a/var/lib/sorcery/modules/libdepends
+++ b/var/lib/sorcery/modules/libdepends
@@ -1369,7 +1369,7 @@ function select_provider()
#---------------------------------------------------------------------
function real_up_trigger() {
message "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}" \
- "${CHECK_COLOR}triggers a" \
+ "${CHECK_COLOR}triggers a${DEFAULT_COLOR}" \
"${SPELL_COLOR}${2}${DEFAULT_COLOR}" \
"${CHECK_COLOR}on${DEFAULT_COLOR}" \
"${SPELL_COLOR}${1}${DEFAULT_COLOR}"
@@ -1417,8 +1417,8 @@ function real_sub_depends() {
local sub_dependee=$1
local sub_depends=$2
- message "${SPELL_COLOR}${SPELL}" "${MESSAGE_COLOR}requests" \
- "${SPELL_COLOR}$sub_dependee" \
+ message "${SPELL_COLOR}${SPELL}${MESSAGE_COLOR} requests" \
+ "${SPELL_COLOR}$sub_dependee${DEFAULT_COLOR}" \
"${CHECK_COLOR}with ${SPELL_COLOR}$sub_depends${DEFAULT_COLOR}"
# Check if the sub-depends is already known
diff --git a/var/lib/sorcery/modules/libdispel
b/var/lib/sorcery/modules/libdispel
index 240e5f0..6204979 100755
--- a/var/lib/sorcery/modules/libdispel
+++ b/var/lib/sorcery/modules/libdispel
@@ -229,8 +229,8 @@ function reap_state_files() {
function dispel_not_possible() {
if ! spell_ok $SPELL ; then
- message "${SPELL_COLOR}${SPELL}${PROBLEM_COLOR} is not installed." \
- "${DEFAULT_COLOR}"
+ message "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}" \
+ "${PROBLEM_COLOR}is not installed${DEFAULT_COLOR}."
else
false
fi
@@ -245,8 +245,8 @@ function dispel_sustained() {
if [ "$SUSTAIN" == "on" ] &&
grep -q "^$SPELL$" $SUSTAINED
then
- message "${SPELL_COLOR}${SPELL}${PROBLEM_COLOR} is sustained." \
- "${DEFAULT_COLOR}"
+ message "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}" \
+ "${PROBLEM_COLOR}is sustained${DEFAULT_COLOR}."
else
false
fi
diff --git a/var/lib/sorcery/modules/libgpg b/var/lib/sorcery/modules/libgpg
index e02e4bc..53e7732 100755
--- a/var/lib/sorcery/modules/libgpg
+++ b/var/lib/sorcery/modules/libgpg
@@ -162,7 +162,7 @@ function verify_grimoire_tree() {
if ! list_find "$GPG_GRIMOIRE_LIST" $grimoire_name &> /dev/null; then
message "${MESSAGE_COLOR}The grimoire (tree)" \
- "${SPELL_COLOR}$grimoire_name" \
+ "${SPELL_COLOR}$grimoire_name${DEFAULT_COLOR}" \
"${MESSAGE_COLOR}is not an official grimoire and for such" \
"${PROBLEM_COLOR}there is no verification method!$DEFAULT_COLOR"
query "Continue anyway?" y
@@ -427,10 +427,10 @@ function verify_grimoire_against_manifest() {
#---------------------------------------------------------------------
function grimoire_tree_user_query() {
local grimoire_name=$1
- message "${PROBLEM_COLOR}Verification of the grimoire" \
- "tree ${DEFAULT_COLOR}${SPELL_COLOR}$grimoire_name" \
- "${DEFAULT_COLOR}${PROBLEM_COLOR}failed!"
- message "What would you like to do?${DEFAULT_COLOR}"
+ message "${PROBLEM_COLOR}Verification of the grimoire tree" \
+ "${DEFAULT_COLOR}${SPELL_COLOR}$grimoire_name${DEFAULT_COLOR}" \
+ "${PROBLEM_COLOR}failed!${DEFAULT_COLOR}"
+ message "${PROBLEM_COLOR}What would you like to do?${DEFAULT_COLOR}"
local choice
select_list choice "" "set aside" "remove" "ignore"
case "$choice" in
diff --git a/var/lib/sorcery/modules/libresurrect
b/var/lib/sorcery/modules/libresurrect
index 5549f64..7c2cf10 100755
--- a/var/lib/sorcery/modules/libresurrect
+++ b/var/lib/sorcery/modules/libresurrect
@@ -648,9 +648,8 @@ function resurrect_success() {
clear_line
activity_log "resurrect" "$SPELL" "$VERSION" "success"
- message "${RESURRECT_COLOR}Resurrected spell: ${SPELL_COLOR}${SPELL}" \
- "${DEFAULT_COLOR}version ${VERSION_COLOR}${VERSION}" \
- "${DEFAULT_COLOR}"
+ message "${RESURRECT_COLOR}Resurrected spell:
${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}" \
+ "version ${VERSION_COLOR}${VERSION}${DEFAULT_COLOR}"
}
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index 02cc574..403cd0d 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -82,9 +82,8 @@ function update_sorcery_scripts() {
echo `pwd` || return 1
# last chance to lock
- message -n "${MESSAGE_COLOR}Waiting for${DEFAULT_COLOR} ${SPELL_COLOR}all"
\
- "${DEFAULT_COLOR} ${MESSAGE_COLOR}spells to complete..." \
- "${DEFAULT_COLOR}"
+ message -n "${MESSAGE_COLOR}Waiting for${DEFAULT_COLOR}
${SPELL_COLOR}all${DEFAULT_COLOR}" \
+ "${MESSAGE_COLOR}spells to complete...${DEFAULT_COLOR}"
lock_resources "solo" "cast" # prevent other casts
excllock_resources "cast" "sorcery" # wait for other casts
message "done."
@@ -122,8 +121,8 @@ function update_sorcery_scripts() {
rm_source_dir
fi
fi
- message "${MESSAGE_COLOR}Current${SPELL_COLOR}" \
- "sorcery-$BRANCH${DEFAULT_COLOR} ${MESSAGE_COLOR}version" \
+ message "${MESSAGE_COLOR}Current" \
+ "${SPELL_COLOR}sorcery-$BRANCH${DEFAULT_COLOR}
${MESSAGE_COLOR}version" \
"${VERSION_COLOR}$SORCERY_VERSION${DEFAULT_COLOR}"
echo
sorcery_history
@@ -373,7 +372,7 @@ function spell_recover() {
debug "libsorcery" "Running spell_recover()"
- message "${MESSAGE_COLOR}Aborting dispel of ${SPELL_COLOR}${SPELL}" \
+ message "${MESSAGE_COLOR}Aborting dispel of
${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}" \
"${MESSAGE_COLOR}and recovering...${DEFAULT_COLOR}"
unlock_resources "libgrimoire" "install"
@@ -888,7 +887,7 @@ function run_details() {
if ! codex_set_current_spell_by_name $SPELL; then
local GRIMOIRES=`codex_get_all_grimoires`
message "${PROBLEM_COLOR}Unable to find spell" \
- "${SPELL_COLOR}${SPELL}${PROBLEM_COLOR}" \
+ "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}${PROBLEM_COLOR}" \
"in grimoire(s): $GRIMOIRES ${DEFAULT_COLOR}"
false
fi
diff --git a/var/lib/sorcery/modules/libunpack
b/var/lib/sorcery/modules/libunpack
index 01240aa..92963b8 100755
--- a/var/lib/sorcery/modules/libunpack
+++ b/var/lib/sorcery/modules/libunpack
@@ -283,7 +283,7 @@ function unpack_spell_required() {
local x
if ! spell_ok "$1" && ! smgl_which $2 x &> /dev/null; then
query "This spell has an option to check its integrity via spell "\
-"${SPELL_COLOR}${1}${QUERY_COLOR} with the $2 command for $3, you might
consider installing it. "\
+"${SPELL_COLOR}${1}${DEFAULT_COLOR}${QUERY_COLOR} with the $2 command for
$3, you might consider installing it. "\
"Abort?" n &&
return 1 ||
return 200
@@ -632,9 +632,9 @@ function uncompress_unpack() {
local hints="$4"
if [[ $type != cache ]]; then
- message "${MESSAGE_COLOR}Unpacking $type file ${SPELL_COLOR}${1}" \
- "${DEFAULT_COLOR}${MESSAGE_COLOR}for spell${SPELL_COLOR}" \
- "${SPELL}${DEFAULT_COLOR}${MESSAGE_COLOR}.${DEFAULT_COLOR}"
+ message "${MESSAGE_COLOR}Unpacking $type file
${SPELL_COLOR}${1}${DEFAULT_COLOR}" \
+ "${MESSAGE_COLOR}for spell" \
+
"${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}${MESSAGE_COLOR}.${DEFAULT_COLOR}"
fi
if [[ ! -f $filename ]]; then
@@ -678,8 +678,8 @@ function locate_spell_file() {
[ -f "$SOURCE_CACHE/$1" ] && echo "$SOURCE_CACHE/$1" && return 0
message "${MESSAGE_COLOR}" \
- "Problem: $1: file not found in spell hierarchy." \
- "${DEFAULT_COLOR}" > /dev/stderr
+ "Problem: $1: file not found in spell hierarchy.${DEFAULT_COLOR}"
\
+ > /dev/stderr
echo "$1"
return 1
@@ -702,9 +702,9 @@ function locate_spell_file() {
function real_unpack() {
debug "libgrimoire" "Running unpack -- $*"
- message "${MESSAGE_COLOR}Unpacking source file ${SPELL_COLOR}${1}" \
- "${DEFAULT_COLOR}${MESSAGE_COLOR}for spell${SPELL_COLOR}" \
- "${SPELL}${DEFAULT_COLOR}${MESSAGE_COLOR}.${DEFAULT_COLOR}"
+ message "${MESSAGE_COLOR}Unpacking source file
${SPELL_COLOR}${1}${DEFAULT_COLOR}" \
+ "${MESSAGE_COLOR}for spell" \
+
"${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}${MESSAGE_COLOR}.${DEFAULT_COLOR}"
FILENAME="$(guess_filename "$SOURCE_CACHE/$1")" &&
COMPRESSOR="$(guess_compressor "$FILENAME")"
@@ -725,8 +725,8 @@ function real_unpack() {
rm "$TMP_DIR/libgrimoire.uncompress.$$"
- message "${SPELL_COLOR}${SPELL}: ${QUERY_COLOR}doesn't have an" \
- "MD5 sum for the uncompressed $1."
+ message "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}:" \
+ "${QUERY_COLOR}doesn't have an MD5 sum for the uncompressed
$1."
case "$MD5SUM_DL" in
off) message "${RED}Continuing!${DEFAULT_COLOR}"; return 0
;;
@@ -739,7 +739,7 @@ function real_unpack() {
rm "$TMP_DIR/libgrimoire.uncompress.$$"
- message "${SPELL_COLOR}${SPELL}: ${QUERY_COLOR}MD5 sum was" \
+ message "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}: ${QUERY_COLOR}MD5 sum
was" \
"purposefully left out for the uncompressed $1."
message "${QUERY_COLOR}Would you like to abort so you can validate" \
"the source yourself via some alternate method?"
@@ -755,8 +755,8 @@ ask_risky|ask_ignore) query "Abort?" "n" &&
return 1 || return 0 ;;
rm "$TMP_DIR/libgrimoire.uncompress.$$"
- message "${SPELL_COLOR}${SPELL}: ${QUERY_COLOR}MD5 sum is different" \
- "for uncompressed $1."
+ message "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}:" \
+ "${QUERY_COLOR}MD5 sum is different for uncompressed $1."
case "$MD5SUM_DL" in
off) message "${RED}Continuing!${DEFAULT_COLOR}"; return 0
;;
- [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (013fcc2ed6286dc3111afb7f7eb1031dc7956676), Jaka Kranjc, 05/26/2009
Archive powered by MHonArc 2.6.24.