AlmaLinux / AlmaLinux/build-system

Redirect errors during parsing spec files into logs

未关闭
#476 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
build-node good first issue
主要语言
没有语言数据
星标
32
派生
11
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。