sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (bf8a8d1d83722e33fd26fd057511524bb71de12d)
- From: Justin Boffemmyer <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (bf8a8d1d83722e33fd26fd057511524bb71de12d)
- Date: Fri, 28 Nov 2008 20:15:30 -0600
GIT changes to master cauldron by Justin Boffemmyer <flux AT sourcemage.org>:
libcauldron | 43 ++++++++++++++++++++++++++++++++++++-------
1 files changed, 36 insertions(+), 7 deletions(-)
New commits:
commit bf8a8d1d83722e33fd26fd057511524bb71de12d
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>
libcauldron: better aggressive cache building
Improved aggressive cache generation code. Still untested though.
commit 418728ef338eaaa4bd38a62e53afd01169c90bf2
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>
libcauldron: aggressive cache building
Finally wrote some code to build cache files aggressively. However, I
haven't tested it yet, so it isn't guaranteed to work.
commit 0ceb8e7a428e4c5a313cf39b85043e7843612967
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>
libcauldron: optional target for chroots
The chroot init and done functions can now take optional target
directories as their first arguments. If not argument is specified, then
the target directory defaults to $CAULDRON_BUILD.
diff --git a/libcauldron b/libcauldron
index 85b1ee3..632ddc3 100755
--- a/libcauldron
+++ b/libcauldron
@@ -34,13 +34,15 @@
##
#-------------------------------------------------------------------------------
function cauldron_chroot_init() {
+ local TARGET="${1:-$CAULDRON_BUILD}"
+
if [[ "$CAULDRON_CHROOTINIT" -ne 1 ]]
then
- mount --bind ${HOSTPATH}/dev ${CAULDRON_BUILD}/dev
- mount --bind ${HOSTPATH}/dev/pts ${CAULDRON_BUILD}/dev/pts
- mount --bind ${HOSTPATH}/proc ${CAULDRON_BUILD}/proc
+ mount --bind ${HOSTPATH}/dev ${TARGET}/dev
+ mount --bind ${HOSTPATH}/dev/pts ${TARGET}/dev/pts
+ mount --bind ${HOSTPATH}/proc ${TARGET}/proc
export CAULDRON_CHROOTINIT=1
- export CAULDRON_CHROOT="chroot \"$CAULDRON_BUILD\""
+ export CAULDRON_CHROOT="chroot \"$TARGET\""
fi
}
@@ -50,11 +52,13 @@ function cauldron_chroot_init() {
##
#-------------------------------------------------------------------------------
function cauldron_chroot_done() {
+ local TARGET="${1:-$CAULDRON_BUILD}"
+
if [[ "$CAULDRON_CHROOTINIT" -eq 1 ]]
then
- umount ${CAULDRON_BUILD}/proc
- umount ${CAULDRON_BUILD}/dev/pts
- umount ${CAULDRON_BUILD}/dev
+ umount ${TARGET}/proc
+ umount ${TARGET}/dev/pts
+ umount ${TARGET}/dev
unset CAULDRON_CHROOTINIT
unset CAULDRON_CHROOT
fi
@@ -203,6 +207,31 @@ function cauldron_build_cache_file() {
# generate a cache file, and if not then either set sorcery to do so or
# build the cache file afterwards by being recursive? This should be
done
# in a build chroot so that the user's host filesystem is not polluted.
+ local AGGR_BUILD="$CAULDRON_BUILD/tmp/cauldron_aggressive_cache"
+ if [[ -e "$HOSTPATH/var/log/sorcery/install/${SPELL}-${VERSION}" ]]
+ then
+ rm -fr "$AGGR_BUILD"
+ mkdir -p "$AGGR_BUILD"
+ for file in "$HOSTPATH/var/log/sorcery/install/${SPELL}-${VERSION}"
+ do
+ cp -a --parents "$file" "$AGGR_BUILD"/
+ done
+ tar jcf "${SPELL}-${VERSION}.tar.bz2" \
+ --transform "s#$AGGR_BUILD/##" $AGGR_BUILD/*
+ [[ $? -eq 0 ]] && rm -fr "$AGGR_BUILD"
+ else
+ if [[ -e "$CAULDRON_BUILD/etc/sorcery/local/config" ]]
+ then
+ local CONFIG="$CAULDRON_BUILD/etc/sorcery/local/config"
+ local ARCHIVE=$(grep "ARCHIVE=" "$CONFIG" | cut -d= -f2)
+ [[ $ARCHIVE != "on" ]] &&
+ sed -i 's/ARCHIVE=.*/ARCHIVE="on"/' "$CONFIG"
+ fi
+ cauldron_chroot_init
+ "$CAULDRON_CHROOT" $CAULDRON_CAST $SPELL
+ "$CAULDRON_CHROOT" $CAULDRON_DISPEL $SPELL
+ cauldron_chroot_done
+ fi
fi
fi
}
- [SM-Commit] GIT changes to master cauldron by Justin Boffemmyer (bf8a8d1d83722e33fd26fd057511524bb71de12d), Justin Boffemmyer, 11/28/2008
Archive powered by MHonArc 2.6.24.