New commits:
commit bcdf0150deecbae4454fb6bedf188160921b8564
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
libsorcery, scribe: moved a newline from get_new_changes to 2/3 callers
commit cabd963d00dba71276f16948abf76763c392c46c
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
formatting, coloring and spelling fixes in install_queue_history
commit 43e2ec9a08e0ecc4ba30d7ccb327a1ac0058429f
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
libqueue: reformatted push_queue and cleaned up pop_queue
diff --git a/ChangeLog b/ChangeLog
index 0d89676..97ab8de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-21 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libqueue: reformatted push_queue and cleaned up pop_queue
+ formatting, coloring and spelling fixes in install_queue_history
+ * libsorcery, scribe: moved a newline from get_new_changes to 2/3
callers
+
2008-06-20 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libsorcery: refactored common code out of queueing functions and
made
does_spell_need_update use the cache method too (a big cast -Z
speedup)
diff --git a/usr/sbin/scribe b/usr/sbin/scribe
index 08a21ae..f5b383a 100755
--- a/usr/sbin/scribe
+++ b/usr/sbin/scribe
@@ -317,6 +317,7 @@ function scribe_add_update_worker() {
else
scribe_reindex $grimoire
message "$grim_name updated!"
+ echo
grimoire_history $grimoire
fi
diff --git a/var/lib/sorcery/modules/libqueue
b/var/lib/sorcery/modules/libqueue
index 9d4cd03..0be9a35 100644
--- a/var/lib/sorcery/modules/libqueue
+++ b/var/lib/sorcery/modules/libqueue
@@ -378,20 +378,21 @@ function list_install_queue() {
#---------------------------------------------------------------------
function install_queue_history() {
local spell
- for spell in `cat $INSTALL_QUEUE`; do
+ # we can't use read, since the loop needs a normal stdin
+ for spell in $(< $INSTALL_QUEUE); do
lock_file "$SPELL_STATUS"
- local date="`grep "^${spell}:" $SPELL_STATUS | cut -d':' -f2`"
+ local date=$(grep "^${spell}:" $SPELL_STATUS | cut -d':' -f2)
unlock_file "$SPELL_STATUS"
- local datedash="`echo "$date" | sed
's,^\(....\)\(..\)\(..\)$,\1-\2-\3,'`"
+ 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"
- if query "Would you like to ${RED}remove ${QUERY_COLOR}spell
$SPELL_COLOR$spell$QUERY_COLOR from the install queue?" n; then
+ if query "Would you like to ${RED}remove $SPELL_COLOR$spell$QUERY_COLOR
from the install queue?" n; then
local t_queue
lock_start_transaction "$INSTALL_QUEUE" t_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}"
+ message "${QUERY_COLOR}The spell $SPELL_COLOR$spell$QUERY_COLOR was
removed from $FILE_COLOR$INSTALL_QUEUE$DEFAULT_COLOR."
fi
done
}
@@ -406,33 +407,31 @@ function install_queue_history() {
## line of the queue is removed, and returned.
##
#---------------------------------------------------------------------
-function pop_queue() { (
-
- local ITEM
+function pop_queue() {
+ local item found
local exit_code=0