Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to devel-stage-root sorcery by root (dbdd4e4c0f814774e228e0d6c80f50ed9d860dc8)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: root <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to devel-stage-root sorcery by root (dbdd4e4c0f814774e228e0d6c80f50ed9d860dc8)
  • Date: Fri, 17 Nov 2006 21:28:56 -0600

GIT changes to devel-stage-root sorcery by root <root@kajit-master.(none)>:

ChangeLog | 4 ++
usr/sbin/delve | 57
++++++++++++++++++++++++++-------
var/lib/sorcery/modules/build_api/api2 | 24 +++++++++++--
var/lib/sorcery/modules/libapi | 12 ++++++
var/lib/sorcery/modules/libspell | 2 +
var/lib/sorcery/modules/libstage | 2 -
var/lib/sorcery/modules/libtrack | 12 ++++++
7 files changed, 95 insertions(+), 18 deletions(-)

New commits:
commit e745f260b8d8dd858997547e801f5ebe13d699be
Author: root <root@kajit-master.(none)>
Commit: root <root@kajit-master.(none)>

Okay added install extras stage and transfer stage to delve and build
api2 also fixed delve to check proper file in each state

commit 4ece510b2c867b7c937d8b781b84276969af672e
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

add a routine to note modified config files

diff --git a/ChangeLog b/ChangeLog
index 40360f1..32cefc2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-11-17 Andrew Stitt <astitt AT sourcemage.org>
+ * libtrack, libapi: add a routine to record modified config files,
+ this is an alternative to running install_config_files
+
2006-11-14 Andrew Stitt <astitt AT sourcemage.org>
* protected: protect /etc/sysconfig/facilities to smooth over
the bumps from bug 13123.
diff --git a/usr/sbin/delve b/usr/sbin/delve
index 40ba077..cca8862 100755
--- a/usr/sbin/delve
+++ b/usr/sbin/delve
@@ -147,7 +147,7 @@ function delve_build() {

function delve_pre_install() {
debug "delve" "Running $FUNCNAME"
- delve_is_valid_step BUILD 2 || return 1
+ delve_is_valid_step PRE_INSTALL 2 || return 1
delve_log_helper
(
run_pre_install
@@ -158,7 +158,7 @@ function delve_pre_install() {
function delve_install() {
debug "delve" "Running $FUNCNAME"

- delve_is_valid_step BUILD 2 || return 1
+ delve_is_valid_step INSTALL 2 || return 1
delve_log_helper
if [[ "$STAGED_INSTALL" != "off" ]]
then
@@ -189,10 +189,43 @@ function delve_install() {
return $rc
}

+function delve_install_extras() {
+ debug "delve" "Running $FUNCNAME"
+
+ delve_is_valid_step INSTALL_EXTRAS 2 || return 1
+ delve_log_helper
+ if [[ "$STAGED_INSTALL" != "off" ]]
+ then
+ if [[ -z "$CHROOT_CHECK" ]]
+ then
+ invoke_stage_root &&
+ export CHROOT_CHECK="true"
+ CHROOT_CMD="chroot ${STAGE_DIRECTORY}/MOUNT"
+ fi
+ else
+ invoke_installwatch
+ fi
+ (
+ if [[ -z "$CHROOT_CMD" ]]
+ then
+ run_install_extras || return 2
+ else
+ $CHROOT_CMD delve $SPELL INSTALL_EXTRAS
+ fi
+ ) 2> >(tee -a $C_LOG 1>&2 > $VOYEUR_STDERR) \
+ > >(tee -a $C_LOG > $VOYEUR_STDOUT)
+ local rc=$?
+ if [[ $CHROOT_CMD ]]
+ then
+ devoke_stage_root
+ fi &&
+ return $rc
+}
+
function delve_post_build() {
debug "delve" "Running $FUNCNAME"

- delve_is_valid_step BUILD 1 || return 1
+ delve_is_valid_step POST_BUILD 1 || return 1
delve_log_helper
[ -d $SOURCE_DIRECTORY ] || {
message "Ack! there is no $SOURCE_DIRECTORY"
@@ -207,7 +240,7 @@ function delve_post_build() {

function delve_post_install() {
debug "delve" "Running $FUNCNAME"
- delve_is_valid_step BUILD 1 2 || return 1
+ delve_is_valid_step POST_INSTALL 1 2 || return 1
delve_log_helper
(
run_post_install
@@ -215,19 +248,19 @@ function delve_post_install() {
> >(tee -a $C_LOG > $VOYEUR_STDOUT)
}

-function delve_stage_install() {
+function delve_transfer() {
debug "delve" "Running $FUNCNAME"
- delve_is_valid_step BUILD 1 2 || return 1
+ delve_is_valid_step TRANSFER 2 || return 1
delve_log_helper
(
- run_stage_install
+ run_transfer
) 2> >(tee -a $C_LOG 1>&2 > $VOYEUR_STDERR) \
> >(tee -a $C_LOG > $VOYEUR_STDOUT)
}

function delve_final() {
debug "delve" "Running $FUNCNAME"
- delve_is_valid_step BUILD 2 || return 1
+ delve_is_valid_step FINAL 2 || return 1
delve_log_helper
devoke_installwatch &&
STAGED_INSTALL=off
@@ -269,7 +302,7 @@ function delve_make_continuation() {
local begin=$1
local end=$2
local API1="start PRE_BUILD config_loc BUILD POST_BUILD POST_INSTALL
TRIGGERS end"
- local API2="start PRE_BUILD config_loc BUILD PRE_INSTALL INSTALL
POST_INSTALL stage_install FINAL TRIGGERS end"
+ local API2="start PRE_BUILD config_loc BUILD PRE_INSTALL INSTALL
INSTALL_EXTRAS POST_INSTALL TRANSFER FINAL TRIGGERS end"
local THIS_API
case $BUILD_API in
1) THIS_API=$API1 ;;
@@ -321,8 +354,9 @@ function process_parameters() {
PRE_INSTALL) STATES="$STATES $param" ;;
INSTALL) STATES="$STATES $param" ;;
POST_BUILD) STATES="$STATES $param" ;;
+ INSTALL_EXTRAS) STATES="$STATES $param" ;;
POST_INSTALL) STATES="$STATES $param" ;;
- stage_install) STAGES="$STAGES $param" ;;
+ TRANSFER) STAGES="$STAGES $param" ;;
FINAL) STATES="$STATES $param" ;;
TRIGGERS) STATES="$STATES $param" ;;
success) STATES="$STATES $param" ;;
@@ -369,8 +403,9 @@ function main() {
PRE_INSTALL) delve_pre_install ;;
INSTALL) delve_install ;;
POST_BUILD) delve_post_build ;;
+ INSTALL_EXTRAS) delve_install_extras ;;
POST_INSTALL) delve_post_install ;;
- stage_install) delve_stage_install ;;
+ TRANSFER) delve_transfer ;;
FINAL) delve_final ;;
TRIGGERS) delve_triggers ;;
success) delve_spell_success ;;
diff --git a/var/lib/sorcery/modules/build_api/api2
b/var/lib/sorcery/modules/build_api/api2
index 05222af..7388468 100755
--- a/var/lib/sorcery/modules/build_api/api2
+++ b/var/lib/sorcery/modules/build_api/api2
@@ -73,8 +73,9 @@ function run_build_spell() {
invoke_installwatch
fi &&
delve $SPELL INSTALL &&
- delve $SPELL POST_INSTALL || return 2
- run_stage_install &&
+ delve $SPELL INSTALL_EXTRAS &&
+ run_post_install || return 2
+ run_transfer &&
devoke_installwatch &&
STAGED_INSTALL=off &&
run_final || return 3
@@ -206,6 +207,12 @@ function run_install() {
fi
}

+function run_install_extras() {
+
+ debug "build_api/api2" "Starting run_install_extras()"
+ run_spell_file INSTALL_EXTRAS install_extras
+}
+
#---------------------------------------------------------------------
## Checks for a POST_BUILD file in SCRIPT_DIRECTORY, and if it is
## executable, runs it. This file is run after INSTALL and before
@@ -227,14 +234,15 @@ function run_post_install() {
run_spell_file POST_INSTALL post_install
unlock_resources "libgrimoire" "install"
}
+
#--------------------------------------------------------------------
### Checks against STAGED_INSTALL and installs the staged spell
### accordingly
##--------------------------------------------------------------------
-function run_stage_install() {
+function run_transfer() {
if [[ "$STAGED_INSTALL" != "off" ]]
then
- install_staged_spell
+ run_spell_file TRANSFER transfer
fi
}

@@ -333,7 +341,7 @@ function real_default_sorcery_install()
##
## This is identical to api1's post_build
#---------------------------------------------------------------------
-function real_default_sorcery_post_install() {
+function real_default_sorcery_install_extras() {

debug "build_api/api2" "Starting real_default_sorcery_post_install"
install_xinetd
@@ -348,6 +356,12 @@ function real_default_sorcery_post_insta

}

+function real_default_sorcery_transfer() {
+
+ debug "build_api/api2" "Starting real_default_sorcery_post_install"
+ transfer_staged_spell
+}
+
#---------------------------------------------------------------------
## @License
##
diff --git a/var/lib/sorcery/modules/libapi b/var/lib/sorcery/modules/libapi
index 3392d19..b44789a 100755
--- a/var/lib/sorcery/modules/libapi
+++ b/var/lib/sorcery/modules/libapi
@@ -49,6 +49,7 @@
# list_remove (libmisc)
# message (libmisc)
# mk_source_dir (libgrimoire)
+# note_config_file (libtrack)
# on_cast (libtriggers)
# on_dispel (libtriggers)
# on_pre_cast (libtriggers)
@@ -696,6 +697,17 @@ function mk_source_dir () {

#---------------------------------------------------------------------
## @Type API
+## @See <@function
var.lib.sorcery.modules.libtrack.html,real_note_config_file> for more details.
+## @param spell file to check for modification
+##
+#---------------------------------------------------------------------
+function note_config_file() {
+ debug "libapi" "note_config_file - $*"
+ real_note_config_file "$@"
+}
+
+#---------------------------------------------------------------------
+## @Type API
## @See <@function var.lib.sorcery.modules.libtriggers.html,real_on_cast>
for more details.
## @param spell that triggers
## @param action
diff --git a/var/lib/sorcery/modules/libspell
b/var/lib/sorcery/modules/libspell
index 79ecde0..f708e92 100644
--- a/var/lib/sorcery/modules/libspell
+++ b/var/lib/sorcery/modules/libspell
@@ -36,7 +36,9 @@ BUILD:build
PRE_INSTALL:pre_install
INSTALL:install
POST_BUILD:post_build
+INSTALL_EXTRAS:install_extras
POST_INSTALL:post_install
+TRANSFER:transfer
FINAL:final

UP_TRIGGERS:up_triggers
diff --git a/var/lib/sorcery/modules/libstage
b/var/lib/sorcery/modules/libstage
index 19f6dbf..b781db1 100755
--- a/var/lib/sorcery/modules/libstage
+++ b/var/lib/sorcery/modules/libstage
@@ -10,7 +10,7 @@
## Main for installing staged spell called imediatly after devoking
## installwatch and stage root
#---------------------------------------------------------------------
-function install_staged_spell()
+function transfer_staged_spell()
{
mkdir -p "$CONFIG_STAGE_DIRECTORY/$SPELL/current"
stage_install_configs
diff --git a/var/lib/sorcery/modules/libtrack
b/var/lib/sorcery/modules/libtrack
index 368d80d..cdf1b87 100755
--- a/var/lib/sorcery/modules/libtrack
+++ b/var/lib/sorcery/modules/libtrack
@@ -58,7 +58,7 @@ function real_invoke_stage_root()
export CASTFS_LOGFILE=${CASTFS_DBGLOG}
export CASTFS_DBGLVL=${CASTFS_DEBUG_LEVEL}
local CASTFS_IGNORE_LIST=""
- local LOCAL_IGNORE_DIRS="${CCACHE_DIR}"
+ local LOCAL_IGNORE_DIRS="${CCACHE_DIR} ${DISTCC_DIR}"
# this forks and daemonizes so it will exit you simply unmount the dir to
stop the process
for dir in ${CASTFS_UNSTAGED_PATHS} ${LOCAL_IGNORE_DIRS}
do
@@ -213,6 +213,16 @@ function create_md5list() {
}

#---------------------------------------------------------------------
+## External api to note config files
+#---------------------------------------------------------------------
+function real_note_config_file() {
+ if check_if_modified "$1"; then
+ mark_file_modified "$1"
+ fi
+}
+
+
+#---------------------------------------------------------------------
## Notes that a file was previously modified so that its md5 is
## deliberatly munged
#---------------------------------------------------------------------



  • [SM-Commit] GIT changes to devel-stage-root sorcery by root (dbdd4e4c0f814774e228e0d6c80f50ed9d860dc8), root, 11/17/2006

Archive powered by MHonArc 2.6.24.

Top of Page