Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to devel-stage-root sorcery by David Brown (4d5e8fb4503f16d4f54c676c702bcfdfea45dcd7)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: David Brown <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to devel-stage-root sorcery by David Brown (4d5e8fb4503f16d4f54c676c702bcfdfea45dcd7)
  • Date: Sun, 11 Jun 2006 01:24:35 -0500

GIT changes to devel-stage-root sorcery by David Brown <dmlb2000 AT gmail.com>:

var/lib/sorcery/modules/build_api/api2 | 6 ++++--
var/lib/sorcery/modules/libgcc2 | 25 ++++---------------------
var/lib/sorcery/modules/libmisc | 17 +++++++++++++++++
var/lib/sorcery/modules/libstage | 13 +++++++++++++
4 files changed, 38 insertions(+), 23 deletions(-)

New commits:
commit 4d5e8fb4503f16d4f54c676c702bcfdfea45dcd7
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>

updated adding the set_stage_root_paths to the states that need it

commit b756d41d9b184252ded4719c042bf0218caa4a61
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>

updated run_install to prepend the stage directory bin and lib files to
LD_LIBRARY_PATH so things will still function

commit a88b555537f831aa85566a4516b90ac52530ecea
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>

moved gcc2_prepend_path to libmisc and renamed to envar_prepend_path

diff --git a/var/lib/sorcery/modules/build_api/api2
b/var/lib/sorcery/modules/build_api/api2
index 51dc11b..6ac63a4 100755
--- a/var/lib/sorcery/modules/build_api/api2
+++ b/var/lib/sorcery/modules/build_api/api2
@@ -210,7 +210,7 @@ ## stage root properly
#---------------------------------------------------------------------
function run_install() {
debug "build_api/api2" "Starting run_install()"
-
+ set_stage_root_paths
if [ -f $S_PWD ] ; then
cd "`cat $S_PWD`"
elif [ -d $SOURCE_DIRECTORY ] ; then
@@ -249,6 +249,7 @@ ## stage root properly
#---------------------------------------------------------------------
function run_post_install() {
debug "build_api/api2" "Starting run_post_install()"
+ set_stage_root_paths
persistent_load &&
if [[ $STAGED_INSTALL != off ]]
then
@@ -270,9 +271,10 @@ #---------------------------------------
### Checks against STAGED_INSTALL and installs the staged spell
### accordingly
##--------------------------------------------------------------------
-function run_stage_install() {
+function run_stage_install() {
if [[ "$STAGED_INSTALL" != "off" ]]
then
+ set_stage_root_paths
devoke_stage_root &&
install_staged_spell
fi
diff --git a/var/lib/sorcery/modules/libgcc2 b/var/lib/sorcery/modules/libgcc2
index d669eed..599911b 100755
--- a/var/lib/sorcery/modules/libgcc2
+++ b/var/lib/sorcery/modules/libgcc2
@@ -49,23 +49,6 @@ function use_gcc2() {

}

-
-#---------------------------------------------------------------------
-## @param new path to add
-## @param old path
-## @Stdout new path
-## Echos the old path with new path prepended, separated with a ':'
-#---------------------------------------------------------------------
-function gcc2_prepend_path() {
-
- if test -z $2
- then echo $1
- else echo $1:$2
- fi
-
-}
-
-
#---------------------------------------------------------------------
## @param path
##
@@ -75,10 +58,10 @@ ##
#---------------------------------------------------------------------
function gcc2_add_paths() {

- export PATH=$( gcc2_prepend_path $1/bin $PATH )
- export LD_LIBRARY_PATH=$( gcc2_prepend_path $1/lib $LD_LIBRARY_PATH )
- export LD_RUN_PATH=$( gcc2_prepend_path $1/lib $LD_RUN_PATH )
- export INFOPATH=$( gcc2_prepend_path $1/info $INFOPATH )
+ export PATH=$( envar_prepend_path $1/bin $PATH )
+ export LD_LIBRARY_PATH=$( envar_prepend_path $1/lib $LD_LIBRARY_PATH )
+ export LD_RUN_PATH=$( envar_prepend_path $1/lib $LD_RUN_PATH )
+ export INFOPATH=$( envar_prepend_path $1/info $INFOPATH )
export CPPFLAGS="-I $1/include $CPPFLAGS"

}
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 1b06c4c..b11e519 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1448,6 +1448,23 @@ function smgl_basename() {
fi
}

+#--------------------------------------------------------------------
+## @param new path to add
+## @param old path
+## @Stdout new path
+##
+## TODO: remove grimoire functions libgcc gcc_prepend_path and use
+## this one
+#--------------------------------------------------------------------
+function envar_prepend_path()
+{
+ if test -z $2
+ then
+ echo $1
+ else
+ echo $1:$2
+ fi
+}


# Standard debug line:
diff --git a/var/lib/sorcery/modules/libstage
b/var/lib/sorcery/modules/libstage
index 4a2f313..d861980 100755
--- a/var/lib/sorcery/modules/libstage
+++ b/var/lib/sorcery/modules/libstage
@@ -138,6 +138,19 @@ function stage_install_symlink()
esac
}

+function set_stage_root_paths()
+{
+ local bindir libdir
+ for bindir in /bin /sbin /usr/bin /usr/sbin
+ do
+ export PATH=$( envar_prepend_path $STAGE_DIRECTORY/$bindir $PATH )
+ done
+ for libdir in /lib /usr/lib
+ do
+ export LD_LIBRARY_PATH=$( envar_prepend_path $STAGE_DIRECTORY/$libdir
$LD_LIBRARY_PATH )
+ done
+}
+
#---------------------------------------------------------------------
## @param file
## install the file from the stage root to the system does check for



  • [SM-Commit] GIT changes to devel-stage-root sorcery by David Brown (4d5e8fb4503f16d4f54c676c702bcfdfea45dcd7), David Brown, 06/11/2006

Archive powered by MHonArc 2.6.24.

Top of Page