[SM-Commit] GIT changes to devel-stage-root sorcery by David Brown (fd22f2d02a6d3f8643dfbc45fbf178de2992911d)

David Brown scm at mail.sourcemage.org
Mon Oct 23 14:00:49 EDT 2006


GIT changes to devel-stage-root sorcery by David Brown <dmlb2000 at kajit-master.(none)>:

 usr/sbin/delve                         |   27 ++++++++++++++++++++++++---
 var/lib/sorcery/modules/build_api/api2 |   12 +++---------
 var/lib/sorcery/modules/libtrack       |    2 +-
 3 files changed, 28 insertions(+), 13 deletions(-)

New commits:
commit fd22f2d02a6d3f8643dfbc45fbf178de2992911d
Author: David Brown <dmlb2000 at kajit-master.(none)>
Commit: David Brown <dmlb2000 at kajit-master.(none)>

    made delve do all the work with the chroot so had to rip out what I was doing in cast also made the check for fuse include a modprobe to make sure its there

diff --git a/usr/sbin/delve b/usr/sbin/delve
index 69794ae..c48fe62 100755
--- a/usr/sbin/delve
+++ b/usr/sbin/delve
@@ -160,14 +160,35 @@ function delve_install() {
 
   delve_is_valid_step BUILD 2 || return 1
   delve_log_helper
-  if ! [[ "$__DELVE_IN_CAST" ]]
+  if [[ "$STAGED_INSTALL" != "off" ]]
   then
+    if [[ -z "$CHROOT_CHECK" ]]
+    then
+      echo "Preparing Stage Root" &&
+      prepare_stage_root &&
+      invoke_stage_root &&
+      export CHROOT_CHECK="true"
+      CHROOT_CMD="chroot ${STAGE_DIRECTORY}/MOUNT"
+    fi
+  else
     invoke_installwatch
   fi
   (
-    run_install || return 2
+    if [[ -z "$CHROOT_CMD" ]]
+    then
+      echo "Actually Running INSTALL"
+      run_install || return 2
+    else
+      echo "Running delve again" &&
+      $CHROOT_CMD delve $SPELL INSTALL
+    fi
   ) 2> >(tee -a $C_LOG 1>&2 > $VOYEUR_STDERR) \
      > >(tee -a $C_LOG > $VOYEUR_STDOUT)
+  if [[ $CHROOT_CMD ]]
+  then
+    echo "Blowing away stage root"
+    devoke_stage_root
+  fi
 }
 
 function delve_post_build() {
@@ -337,7 +358,7 @@ function main() {
 
   echo "DEBUG: $STATES"
 
-  STAGED_INSTALL=off
+  #STAGED_INSTALL=off
 
   local last_rc=0
   for STATE in $STATES; do
diff --git a/var/lib/sorcery/modules/build_api/api2 b/var/lib/sorcery/modules/build_api/api2
index c418170..05222af 100755
--- a/var/lib/sorcery/modules/build_api/api2
+++ b/var/lib/sorcery/modules/build_api/api2
@@ -68,16 +68,11 @@ function run_build_spell() {
     (
       run_build                             &&
       run_pre_install                       &&
-      if [[ "$STAGED_INSTALL" != "off" ]]
+      if [[ $STAGED_INSTALL == off ]]
       then
-        prepare_stage_root                  &&
-        invoke_stage_root                   &&
-        CHROOT_CHECK="chroot ${STAGE_DIRECTORY}/MOUNT"
-      else
-        invoke_installwatch                 
+        invoke_installwatch
       fi                                    &&
-      message "${MESSAGE_COLOR}iwlog $IW_LOG${DEFAULT_COLOR}" &&
-      $CHROOT_CHECK delve $SPELL INSTALL    &&
+      delve $SPELL INSTALL                  &&
       delve $SPELL POST_INSTALL             || return 2
       run_stage_install                     &&
       devoke_installwatch                   &&
@@ -239,7 +234,6 @@ ##--------------------------------------
 function run_stage_install() {
   if [[ "$STAGED_INSTALL" != "off" ]]
   then
-    devoke_stage_root &&
     install_staged_spell
   fi
 }
diff --git a/var/lib/sorcery/modules/libtrack b/var/lib/sorcery/modules/libtrack
index 05a5dd9..b4e6273 100755
--- a/var/lib/sorcery/modules/libtrack
+++ b/var/lib/sorcery/modules/libtrack
@@ -121,7 +121,7 @@ function real_devoke_installwatch()  {
 
 function is_castfs_installed()
 {
-  if [[ $(installed_version castfs) || -f /usr/local/bin/castfs ]]
+  if [[ $(installed_version castfs) || -x /usr/local/bin/castfs ]] && modprobe fuse
   then
     return 0
   else



More information about the SM-Commit mailing list