deb: use qemu_binfmt on ephemeral/local builds of different arch
This commit is contained in:
@@ -49,8 +49,15 @@ pub async fn build_binary_package(
|
||||
};
|
||||
|
||||
// Create an ephemeral unshare context for all Local builds
|
||||
// Use qemu_binfmt when target architecture differs from host and cross is not requested
|
||||
let chroot_arch = if mode == BuildMode::Local && arch != current_arch && !cross {
|
||||
Some(arch)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let mut guard = if mode == BuildMode::Local {
|
||||
Some(ephemeral::EphemeralContextGuard::new(series).await?)
|
||||
Some(ephemeral::EphemeralContextGuard::new(series, chroot_arch).await?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user