sm-grimoire AT lists.ibiblio.org
Subject: Discussion of Spells and Grimoire items
List archive
- From: "Chris Brien" <christopher_brien AT hotmail.com>
- To: afrayedknot AT thefrayedknot.armory.com, sm-grimoire AT lists.ibiblio.org
- Cc: dufflebunk AT dufflebunk.homeip.net
- Subject: Re: [SM-Grimoire]Glibc casting
- Date: Sun, 17 Nov 2002 16:26:34 +0000
This is precisely what the save_libraries function in libsorcery is supposed to do. It's run every cast during prepare_install, before the old version is dispelled. It's intended to prevent the errors that you're getting. I don't think its quite working, though... If you could give more information to help figure out why its going wrong?
Chris
#---------------------------------------------------------------------
##=item 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.
##
#---------------------------------------------------------------------
save_libraries() {
if [ -z "$SOURCE_DIRECTORY" ]
then return
fi
debug "libsorcery" "Running save_libraries()"
OLD_LIBS=$SOURCE_DIRECTORY/old.libraries
mkdir -p $OLD_LIBS
SAVED=$OLD_LIBS/$SPELL.saved.libraries
lock_file $SAVED
rm -rf $SAVED
OLD_VERSION=`installed_version $SPELL`
OLD_LOG=$INSTALL_LOGS/$SPELL-$OLD_VERSION
grep "^/lib/\|^/usr/lib" $OLD_LOG |
while read LINE; do
if [ -f $LINE ] &&
file -bL $LINE |
grep -q "shared object"
then
if [ -h $LINE ]; then
DEST=$( basename $( ls -la "$LINE" |
cut -d '>' -f2 |
cut -c 2-
)
)
ln -sf $DEST $OLD_LIBS/`basename $LINE`
else
cp $LINE $OLD_LIBS
fi
echo $OLD_LIBS/`basename $LINE` >> $SAVED
fi
done
ldconfig $OLD_LIBS
unlock_file $SAVED
if [ -z "$LD_LIBRARY_PATH" ]
then export LD_LIBRARY_PATH="$OLD_LIBS"
else export LD_LIBRARY_PATH="$OLD_LIBS:LD_LIBRARY_PATH"
fi
if [ "$SPELL" == "glibc" ] ||
[ "$SPELL" == "glibc-custom" ]; then
ln -sf $OLD_LIBS/ld-$OLD_VERSION.so /lib/ld-linux.so.2
fi
}
#---------------------------------------------------------------------
##=item release_saved_libraries
##
## Runs default ldconfig to stop using the saved libraries
##
#---------------------------------------------------------------------
release_saved_libraries() {
ldconfig
}
From: Andrew <afrayedknot AT thefrayedknot.armory.com>
On Sun, Nov 17, 2002 at 02:00:27PM +0800, Craig Dyke wrote:
> Doh ... i used cp -r /lib /tmp
> And then changed conf file
>
> Craig
i think then you'd want to add /lib/lib to ld.so.conf in that case,
but your probably figured that out
alternatively you could comment out the prepare_install from BUILD
..which reminds me of...
So this guy goes to the doctor complaining of pains in his knee. The
doctor asks him whats going on, the patient says "It hurts when I do this"
and touches his knee. The doctor says "Well then just dont do that!"
its crude but works.
perhaps the following changes should be made to the BUILD spell from now on:
change:
make
prepare_install
make install
to:
make
mkdir /tmp/lib
cp -vp /lib/* /tmp/lib
echo /tmp/lib} >> /etc/ld.so.conf
ldconfig 2>/dev/null
prepare_install
make install
grep -v "/tmp/lib" /etc/ld.so.conf >/tmp/ld.co.conf
cp /tmp/ld.so.conf /etc
ldconfig 2>/dev/null
rm -rf /tmp/lib
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus
-
Re: [SM-Grimoire]Glibc casting
, (continued)
- Re: [SM-Grimoire]Glibc casting, Eric Sandall, 11/19/2002
- Re: [SM-Grimoire]Glibc casting, Robin Cook, 11/23/2002
- Re: [SM-Grimoire]Glibc casting, Julian v. Bock, 11/23/2002
- Re: [SM-Grimoire]Glibc casting, Adam Clark, 11/18/2002
- Re: [SM-Grimoire]Glibc casting, Jeremy Kolb, 11/18/2002
- Re: [SM-Discuss] Re: [SM-Grimoire]Glibc casting, Adam Clark, 11/19/2002
-
Message not available
-
Re: [SM-Discuss] Re: [SM-Grimoire]Glibc casting,
Eric Schabell, 11/19/2002
-
Re: [SM-Discuss] Re: [SM-Grimoire]Glibc casting,
Andrew, 11/19/2002
- Re: [SM-Discuss] Re: [SM-Grimoire]Glibc casting, Bearcat M. Sandor, 11/19/2002
-
Re: [SM-Discuss] Re: [SM-Grimoire]Glibc casting,
Andrew, 11/19/2002
-
Re: [SM-Discuss] Re: [SM-Grimoire]Glibc casting,
Eric Schabell, 11/19/2002
-
Re: [SM-Grimoire]Glibc casting,
Dufflebunk, 11/17/2002
-
Re: [SM-Grimoire]Glibc casting,
Andrew, 11/17/2002
-
Re: [SM-Grimoire]Glibc casting,
Andrew, 11/17/2002
-
Re: [SM-Grimoire]Glibc casting,
Dufflebunk, 11/17/2002
- Re: [SM-Grimoire]Glibc casting, Eric Schabell, 11/17/2002
-
Re: [SM-Grimoire]Glibc casting,
Dufflebunk, 11/17/2002
-
Re: [SM-Grimoire]Glibc casting,
Andrew, 11/17/2002
-
Re: [SM-Grimoire]Glibc casting,
Andrew, 11/17/2002
-
Re: [SM-Grimoire]Glibc casting,
Andrew, 11/17/2002
- Re: [SM-Grimoire]Glibc casting, Andrew, 11/17/2002
- Re: [SM-Grimoire]Glibc casting, Julian v. Bock, 11/18/2002
Archive powered by MHonArc 2.6.24.