From 7a4cefaee21346d632f400f3e37999642a4a5f7e Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Sat, 5 Oct 2019 07:48:40 +0200 Subject: [PATCH] only append to QEMU_LD_PREFIX if it's already set --- mmdebstrap | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mmdebstrap b/mmdebstrap index 0ec5755..80a98be 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -1528,7 +1528,12 @@ sub setup { } elsif ($options->{mode} eq 'fakechroot') { # The binfmt support on the outside is used, so qemu needs to know # where it has to look for shared libraries - $ENV{QEMU_LD_PREFIX} = $options->{root}; + if (defined $ENV{QEMU_LD_PREFIX} + && $ENV{QEMU_LD_PREFIX} ne "") { + $ENV{QEMU_LD_PREFIX} = "$ENV{QEMU_LD_PREFIX}:$options->{root}"; + } else { + $ENV{QEMU_LD_PREFIX} = $options->{root}; + } # Make sure that the fakeroot and fakechroot shared libraries # exist for the right architecture open my $fh, '-|', 'dpkg-architecture', '-a', $options->{nativearch}, '-qDEB_HOST_MULTIARCH' // error "failed to fork(): $!";