export QEMU_LD_PREFIX in chrootless mode

This commit is contained in:
Johannes 'josch' Schauer 2019-10-05 07:48:16 +02:00
parent 3d8b072e3f
commit b3536b98d0
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -1403,6 +1403,16 @@ sub setup {
'-oDPkg::Options::=--force-script-chrootless',
'-oDPkg::Options::=--root=' . $options->{root},
'-oDPkg::Options::=--log=' . "$options->{root}/var/log/dpkg.log");
if (defined $options->{qemu}) {
# The binfmt support on the outside is used, so qemu needs to know
# where it has to look for shared libraries
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};
}
}
if ($options->{variant} eq 'extract') {
# nothing to do
} else {