xtask: ensure we actually built depmod

reviewable/pr1363/r3
Tamir Duberstein 1 week ago
parent 82750ae3b1
commit 71f6176e24
No known key found for this signature in database

@ -436,13 +436,18 @@ pub(crate) fn run(opts: Options) -> Result<()> {
// At this point we need to make a slight detour!
// Preparing the `modules.alias` file inside the VM as part of
// `/init` is slow. It's faster to prepare it here.
Command::new("cargo")
let mut cargo = Command::new("cargo");
let output = cargo
.arg("run")
.args(test_distro_args)
.args(["--bin", "depmod", "--", "-b"])
.arg(&modules_dir)
.status()
.context("failed to run depmod")?;
.output()
.with_context(|| format!("failed to run {cargo:?}"))?;
let Output { status, .. } = &output;
if status.code() != Some(0) {
bail!("{cargo:?} failed: {output:?}")
}
// Now our modules.alias file is built, we can recursively
// walk the modules directory and add all the files to the

Loading…
Cancel
Save