Skip to content

Filter out NOTATION_ data from gpg status output before decoding (Closes: #169)

Baptiste Beauplat requested to merge lyknode/debexpo:fix/gpg-status-raw into live

This MR filters out NOTATION data from gpg before decoding as the output may not be ascii or UTF-8.

To achieve that, debexpo_exec() has been modified to allow overriding of the encoding and text parameters, allowing to read the output as raw bytes and delay decoding if necessary. The overriding mechanism has been generalized as a list of default values for debexpo_exec() if not provided.

In the GnuPG tool class, since we have to expand all line in the output to filter out the pattern, line splitting is now done directly by GnuPG._run() instead of in the callers.

Additionally, GPG defaults arguments have been moved to a 'define' variable to allow importing in the test suite, where re-signing is required to attach binary notation data for the regression test.

As usually tests have been added to assert correct behavior.

Closes: #169 (closed)

Merge request reports

Loading