Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verbose DNF5 logs in Fedora Copr #3040

Closed
praiskup opened this issue Dec 1, 2023 · 1 comment
Closed

Verbose DNF5 logs in Fedora Copr #3040

praiskup opened this issue Dec 1, 2023 · 1 comment

Comments

@praiskup
Copy link
Member

praiskup commented Dec 1, 2023

So far I deployed package_manager=dnf5 release only on our staging instance. But the DNF5 logs there are pretty ugly, snippet:

Installing groups:                                                                   
 Buildsystem building group                                                          

Transaction Summary:
 Installing:      152 packages

Total size of inbound packages is 52 MiB. Need to download 52 MiB.
After this operation 180 MiB will be used (install 180 MiB, remove 0 B).
�[?25l[  1/152] bash-0:5.2.21-2.fc40.x86_64   0% |   0.0   B

[  1/152] bzip2-0:1.0.8-16.fc39.x86_64 100% |  52.3 KiB
[  2/152] bash-0:5.2.21-2.fc40.x86_64   0% |   0.0   B
[  3/152] coreutils-0:9.4-1.fc40.x86_64   0% |   0.0   B

[  2/152] cpio-0:2.14-5.fc40.x86_64 100% | 279.5 KiB
[  3/152] bash-0:5.2.21-2.fc40.x86_64   1% |  34.3 KiB
[  4/152] coreutils-0:9.4-1.fc40.x86_64  14% | 162.1 KiB

[  3/152] coreutils-0:9.4-1.fc40.x86_64 100% |   1.1 MiB
[  4/152] bash-0:5.2.21-2.fc40.x86_64  27% | 514.3 KiB
[  5/152] diffutils-0:3.10-3.fc39.x86_64  64% | 258.3 KiB

[  4/152] diffutils-0:3.10-3.fc39.x86_64 100% | 398.3 KiB
[  5/152] bash-0:5.2.21-2.fc40.x86_64  27% | 514.3 KiB
[  6/152] fedora-release-common-0:40-0.20.noarch   0% |   0.0   B
...

It seems that we should either revisit the stdout/stderr filter installed in Mock, or the one we have in copr-rpmbuild. Not sure, or maybe there are some options in DNF5 to make the output more "logger" friendly? @evan-goode

@github-project-automation github-project-automation bot moved this to Needs triage in CPT Kanban Dec 1, 2023
evan-goode added a commit to evan-goode/mock that referenced this issue Dec 1, 2023
If DNF 5 sees an "interactive" TTY on stdout, it will try to draw
progress bars and cause the Mock logs to be garbled:
fedora-copr/copr#3040. A simple fix is to have
DNF 5 output to a pipe instead of a PTY.

I'm not sure why output is collected via a PTY from yum/dnf (seems to
start from commit 99ca2fa), but it's probably no longer needed
for DNF 5?
@evan-goode
Copy link
Contributor

I think rpm-software-management/mock#1261 is the main problem here, but even after changing Mock to invoke DNF 5 with a pipe on stdout and not a PTY, the logs are still garbled due to rpm-software-management/dnf5#1058.

praiskup pushed a commit to evan-goode/mock that referenced this issue Dec 11, 2023
If DNF 5 sees an "interactive" TTY on stdout, it will try to draw
progress bars and cause the Mock logs to be garbled:
fedora-copr/copr#3040. A simple fix is to have
DNF 5 output to a pipe instead of a PTY.

I'm not sure why output is collected via a PTY from yum/dnf (seems to
start from commit 99ca2fa), but it's probably no longer needed
for DNF 5?
praiskup pushed a commit to rpm-software-management/mock that referenced this issue Dec 12, 2023
If DNF 5 sees an "interactive" TTY on stdout, it will try to draw
progress bars and cause the Mock logs to be garbled:
fedora-copr/copr#3040. A simple fix is to have
DNF 5 output to a pipe instead of a PTY.

I'm not sure why output is collected via a PTY from yum/dnf (seems to
start from commit 99ca2fa), but it's probably no longer needed
for DNF 5?
@nikromen nikromen moved this from Needs triage to Done in CPT Kanban Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants