summaryrefslogtreecommitdiff
path: root/emulators/suse_base
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>1999-08-24 21:15:30 +0000
committertron <tron@pkgsrc.org>1999-08-24 21:15:30 +0000
commit4cb7e4ccbb3558497787a555c4eba354d4af6037 (patch)
tree7aa8c0b7fa8a2da332d3a5d8289fd52a0c9c5022 /emulators/suse_base
parent71a7a90c4143e38aa9b21d2ae200a818d8c7ffc0 (diff)
downloadpkgsrc-4cb7e4ccbb3558497787a555c4eba354d4af6037.tar.gz
Retarget symbol links so that the Linux emulation can resolve them, too.
Diffstat (limited to 'emulators/suse_base')
-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@@