Use arch-nspawn instead of chroot.

This commit is contained in:
Eduard Tolosa 2019-04-22 23:27:03 -05:00
parent 16d361fbe1
commit ffaeceb3c3

View file

@ -323,6 +323,7 @@ pub fn sync_chroot() {
pub fn test_package(package: &str, executable: &str) { pub fn test_package(package: &str, executable: &str) {
let pacman = get_vars("pacman"); let pacman = get_vars("pacman");
let chroot_blackarch = get_vars("chroot_blackarch"); let chroot_blackarch = get_vars("chroot_blackarch");
let devtools_nspawn = get_vars("nspawn");
let install_package = Command::new("sudo") let install_package = Command::new("sudo")
.args(&[&pacman, "--root", &chroot_blackarch, "-U", &package]) .args(&[&pacman, "--root", &chroot_blackarch, "-U", &package])
.status() .status()
@ -335,7 +336,7 @@ pub fn test_package(package: &str, executable: &str) {
) )
.unwrap(); .unwrap();
let execute_package = Command::new("sudo") let execute_package = Command::new("sudo")
.args(&["chroot", &chroot_blackarch, &executable]) .args(&[&devtools_nspawn, &chroot_blackarch, executable])
.status() .status()
.expect( .expect(
"Failed to execute the {} binary in the chroot environment, check the binary name.", "Failed to execute the {} binary in the chroot environment, check the binary name.",