conda-build
conda-build copied to clipboard
allow LIEF to fail when using patchelf
avoids unconditional failure when LIEF raises, even when not used
Description
related to #5175, this allows LIEF to fail just like patchelf.
Previously, even when specifying method=patchelf
, LIEF was unconditionally run. This adds error handling matching patchelf, so errors in an unused method don't prevent proceeding with patchelf.
CodSpeed Performance Report
Merging #5176 will not alter performance
Comparing minrk:safe-lief-fail
(a538ffd) with main
(eca014a)
Summary
✅ 3
untouched benchmarks
I switched it to log and added news. I'm afraid I don't know how to exercise this failure in a test.
Hm, the modified function is now using two different methods to report errors and warnings to the user. This implies slightly different formats, and also different streams (logging will print to stderr and print to stdout, as currently configured). I'd rather stick to one of the methods so:
- Either change everything to logging (and move
logger
to the top-level module namespace, under the imports) - Revert to print with the same format as the other messages. We would need to create an issue to tackle a general move to logging, if one doesn't exist yet
Per Jaime's comment, I reverted the logging changes; I also went ahead and filed an issue to change all error-reporting to logging.