skip the emulation check in chrootless mode

Whenever the selected architecture differs from the native architecture
of the system that runs mmdebstrap, mmdebstrap checks whether it can run
the selected architecture. In the majority of cases, this is good and
helps avoid difficult to diagnose issues. However when running in
chrootless mode, we don't actually want to run any binaries from the
target system. For that reason, the emulation check should be skipped in
chrootless mode.
pull/1/head
Helmut Grohne 4 years ago committed by Johannes 'josch' Schauer
parent 9717faef59
commit d7f7f8cb34
Signed by: josch
GPG Key ID: F2CBA5C78FBD83E1

@ -3234,7 +3234,9 @@ sub main() {
sparc => 'sparc',
sparc64 => 'sparc64',
};
if ($hostarch ne $options->{nativearch}) {
if ($options->{mode} eq "chrootless") {
info "skipping emulation check in chrootless mode";
} elsif ($hostarch ne $options->{nativearch}) {
if (system('arch-test --version>/dev/null') != 0) {
error "install arch-test for foreign architecture support";
}

Loading…
Cancel
Save