context: copy symlinks as symlinks and improve error messages

This commit is contained in:
2026-07-17 10:12:46 +02:00
parent 2b27b7b06e
commit c4b59a4376
11 changed files with 382 additions and 54 deletions
+15 -2
View File
@@ -46,10 +46,23 @@ pub fn build_source_package(cwd: Option<&Path>) -> Result<(), Box<dyn Error>> {
);
}
let status = command.status()?;
let status = command.status().map_err(|e| {
format!(
"Failed to run 'dpkg-buildpackage': {}. \
Is 'dpkg-dev' (which provides dpkg-buildpackage) installed?",
e
)
})?;
if !status.success() {
return Err(format!("dpkg-buildpackage failed with status: {}", status).into());
return Err(format!(
"dpkg-buildpackage failed with status: {}. \
Re-run with 'RUST_LOG=debug' for more details, or run \
'dpkg-buildpackage -S -I -i -nc -d' manually in '{}' to see the full output.",
status,
cwd.display()
)
.into());
}
if signing_key.is_some() {