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

@@ -2,18 +2,26 @@
/// Call 'sbuild' with the dsc file to build the package with unshare
use crate::context;
use std::error::Error;
use std::path::Path;
pub fn build(
package: &str,
_version: &str,
version: &str,
arch: &str,
series: &str,
build_root: &str,
cross: bool,
) -> Result<(), Box<dyn Error>> {
let ctx = context::current();
// 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")?;
let mut cmd = ctx.command("sbuild");
cmd.current_dir(format!("{}/{}", build_root, package));
cmd.current_dir(package_dir_str);
cmd.arg("--chroot-mode=unshare");
cmd.arg("--no-clean-source");