Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (37f0257b10d4aee4210fdffd9c6ddbe8f1257ae6)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • 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 (37f0257b10d4aee4210fdffd9c6ddbe8f1257ae6)
  • Date: Tue, 15 Jan 2008 17:05:09 -0600

GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 1 +
var/lib/sorcery/modules/libdispel | 2 +-
var/lib/sorcery/modules/libsorcery | 11 ++++++++---
3 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 37f0257b10d4aee4210fdffd9c6ddbe8f1257ae6
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

added locking to install_queue_history (didn't lock the first queue read
on
purpose, as this function could hold the lock for indefinite amounts of
time)

ups2, forgot to make the transaction variable local

commit 9037fb2d79d94bd61543f4e1a2cf8d77a5b0d58e
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

ups, forgot to make the transaction variable local

diff --git a/ChangeLog b/ChangeLog
index 177ee72..18f2789 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
* build_api/common: accompanying changes to avoid double locking
* libressurect: accompanying changes to avoid double locking
* libsorcery: added a missin $ in pop_queue and locking to push_queue
+ and install_queue_history
* libdispel: added a transaction to reap_depends
* lib*: removed trailing whitespace

diff --git a/var/lib/sorcery/modules/libdispel
b/var/lib/sorcery/modules/libdispel
index 704c092..0a9c1e5 100755
--- a/var/lib/sorcery/modules/libdispel
+++ b/var/lib/sorcery/modules/libdispel
@@ -81,7 +81,7 @@ function reap_depends() {
# save the old depends data as abandoned stuff so its seen later on
# recasts as the default
mkdir -p $ABANDONED_DEPENDS
- t_file=$(lock_start_transaction "$ABANDONED_DEPENDS/$SPELL")
+ local t_file=$(lock_start_transaction "$ABANDONED_DEPENDS/$SPELL")
search_depends_status $DEPENDS_STATUS $SPELL > $t_file
lock_commit_transaction "$ABANDONED_DEPENDS/$SPELL"

diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index 86eece2..c4423f1 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -709,7 +709,7 @@ function pop_install_queue() {
function push_queue() {

pop_queue "$1" "$2"
- t_file=$(lock_start_transaction "$1")
+ local t_file=$(lock_start_transaction "$1")
echo "$2" >> "$t_file";
lock_commit_transaction "$1"

@@ -1020,14 +1020,19 @@ function build_install_queue() {
function install_queue_history() {
local spell
for spell in `cat $INSTALL_QUEUE`; do
+ lock_file "$SPELL_STATUS"
local date="`grep "^${spell}:" $SPELL_STATUS | cut -d':' -f2`"
+ unlock_file "$SPELL_STATUS"
local datedash="`echo "$date" | sed
's,^\(....\)\(..\)\(..\)$,\1-\2-\3,'`"

get_new_changes "Viewing history since last update ($datedash) for spell
-- ${spell} -- :" "$date" "$(codex_find_spell_by_name $spell)/HISTORY"

- query "Would you like to ${RED} remove ${QUERY_COLOR} spell
${SPELL_COLOR} $spell ${QUERY_COLOR} from the install queue?" n &&
- sedit "s/^$spell$//" $INSTALL_QUEUE &&
+ if query "Would you like to ${RED}remove ${QUERY_COLOR}spell
$SPELL_COLOR$spell$QUERY_COLOR from the install queue?" n; then
+ local t_queue=$(lock_start_transaction "$INSTALL_QUEUE")
+ sedit "s/^$spell$//" "$t_queue"
+ lock_commit_transaction "$INSTALL_QUEUE"
echo -e "${QUERY_COLOR} The spell ${SPELL_COLOR} $spell ${QUERY_COLOR}
removed from $INSTALL_QUEUE.${DEFAULT_COLOR}"
+ fi
done
}




  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (37f0257b10d4aee4210fdffd9c6ddbe8f1257ae6), Jaka Kranjc, 01/15/2008

Archive powered by MHonArc 2.6.24.

Top of Page