[SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (f5181a2fdbd7745c91c2b34805bbcaea8382c5cf)

Justin Boffemmyer scm at sourcemage.org
Sat Jan 3 22:37:06 EST 2009


GIT changes to test cauldron by Justin Boffemmyer <flux at sourcemage.org>:

 iso/usr/share/smgl.install/smgl-enchant |   39 ++++++++++++++++++++++----------
 scripts/spellcaster.sh                  |    8 ++++++
 2 files changed, 36 insertions(+), 11 deletions(-)

New commits:
commit f5181a2fdbd7745c91c2b34805bbcaea8382c5cf
Author: Justin Boffemmyer <flux at sourcemage.org>
Commit: Justin Boffemmyer <flux at sourcemage.org>

    scripts/spellcaster.sh: scribe reindex uniq tablet
    
    Add scribe info and then run scribe reindex so that SYSDIR has access to
    the spells. Ensure that we don't have duplicate entries in the tablet
    files we create.

commit 033970cd95d04b1c9ec31c524521772708850117
Author: Justin Boffemmyer <flux at sourcemage.org>
Commit: Justin Boffemmyer <flux at sourcemage.org>

    smgl.install/smgl-enchant: fix tablet rebuilding
    
    Corrected the tablet reconstruction implementation.

diff --git a/iso/usr/share/smgl.install/smgl-enchant b/iso/usr/share/smgl.install/smgl-enchant
index 0066d53..f728aa5 100755
--- a/iso/usr/share/smgl.install/smgl-enchant
+++ b/iso/usr/share/smgl.install/smgl-enchant
@@ -28,8 +28,6 @@ function die() {
 
 function generate_state() {
   local spell="$1"
-	local packages="$TARGET/var/state/sorcery/packages"
-	local depends="$TARGET/var/state/sorcery/depends"
 
   spell=${spell%-*}
   while ! grep -q $spell $TABLETS
@@ -75,13 +73,16 @@ fi
 . "$TARGET"/etc/sorcery/config &> /dev/null ||
   die "Couldn't source $TARGET/etc/sorcery/config"
 
-# generate a listing of all tablet directories if needed
-tablet="${tablet:-$TARGET/var/state/sorcery/tablet}"
-if [[ ! -f $TABLETS ]]
-then
-  echo "Gathering tablet information..."
-  find $tablet -maxdepth 1 -type d | sed 's#^.*/##' > $TABLETS
-fi
+. "$TARGET"/var/lib/sorcery/modules/libapi &> /dev/null ||
+  die "Couldn't source libapi"
+
+. "$TARGET"/var/lib/sorcery/modules/libmisc &> /dev/null ||
+  die "Couldn't source libmisc"
+
+. "$TARGET"/var/lib/sorcery/modules/libtablet &> /dev/null ||
+  die "Couldn't source libtablet"
+
+rm -f /tmp/smgl.install/enchant
 
 if [[ $# -ge 1 ]]
 then
@@ -93,8 +94,8 @@ then
     CACHE="$1"
     echo "Installing ${CACHE##*/} ..."
     tar jxf "$CACHE" -C "$TARGET"/ &&
-    generate_state "${CACHE##*/}" &&
     echo "${CACHE##*/} installed."
+    echo "${CACHE##*/}" >> /tmp/smgl.install/enchant
     shift
   done
 else
@@ -106,11 +107,27 @@ else
   do
     echo "Installing $cache ..."
     tar jxf $CACHE_DIR/$cache*.tar.bz2 -C "$TARGET"/ &&
-    generate_state $cache &&
     echo "$cache installed."
+    echo "${cache}" >> /tmp/smgl.install/enchant
   done
 fi
 
+sort -u -o /tmp/smgl.install/enchant /tmp/smgl.install/enchant
+
+# generate a listing of all tablet directories if needed
+tablet="${tablet:-$TARGET/var/state/sorcery/tablet}"
+packages="${packages:-$TARGET/var/state/sorcery/packages}"
+depends="${depends:-$TARGET/var/state/sorcery/depends}"
+echo "Gathering tablet information..."
+find $tablet -maxdepth 1 -type d | sed 's#^.*/##' > $TABLETS
+for spell in $(</tmp/smgl.install/enchant)
+do
+  spell=${spell##*/}
+  generate_state "$spell"
+done
+sort -u -o "$depends"
+sort -u -o "$packages"
+
 
 
 # vim:tabstop=2:softtabstop=2:shiftwidth=2:expandtab:ai
diff --git a/scripts/spellcaster.sh b/scripts/spellcaster.sh
index eb962ee..092552b 100755
--- a/scripts/spellcaster.sh
+++ b/scripts/spellcaster.sh
@@ -276,9 +276,13 @@ function setup_sys() {
 	local SPOOL="$TARGET/tmp"
 	local SORCERY="sorcery-stable.tar.bz2"
 	local SORCERYDIR="$TARGET/usr/src/sorcery"
+
 	local gvers=$(head -n1 "$TARGET"/var/lib/sorcery/codex/stable/VERSION)
 	local stable="stable-${gvers%-*}.tar.bz2"
 	local syscodex="$SYSDIR/var/lib/sorcery/codex"
+	local grimoire='GRIMOIRE_DIR[0]=/var/lib/sorcery/codex/stable'
+	local index="$SYSDIR/etc/sorcery/local/grimoire"
+
 	local tablet="$SYSDIR/var/state/sorcery/tablet"
 	local packages="$SYSDIR/var/state/sorcery/packages"
 	local depends="$SYSDIR/var/state/sorcery/depends"
@@ -310,6 +314,8 @@ function setup_sys() {
 	[[ -d "$syscodex" ]] || mkdir -p $syscodex &&
 	tar jxf "$SPOOL"/$stable -C "$syscodex"/ &&
 	mv "$syscodex"/${stable%.tar.bz2} "$syscodex"/stable
+	echo "$grimoire" > "$index"
+	"$MYDIR"/cauldronchr.sh -d "$SYSDIR" /usr/sbin/scribe reindex
 
 	# generate the depends and packages info for sorcery to use
 	rm -f "$depends" "$packages"
@@ -324,6 +330,8 @@ function setup_sys() {
 			echo "${spell##*/}:${date##*/}:$stat:$ver" >> "$packages"
 			cat "$dep" >> "$depends"
 		done
+		sort -u -o "$depends" "$depends"
+		sort -u -o "$packages" "$packages"
 	done
 
 	# populate /dev with static device nodes



More information about the SM-Commit mailing list