Skip to Content.
Sympa Menu

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

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 (e2d740dd0d216b731cfcfa8cf6fa8cb1e3326071)
  • Date: Sun, 18 Jun 2006 18:12:39 -0500

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

var/lib/sorcery/modules/build_api/common | 8 +++-
var/lib/sorcery/modules/libsorcery | 52
+++++++++++++++++++++++++++++++
var/lib/sorcery/modules/libstage | 2 -
3 files changed, 59 insertions(+), 3 deletions(-)

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

didn't add the translation directory to the path for setting stage
directory paths

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

added save_binaries function and the dirty hack to make it work

diff --git a/var/lib/sorcery/modules/build_api/common
b/var/lib/sorcery/modules/build_api/common
index 65fea44..f220359 100755
--- a/var/lib/sorcery/modules/build_api/common
+++ b/var/lib/sorcery/modules/build_api/common
@@ -111,7 +111,7 @@ ## Locks "libgrimoire" "install" before
## If the spell is not installed (or held) the spell is not dispelled.
##
#---------------------------------------------------------------------
-function real_prepare_install() { (
+function real_prepare_install() { (

debug "libgrimoire" "Running prepare_install() on $SPELL"

@@ -126,10 +126,14 @@ function real_prepare_install() { (

trap "spell_recover" SIGINT
save_libraries
+ save_binaries
dispel --notriggers --nosustain $SPELL

fi
-) }
+)
+ # TODO this is a dirty hack we need to remove it
+ export PATH="$SOURCE_DIRECTORY/old.binaries:$PATH"
+}

#---------------------------------------------------------------------
##
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index 8340863..c90e7ac 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -292,6 +292,58 @@ function save_libraries() {

}

+#---------------------------------------------------------------------
+##
+## Saves the current libraries associated with the spell, from /lib
+## and /usr/lib into $SOURCE_DIRECTORY/old.libraries/
+## Also runs ldconfig with the saved libraries.
+##
+#---------------------------------------------------------------------
+function save_binaries() {
+
+ if [ -z "$SOURCE_DIRECTORY" ]
+ then return
+ fi
+
+ debug "libsorcery" "Running save_binaries()"
+
+ OLD_BINS=$SOURCE_DIRECTORY/old.binaries
+ mkdir -p $OLD_BINS
+
+ SAVED=$OLD_BINS/$SPELL.saved.binaries
+ lock_file $SAVED
+ rm -rf $SAVED
+
+ OLD_VERSION=`installed_version $SPELL`
+ OLD_LOG=$INSTALL_LOGS/$SPELL-$OLD_VERSION
+
+ grep "^/bin/\|^/sbin/\|^/usr/bin/\|^/usr/sbin/" $OLD_LOG |
+ while read LINE; do
+
+ if [ -f $LINE ] &&
+ file -bL $LINE |
+ grep -q "executable"
+ then
+ if [ -h $LINE ]; then
+ DEST=$( basename $( readlink "$LINE" ) )
+ if [ ! -f $OLD_BINS/`basename $LINE` ] ; then
+ ln -sf $DEST $OLD_BINS/`basename $LINE`
+ fi
+ else
+ cp $LINE $OLD_BINS
+ fi
+ echo $OLD_BINS/`basename $LINE` >> $SAVED
+ fi
+
+
+ done
+
+ unlock_file $SAVED
+
+ export PATH=$( envar_prepend_path "$OLD_BINS" "$PATH" )
+
+}
+

#---------------------------------------------------------------------
##
diff --git a/var/lib/sorcery/modules/libstage
b/var/lib/sorcery/modules/libstage
index 15971c2..3c3bbeb 100755
--- a/var/lib/sorcery/modules/libstage
+++ b/var/lib/sorcery/modules/libstage
@@ -136,7 +136,7 @@ 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 )
+ export PATH=$( envar_prepend_path "$STAGE_DIRECTORY/TRANSL/$bindir"
"$PATH" )
done
for libdir in /lib /usr/lib
do



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

Archive powered by MHonArc 2.6.24.

Top of Page