Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (634a568284e65cc1c9225f767cc37573f0b231a8)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Justin Boffemmyer <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (634a568284e65cc1c9225f767cc37573f0b231a8)
  • Date: Sat, 30 Jan 2010 16:39:56 -0600

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

scripts/spellcaster.sh | 52
++++++++++++++++++++++++++++++++-----------------
1 files changed, 34 insertions(+), 18 deletions(-)

New commits:
commit 634a568284e65cc1c9225f767cc37573f0b231a8
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

scripts/spellcaster.sh: skip baseroot kernel check

When using spellcaster.sh to generate a new basesystem chroot, skip the
kernel checks and don't add any scripting for casting non-system spells
(i.e., we only want rspells in the chroot).

This work has not yet been tested, but should work. This commit can be
reverted pending testing that shows it doesn't do what it's supposed to.

diff --git a/scripts/spellcaster.sh b/scripts/spellcaster.sh
index 7a43d4e..b235584 100755
--- a/scripts/spellcaster.sh
+++ b/scripts/spellcaster.sh
@@ -112,22 +112,24 @@ function sanity_check() {
rm -fr "$TARGET"/etc/*
"$MYDIR"/add-sauce.sh -o -s "$TARGET"

- # make sure that either the linux spell is being used or that
the
- # kernel sources are available for building
- if ! grep -q '^linux$' "$CAULDRONDIR/rspells.$TYPE"
- then
- if [[ -d "$TARGET"/usr/src/linux ]]
+ if [[ -z $CHROOT ]]
+ # make sure that either the linux spell is being used
or that the
+ # kernel sources are available for building
+ if ! grep -q '^linux$' "$CAULDRONDIR/rspells.$TYPE"
then
- if [[ ! -s "$TARGET"/usr/src/linux ]]
+ if [[ -d "$TARGET"/usr/src/linux ]]
then
- echo "Couldn't find "$TARGET" kernel
config!"
+ if [[ ! -s "$TARGET"/usr/src/linux ]]
+ then
+ echo "Couldn't find "$TARGET"
kernel config!"
+ exit 2
+ fi
+ else
+ echo "Cannot find the $TARGET kernel!"
+ echo "Either place the kernel sources
and kernel config in $TARGET"
+ echo "or add the linux spell to the
list of rspells."
exit 2
fi
- else
- echo "Cannot find the $TARGET kernel!"
- echo "Either place the kernel sources and
kernel config in $TARGET"
- echo "or add the linux spell to the list of
rspells."
- exit 2
fi
fi

@@ -223,14 +225,20 @@ function prepare_target() {
rm -f $logfile
done

- # If using the linux spell copy the kernel config to TARGET sorcery
- grep -q '^linux$' "$CAULDRONDIR/$rspells" "$CAULDRONDIR/$ospells" &&
- cp "$CAULDRONDIR/config-2.6" "$TARGET/etc/sorcery/local/kernel.config"
+ if [[ -z $CHROOT ]]
+ then
+ # If using the linux spell copy the kernel config to TARGET
sorcery
+ grep -q '^linux$' "$CAULDRONDIR/$rspells"
"$CAULDRONDIR/$ospells" &&
+ cp "$CAULDRONDIR/config-2.6"
"$TARGET/etc/sorcery/local/kernel.config"
+ fi

# Copy the list of spells needed for casting into the TARGET if
casting
cp "$CAULDRONDIR/rspells.$TYPE" "$TARGET"/rspells
- cp "$CAULDRONDIR/ispells.$TYPE" "$TARGET"/ispells
- cp "$CAULDRONDIR/ospells.$TYPE" "$TARGET"/ospells
+ if [[ -z $CHROOT ]]
+ then
+ cp "$CAULDRONDIR/ispells.$TYPE" "$TARGET"/ispells
+ cp "$CAULDRONDIR/ospells.$TYPE" "$TARGET"/ospells
+ fi

# Copy any spell-specific required options into the TARGET
[[ -d "$TARGET"/etc/sorcery/local/depends/ ]] ||
@@ -288,6 +296,12 @@ function prepare_target() {
gaze installed $spell &> /dev/null &&
echo $spell-$(gaze -q installed $spell)
done > /sys-list || exit 42
+SPELLS
+ if [[ -z $CHROOT ]]
+ then
+ # add iso and optional spells to casting script inside TARGET
+ cat >> "$TARGET"/build_spells.sh <<-'SPELLS'
+

# make a list of the caches to unpack for iso
for spell in $(</ispells)
@@ -302,8 +316,10 @@ function prepare_target() {
gaze installed $spell &> /dev/null &&
echo $spell-$(gaze -q installed $spell)
done > /opt-list || exit 42
- fi
SPELLS
+ fi
+ # close off the basesystem casting script
+ echo "fi" >> "$TARGET"/build_spells.sh

chmod a+x "$TARGET"/build_spells.sh
# export the QUIET variable so subshells (like build_spells) can make



  • [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (634a568284e65cc1c9225f767cc37573f0b231a8), Justin Boffemmyer, 01/30/2010

Archive powered by MHonArc 2.6.24.

Top of Page