deb: consider package directories with version
Some checks failed
CI / build (push) Failing after 1m6s

This commit is contained in:
2026-01-12 10:37:09 +01:00
parent bd10a37c2a
commit 21bb76153e
3 changed files with 59 additions and 6 deletions

View File

@@ -80,10 +80,16 @@ pub fn build(
return Err("Could not install essential packages for the build".into());
}
// Find the actual package directory
let package_dir = crate::deb::find_package_directory(Path::new(build_root), package, version)?;
let package_dir_str = package_dir
.to_str()
.ok_or("Invalid package directory path")?;
// Install build dependencies
log::debug!("Installing build dependencies...");
let mut cmd = ctx.command("apt-get");
cmd.current_dir(format!("{build_root}/{package}"))
cmd.current_dir(package_dir_str)
.envs(env.clone())
.arg("-y")
.arg("build-dep");
@@ -102,7 +108,7 @@ pub fn build(
log::debug!("Building (debian/rules build) package...");
let status = ctx
.command("debian/rules")
.current_dir(format!("{build_root}/{package}"))
.current_dir(package_dir_str)
.envs(env.clone())
.arg("build")
.status()?;
@@ -113,7 +119,7 @@ pub fn build(
// Run the 'binary' step to produce deb
let status = ctx
.command("fakeroot")
.current_dir(format!("{build_root}/{package}"))
.current_dir(package_dir_str)
.envs(env.clone())
.arg("debian/rules")
.arg("binary")