sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master sorcery by Jaka Kranjc (86bb610f44fc5d65705a946dd3439067e0fe61f4)
- 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 (86bb610f44fc5d65705a946dd3439067e0fe61f4)
- Date: Fri, 18 Jul 2008 09:41:44 -0500
GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:
ChangeLog | 2 ++
usr/sbin/sorcery | 4 ++--
var/lib/sorcery/modules/libqueue | 6 +++---
3 files changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 86bb610f44fc5d65705a946dd3439067e0fe61f4
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
sorcery: properly check for empty files in *_execute()
commit 2a96459c10cc64c20686505cc310872fc3bdb404
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
libqueue: fixed pop_queue to not create the queue if it doesn't exist
diff --git a/ChangeLog b/ChangeLog
index 0d07250..23184a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@
* dispel, libdispel, common, cleanse, libcast, libtriggers: fixed bug
#14575 - manually dispelling removes the spell from the install
queue
most internal calls pass a flag to disable that behaviour
+ * libqueue: fixed pop_queue to not create the queue if it doesn't
exist
+ * sorcery: properly check for empty files in *_execute()
2008-07-07 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libcast: removed extraneus spaces in acquire_cast_lock messages
diff --git a/usr/sbin/sorcery b/usr/sbin/sorcery
index b35b718..b248eab 100755
--- a/usr/sbin/sorcery
+++ b/usr/sbin/sorcery
@@ -1682,7 +1682,7 @@ background_execute() {
eval "$DIALOG --msgbox \"Processing queues in the background.\" 0 0"
- [ -f $REMOVE_QUEUE ] &&
+ [[ -s $REMOVE_QUEUE ]] &&
dispel `cat $REMOVE_QUEUE` 1>/dev/null 2>&1
rm -f $REMOVE_QUEUE
@@ -1700,7 +1700,7 @@ background_execute() {
foreground_execute() {
- [ -f $REMOVE_QUEUE ] &&
+ [[ -s $REMOVE_QUEUE ]] &&
dispel `cat $REMOVE_QUEUE`
rm -f $REMOVE_QUEUE
diff --git a/var/lib/sorcery/modules/libqueue
b/var/lib/sorcery/modules/libqueue
index 27dcea3..266ac46 100755
--- a/var/lib/sorcery/modules/libqueue
+++ b/var/lib/sorcery/modules/libqueue
@@ -410,11 +410,11 @@ function pop_queue() {
local item found
local exit_code=0
+ [[ -f $1 ]] || return 1
+
esc_str "$2" item
lock_start_transaction "$1" tQUEUE_FILE
- if ! [[ -f $1 ]]; then
- exit_code=1
- elif [[ -n $item ]]; then
+ if [[ -n $item ]]; then
grep -v "^$item\$" $1 > $tQUEUE_FILE
else
found=$(sed -n 1p $1)
- [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (86bb610f44fc5d65705a946dd3439067e0fe61f4), Jaka Kranjc, 07/18/2008
Archive powered by MHonArc 2.6.24.