Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] PERFORCE change 77008 by David Michael Leo Brown Jr. for review

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Perforce Review Daemon <p4review AT smee.org>
  • To: "Andrew Stitt" <a AT t.armory.com>, "Arjan Bouter" <abouter AT gmail.com>, "Arwed von Merkatz" <v.merkatz AT gmx.net>, "SM-Commit Daemon" <sm-commit AT lists.ibiblio.org>, "David Michael Leo Brown Jr." <dmlb2000 AT gmail.com>, "David Kowis" <dkowis+smgl-p4 AT shlrm.org>, "duane_malcolm" <d.malcolm AT auckland.ac.nz>, "Eric Sandall" <eric AT sandall.us>, "Jason Flatt" <jflatt AT sourcemage.org>, "Jeremy Blosser" <jblosser AT sourcemage.org>, "Ladislav Hagara" <ladislav.hagara AT unob.cz>, "Maurizio Boriani" <baux AT member.fsf.org>, "Robin Cook" <rcook AT wyrms.net>, "Unet" <unet AT sourcemage.org>, "vladimir_marek" <vlmarek AT volny.cz>
  • Subject: [SM-Commit] PERFORCE change 77008 by David Michael Leo Brown Jr. for review
  • Date: Thu, 30 Mar 2006 08:20:01 +0100 (BST)

Change 77008 by david_brown@dmlb2000-dmlb2004 on 2006/03/30 08:19:53

changed to handle symlinks with a different function slightly
different
if the file exists in the system and it's a symlink in the stage root
we should remove the file from the system and install the symlink
if it's not a config then stage the symlink in the config stage area

not sure if this is the right approach... it's not that the existsing
file on the system should have been removed in the first place by the
package but how do we know that's what happened or not?

Affected files ...

... //sgl/sorcery/proj/proj1/var/lib/sorcery/modules/libstage#18 edit

Differences ...

==== //sgl/sorcery/proj/proj1/var/lib/sorcery/modules/libstage#18 (xtext) ====

@@ -111,6 +111,32 @@
esac
}

+function stage_install_symlink()
+{
+ local FILE=$1
+ local SAVE=$CONFIG_STAGE_DIRECTORY/$FILE.$(date +%Y%m%d%H%M%S)
+ message "${FILE_COLOR}Symlink $FILE${DEFAULT_COLOR}"
+ case $2 in
+ config)
+ if [[ -e ${INSTALL_ROOT}/$FILE ]]
+ then
+ touch ${INSTALL_ROOT}/$FILE &&
+ mkdir -p $(dirname $SAVE) &&
+ cp -dp $STAGE_DIRECTORY/TRANSL/$FILE ${INSTALL_ROOT}/$SAVE &&
+ rm $STAGE_DIRECTORY/TRANSL/$FILE
+ else
+ cp -dp $STAGE_DIRECTORY/TRANSL/$FILE ${INSTALL_ROOT}/$FILE &&
+ rm $STAGE_DIRECTORY/TRANSL/$FILE
+ fi
+ ;;
+ *)
+ rm -f ${INSTALL_ROOT}/$FILE &&
+ cp -dp $STAGE_DIRECTORY/TRANSL/$FILE ${INSTALL_ROOT}/$FILE &&
+ rm $STAGE_DIRECTORY/TRANSL/$FILE
+ ;;
+ esac
+}
+
#---------------------------------------------------------------------
## @param file
## install the file from the stage root to the system does check for
@@ -120,13 +146,12 @@
{
if [[ -h $STAGE_DIRECTORY/TRANSL/$1 ]]
then
- stage_install_file "$@"
+ stage_install_symlink "$@"
elif [[ ! -d $STAGE_DIRECTORY/TRANSL/$1 ]]
then
stage_install_file "$@"
elif [[ -d $STAGE_DIRECTORY/TRANSL/$1 ]]
then
- message "${MESSAGE_COLOR}$1${DEFAULT_COLOR}"
stage_install_directory "$@"
else
message "${PROBLEM_COLOR}Oh, God I don't know what to do..."



  • [SM-Commit] PERFORCE change 77008 by David Michael Leo Brown Jr. for review, Perforce Review Daemon, 03/30/2006

Archive powered by MHonArc 2.6.24.

Top of Page