Skip to Content.
Sympa Menu

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

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 (479ad86a43ef3e160a4e31c99f05c2624f8f1164)
  • Date: Fri, 3 Oct 2008 07:53:50 -0500

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

ChangeLog | 5 +++++
usr/share/man/man8/scribe.8 | 7 +++++--
var/lib/sorcery/modules/libcodex | 6 +++---
var/lib/sorcery/modules/libqueue | 15 ++++++++++++---
4 files changed, 25 insertions(+), 8 deletions(-)

New commits:
commit 479ad86a43ef3e160a4e31c99f05c2624f8f1164
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

libcodex, libqueue, scribe.8: fixed #14772; grimoires without a
version index are treated the old way and the correct entry for a
spell is used on all occasions

diff --git a/ChangeLog b/ChangeLog
index 0a3534d..13bfae0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-03 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libcodex, libqueue, scribe.8: fixed #14772; grimoires without a
+ version index are treated the old way and the correct entry for a
+ spell is used on all occasions
+
2008-10-02 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* dl_svn: be verbose when updating too #14770
* install, libmisc, libsorcery, libsummon: check that SOURCE_CACHE is
a
diff --git a/usr/share/man/man8/scribe.8 b/usr/share/man/man8/scribe.8
index 6df0228..5705d1b 100644
--- a/usr/share/man/man8/scribe.8
+++ b/usr/share/man/man8/scribe.8
@@ -70,8 +70,11 @@ whenever you add/remove spells! Otherwise, strange things
will happen!
This recreates the keyword index files of all grimoires or of the specified
one.
The keyword indexes come pre-packaged with the grimoire, so this step is
optional. Its also a bit slower than regular reindexing. Run this on any
local grimoire you may have so that you can do keyword based lookups.
.SS reindex-version [<grimoire>]
-This recreates the version index files of all grimoires or of the specified
one.
-These indexes come pre-packaged with the grimoire, so this step is optional.
+This (re)creates the version index files of all grimoires or of the
specified one.
+These indexes come pre-packaged with the grimoires, so this step is optional.
+You may want to run it over your local grimoires to speed up sorcery queue.
+Do note that you have to do it after each version or patchlevel bump in that
+case or it will contain stale information.
.SS index
shows a list of grimoires and locations where you have them installed.
.SS set <grim1> <grim2>
diff --git a/var/lib/sorcery/modules/libcodex
b/var/lib/sorcery/modules/libcodex
index 988865d..db3c248 100755
--- a/var/lib/sorcery/modules/libcodex
+++ b/var/lib/sorcery/modules/libcodex
@@ -961,7 +961,7 @@ function codex_create_keyword_cache () { (
## Creates the version index, which additionally includes the other
## queuing factors - patchlevels and UPDATED.
##
-## Multiversioned spells will have no entry. Persistent
+## Multiversioned spells will a dummy entry. Persistent
## variables are ignored.
#---------------------------------------------------------------------
function codex_create_version_cache () { (
@@ -973,8 +973,8 @@ function codex_create_version_cache () { (
if [[ $(grep -c "^[[:space:]]*VERSION=" "$file") == 1 ]]; then
echo "$SPELL ${VERSION:-0} ${PATCHLEVEL:-0} ${SECURITY_PATCH:-0}
${UPDATED:-0}"
else
- # multiversioned or unusually formatted spell - ignore them
- :
+ # multiversioned or unusually formatted spell - add a dummy entry
+ echo "$SPELL multiversioned"
fi
unset SPELL VERSION PATCHLEVEL SECURITY_PATCH UPDATED
done | sort > $grimoire/$VERSION_INDEX_FILE
diff --git a/var/lib/sorcery/modules/libqueue
b/var/lib/sorcery/modules/libqueue
index 73080c8..5fd45b9 100755
--- a/var/lib/sorcery/modules/libqueue
+++ b/var/lib/sorcery/modules/libqueue
@@ -134,7 +134,7 @@ function find_security_updates() {

END {
while (getline < i) {
- if ($1 in map) {
+ if ($1 in map && ! match(map[$1],"multiversioned")) {
split(map[$1], factor);
needs_update();
} else {
@@ -193,7 +193,7 @@ function find_updates() {

END {
while (getline < i) {
- if ($1 in map) {
+ if ($1 in map && ! match(map[$1],"multiversioned")) {
split(map[$1], factor);
needs_update();
} else {
@@ -285,7 +285,16 @@ function update_install_queue_sub() {
tablet_check_version_cache $VERSION_STATUS || return 1
local grimoire
for grimoire in $(codex_get_all_grimoires); do
- cat $grimoire/$VERSION_INDEX_FILE 2>/dev/null
+ if [[ -f $grimoire/$VERSION_INDEX_FILE ]]; then
+ cat $grimoire/$VERSION_INDEX_FILE
+ else
+ # provide a dummy version index, treating all spells as
multiversioned
+ local grimoire_name=$(smgl_basename $grimoire)
+ error_message "${PROBLEM_COLOR}Grimoire $grimoire_name is missing" \
+ "the version index!$DEFAULT_COLOR"
+ error_message "You can run scribe reindex-version $grimoire_name to
add one."
+ sed -n "s|^\(\S*\) .*$|\1 multiversioned|p"
$grimoire/$SPELL_INDEX_FILE
+ fi
done |
if [[ $type == security ]]; then
find_security_updates "$tmp_queue" "$recheck_queue"



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (479ad86a43ef3e160a4e31c99f05c2624f8f1164), Jaka Kranjc, 10/03/2008

Archive powered by MHonArc 2.6.24.

Top of Page