OSInside / kiwi

KIWI - Appliance Builder Next Generation
https://osinside.github.io/kiwi
GNU General Public License v3.0
302 stars 152 forks source link

Fixed logging behavior of Compress::get_format #2594

Closed schaefi closed 3 months ago

schaefi commented 3 months ago

The get_format() method allows to check which compression format a given input stream has. This is done by calling the supported compression tools in a row and let them check if they can deal with the provided data or not. As a result error messages are logged for streams that some tool doesn't understand. However, those error messages are no errors and only the result of the checking. This information in the kiwi log file is confusing and several users already complained when they see information like:

EXEC: Failed with stderr: /usr/bin/xz: ...: File format not recognized

This commit changes how the compression tooling is called in a way that no exception is raised (which leads to the above error message) but the result returncode is used to decide on the success or error of the respective compression tooling.