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

Justin Boffemmyer scm at sourcemage.org
Wed Dec 31 12:18:43 EST 2008


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

 scripts/spellcaster.sh |   17 +++++++++++++++++
 1 files changed, 17 insertions(+)

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

    scripts/spellcaster.sh: create depends,packages
    
    Generate the depends and packages state files for SYSDIR sorcery so that
    it can find the "installed" spells after the install.

diff --git a/scripts/spellcaster.sh b/scripts/spellcaster.sh
index ce0a1a9..9a99a87 100755
--- a/scripts/spellcaster.sh
+++ b/scripts/spellcaster.sh
@@ -234,6 +234,9 @@ function setup_sys() {
 	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 tablet="$SYSDIR/var/state/sorcery/tablet"
+	local packages="$SYSDIR/var/state/sorcery/packages"
+	local depends="$SYSDIR/var/state/sorcery/depends"
 
 	# unpack the sys caches into SYSDIR
 	for cache in $(<"$TARGET"/sys-list)
@@ -261,6 +264,20 @@ function setup_sys() {
 	[[ -d "$syscodex" ]] || mkdir -p $syscodex &&
 	tar jxf $stable -C "$syscodex"/
 	mv "$syscodex"/${stable%.tar.bz2} "$syscodex"/stable
+
+	# generate the depends and packages info for sorcery to use
+	. "$SYSDIR"/etc/sorcery/config
+	for spell in "$tablet"/*
+	do
+		for date in "$spell"/*
+		do
+			tablet_get_version $date ver
+			tablet_get_status $date stat
+			tablet_get_depends $date dep
+			echo "${spell##*/}:${date##*/}:$stat:$ver" >> "$packages"
+			cat "$dep" >> "$depends"
+		done
+	done
 }
 
 function setup_iso() {



More information about the SM-Commit mailing list