From 02dbb4121945f199e42ad2ae19e31f8c8fc7e385 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Thu, 19 Feb 2026 15:19:02 +0100 Subject: [PATCH] deb: fix bugs on injecting packages/ppa - ppa was not the right target_arch if binfmt was used - apt-get would not downgrade for injected packages, but we want to --- src/deb/local.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/deb/local.rs b/src/deb/local.rs index a6e506e..d8d5fd5 100644 --- a/src/deb/local.rs +++ b/src/deb/local.rs @@ -70,7 +70,7 @@ pub async fn build( if !sources.iter().any(|s| s.uri.contains(&base_url)) { // Get host and target architectures let host_arch = crate::get_current_arch(); - let target_arch = if cross { arch } else { &host_arch }; + let target_arch = arch; // Create architectures list with both host and target if different let mut architectures = vec![host_arch.clone()]; @@ -174,6 +174,7 @@ pub async fn build( let mut cmd = ctx.command("apt-get"); cmd.envs(env.clone()) .arg("-y") + .arg("--allow-downgrades") .arg("install") .args(packages); let status = cmd.status()?;