aboutsummaryrefslogtreecommitdiffstats
path: root/main/fakeroot/fakeroot-no-ldlibrarypath.patch
blob: e7b9a037d08d2ae57cc2ad229c96c25a48a3bbd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
diff -ru fakeroot-1.20.2.orig/scripts/fakeroot.in fakeroot-1.20.2/scripts/fakeroot.in
--- fakeroot-1.20.2.orig/scripts/fakeroot.in	2015-11-12 10:51:23.241681379 +0200
+++ fakeroot-1.20.2/scripts/fakeroot.in	2015-11-12 10:56:53.331985288 +0200
@@ -34,8 +34,7 @@
 FAKEROOT_BINDIR=@bindir@
 
 USEABSLIBPATH=@LDPRELOADABS@
-LIB=lib@fakeroot_transformed@@DLSUFFIX@
-PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
+LIB=@libdir@/lib@fakeroot_transformed@@DLSUFFIX@
 FAKED=${FAKEROOT_BINDIR}/@faked_transformed@
 
 FAKED_MODE="unknown-is-root"
@@ -68,7 +67,6 @@
     -l|--lib)
        shift
        LIB=`eval echo "$1"`
-       PATHS=
        ;;
     -f|--faked)
        shift
@@ -111,23 +109,11 @@
 
 # make sure the preload is available
 ABSLIB=""
-if [ -n "$PATHS" ]
-then
-    for dir in `echo $PATHS | sed 's/:/ /g'`
-    do
-	if test -r "$dir/$LIB"
-	then
-	    libfound=yes
-	    ABSLIB="$dir/$LIB"
-	fi
-    done
-else
     if test -r "$LIB"
     then
 	libfound=yes
 	ABSLIB="$LIB"
     fi
-fi
 
 if test $libfound = no
 then
@@ -148,7 +134,7 @@
 if [ "$WAITINTRAP" -eq 0 ]; then
   trap "kill -s @signal@ $PID" EXIT INT
 else
-  @MACOSX_FALSE@trap 'FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDPRELOADVAR@="$LIB" /bin/ls -l / >/dev/null 2>&1; while kill -s @signal@ $PID 2>/dev/null; do sleep 0.1; done' EXIT INT
+  @MACOSX_FALSE@trap 'FAKEROOTKEY=$FAKEROOTKEY @LDPRELOADVAR@="$LIB" /bin/ls -l / >/dev/null 2>&1; while kill -s @signal@ $PID 2>/dev/null; do sleep 0.1; done' EXIT INT
   @MACOSX_TRUE@trap 'FAKEROOTKEY=$FAKEROOTKEY @LDPRELOADVAR@="$LIB" /bin/ls -l / >/dev/null 2>&1; while kill -s @signal@ $PID 2>/dev/null; do sleep 0.1; done' EXIT INT
 fi
 
@@ -159,10 +145,6 @@
 if test $USEABSLIBPATH -ne 0 ; then
   LIB=$ABSLIB
 fi
-# Keep other library paths
-if test -n "$@LDLIBPATHVAR@"; then
-  PATHS="$PATHS:$@LDLIBPATHVAR@"
-fi
 # ...and preloaded libs
 if test -n "$@LDPRELOADVAR@"; then
   LIB="$LIB:$@LDPRELOADVAR@"
@@ -171,11 +153,11 @@
 export FAKEROOT_FD_BASE
 
 if test -z "$*"; then
-  @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh}
+  @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh}
   @MACOSX_TRUE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh}
   RESULT=$?
 else
-  @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@"
+  @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@"
   @MACOSX_TRUE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@"
   RESULT=$?
 fi