Skip to content

Commit

Permalink
Improve error message when auditwheel failed to find versioned offend…
Browse files Browse the repository at this point in the history
…ing symbols
  • Loading branch information
messense committed Feb 26, 2021
1 parent a3e19ee commit 10a8487
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/auditwheel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,19 @@ pub fn auditwheel_rs(
.map(|v| format!("{}_{}", name, v))
.collect();
let offending_symbols = find_incompliant_symbols(&elf, &offending_symbol_versions)?;
let offender = format!(
"{} offending symbols: {}",
library.name,
offending_symbols.join(", ")
);
let offender = if offending_symbols.is_empty() {
format!(
"{} offending versions: {}",
library.name,
offending_symbol_versions.join(", ")
)
} else {
format!(
"{} offending symbols: {}",
library.name,
offending_symbols.join(", ")
)
};
offenders.insert(offender);
}
}
Expand Down

0 comments on commit 10a8487

Please sign in to comment.