#733 `pre-push-check`: show spectool command output
Merged by onosek. Opened by onosek.
onosek/rpkg spectool_output  into  master

Download 733.patch

When the spectool command fails, rpkg should display its output.

JIRA: RHELCMP-14392
Fixes: #732

Signed-off-by: Ondřej Nosek onosek@redhat.com

https://pagure.io/rpkg/blob/master/f/pyrpkg/init.py#_1318
This line above required using the argument return_stderr. Without it, the spectool command failed with an exception without showing enough information.

I should find other cases in the code with the potential same behaviour.

Example of the old output:

$ fedpkg pre-push-check
error: Release field must be present before build in package: podman
Could not execute pre_push_check: Failed to execute command.

Example of the new output:

$ fedpkg pre-push-check
RPM Failed to parse spec file.
error: Release field must be present before build in package: podman
Command 'spectool -l /tmp/pre_push_hook_gvp4xumt/podman.spec .....' failed. Push operation was cancelled.
Hint: this check (.git/hooks/pre-push script) can be bypassed by adding the argument '--no-verify' argument to the push command.

Pull-Request has been merged by onosek

Metadata