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()
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