pull: extract orig tarball as well on archive download
Some checks failed
CI / build (push) Failing after 7m50s

This commit is contained in:
2026-01-12 18:54:07 +01:00
parent 593793373a
commit 35f9517732

View File

@@ -329,6 +329,24 @@ async fn fetch_archive_sources(
std::fs::remove_file(&path)?;
}
// Extract the orig tarball if present and not native package
if !info.is_native()
&& let Some(orig_file) = info
.stanza
.files
.iter()
.find(|f| f.name.contains(".orig.tar."))
{
let path = package_dir.join(&orig_file.name);
let extract_dir = package_dir.join(&info.stanza.package);
if (orig_file.name.ends_with(".tar.xz") || orig_file.name.ends_with(".tar.gz"))
&& let Err(e) = extract_archive(&path, &extract_dir)
{
return Err(format!("Failed to extract {}: {}", orig_file.name, e).into());
}
}
Ok(())
}