AlmaLinux / AlmaLinux/build-system

Redirect errors during parsing spec files into logs

Open
#476 0 comments 0 reactions 0 assignees View on GitHub
build-node good first issue
Dominant language
No language data
Stars
32
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Sometimes we can fall into parsing spec files silently to users, and detailed info about parsing spec files can be found in the service logs.
For example:
mock_build_srpm.log
```
RPM build errors:
error: Bad file: /builddir/build/SOURCES/negativo-nvidia.repo: No such file or directory
error: Bad file: /builddir/build/SOURCES/almalinux-nvidia.repo: No such file or directory
Bad file: /builddir/build/SOURCES/negativo-nvidia.repo: No such file or directory
Bad file: /builddir/build/SOURCES/almalinux-nvidia.repo: No such file or directory
Child return code was: 1
```
logs from journal:
```
May 26 12:42:29 builder01 python3[3780286]: error: source 0 defined multiple times
May 26 12:42:29 builder01 python3[3780286]: error: source 0 defined multiple times
```
Probably, we can somehow redirect errors via rpm binding or maybe using `contextlib.redirect_stderr` or something else

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.