Hm, I just realized my patch shares a bit defect with the original
one: the fakeroot script includes the name of the multiarch dir, which
makes it different for all archs and violates the multiarch principle.

So if we cannot rely on the ld.so conf because of the subdirectory, I
guess the only way out is to make a special case in the script: if
dpkg-architecture is there and knows about multiarch, derive PATHS
from this, or else do like we do today.

That is, something like (untested):

diff --git a/scripts/fakeroot.in b/scripts/fakeroot.in
index 324a9dc..262a157 100755
--- a/scripts/fakeroot.in
+++ b/scripts/fakeroot.in
@@ -35,7 +35,17 @@ FAKEROOT_BINDIR=@bindir@
 
 USEABSLIBPATH=@LDPRELOADABS@
 LIB=lib@fakeroot_transformed@@DLSUFFIX@
-PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
+
+MULTIARCH=
+if command -v dpkg-architecture >/dev/null 2>&1; then
+    MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null`
+fi
+if [ -z "$MULTIARCH" ]; then
+    
PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
+else
+    PATHS="$MULTIARCH"
+fi
+
 FAKED=${FAKEROOT_BINDIR}/@faked_transformed@
 
 FAKED_MODE="unknown-is-root"



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to