summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authortron <tron>1999-08-24 21:15:30 +0000
committertron <tron>1999-08-24 21:15:30 +0000
commit6d12e631a271c5189ef51da7e5362031dbf6aa03 (patch)
tree7aa8c0b7fa8a2da332d3a5d8289fd52a0c9c5022 /emulators
parent7963739f309f7ecb3a6adff7e03bdd70ee7f7c77 (diff)
downloadpkgsrc-6d12e631a271c5189ef51da7e5362031dbf6aa03.tar.gz
Retarget symbol links so that the Linux emulation can resolve them, too.
Diffstat (limited to 'emulators')
-rwxr-xr-xemulators/suse_base/scripts/rpm2pkg.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/emulators/suse_base/scripts/rpm2pkg.sh b/emulators/suse_base/scripts/rpm2pkg.sh
index 55aaf984c34..1ce74db2a50 100755
--- a/emulators/suse_base/scripts/rpm2pkg.sh
+++ b/emulators/suse_base/scripts/rpm2pkg.sh
@@ -33,16 +33,25 @@ grep -v ^pax:\ $LIST | @@AWK@@ '{print("@@EMULSUBDIR@@/"$1)}' |
shift `expr $# - 1`;
case $1 in
/* )
- set - @@EMULDIR@@$1
+ TARGET=`echo $1 | cut -c 2-`
+ DIR=`dirname $ENTRY`
+ while [ $DIR != @@EMULSUBDIR@@ ]
+ do
+ TARGET=../$TARGET
+ DIR=`dirname $DIR`
+ done
+ unset DIR
rm $ENTRY
- ln -s $1 $ENTRY
+ ln -s $TARGET $ENTRY
;;
+ * )
+ TARGET=$1
esac
- if cd `dirname $ENTRY` && test -f $1
+ if cd `dirname $ENTRY` && test -f $TARGET
then
echo $ENTRY
else
- echo "@exec ln -s $1 %D/$ENTRY" >>$LINKS
+ echo "@exec ln -s $TARGET %D/$ENTRY" >>$LINKS
echo "@unexec rm -f %D/$ENTRY" >>$LINKS
fi
cd @@PREFIX@@