exp: cross #5

This commit is contained in:
2025-12-22 00:13:37 +01:00
parent 75751ad301
commit 63389f0bad
4 changed files with 361 additions and 304 deletions

View File

@@ -51,9 +51,11 @@ pub fn build_binary_package(
// Specific case: native cross-compilation, we don't allow that
// instead this wraps to an automatic unshare chroot
// using an ephemeral context
if cross && mode == BuildMode::Local {
cross::setup_native_context(series)?;
}
let _guard = if cross && mode == BuildMode::Local {
Some(cross::EphemeralContextGuard::new(series)?)
} else {
None
};
// Prepare build directory
let ctx = context::current();
@@ -83,10 +85,6 @@ pub fn build_binary_package(
}
}
if cross && mode == BuildMode::Local {
cross::clean_native_context()?;
}
Ok(())
}