Container: cleanup after failure
Dependencies
- [2]
RINI5Z3PCorrect cleanup of the .drv directory after build - [3]
ODUDDQRYAdding the OCaml interface - [4]
VWVW5VOICopying the sources in /src instead of / - [5]
YJYXDY6ACapturing stdout/stderr for the derivations that ask - [6]
BQ4E3XLAForwarding stdout/stderr - [7]
BDEVQIAUHandle cyclic Ubuntu dependencies
Change contents
- edit in src/container.rs at line 320
if status != 0 {debug!("returning error");return Err(Error::BuildReturn { status });} - replacement in src/container.rs at line 328
std::fs::remove_dir(&tmp_dir).unwrap_or(());// Return the error after cleanupif status != 0 {info!("removing {:?}", tmp_dir);std::fs::remove_dir_all(&tmp_dir).unwrap_or(());debug!("returning error");return Err(Error::BuildReturn { status });} - replacement in src/container.rs at line 353
match std::os::unix::fs::symlink(&dest, &out) {let s = std::os::unix::fs::symlink(&dest, &out);info!("removing {:?}", tmp_dir);std::fs::remove_dir_all(&tmp_dir).unwrap_or(());match s { - replacement in src/container.rs at line 575
debug!("{}", r.script); - replacement in src/container.rs at line 578
info!("chrooting to {:?}", tmp_dir);info!("chrooting to (fork) {:?}", tmp_dir);