conda-build icon indicating copy to clipboard operation
conda-build copied to clipboard

allow LIEF to fail when using patchelf

Open minrk opened this issue 1 year ago • 2 comments

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.

minrk avatar Feb 09 '24 13:02 minrk

CodSpeed Performance Report

Merging #5176 will not alter performance

Comparing minrk:safe-lief-fail (a538ffd) with main (eca014a)

Summary

✅ 3 untouched benchmarks

codspeed-hq[bot] avatar Jun 10 '24 14:06 codspeed-hq[bot]

I switched it to log and added news. I'm afraid I don't know how to exercise this failure in a test.

minrk avatar Jun 21 '24 09:06 minrk

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

jaimergp avatar Jul 12 '24 07:07 jaimergp

Per Jaime's comment, I reverted the logging changes; I also went ahead and filed an issue to change all error-reporting to logging.

beeankha avatar Jul 15 '24 20:07 beeankha