Bug 2172868 - [dnf5] dnf5 repoquery mixes up stdout and stderr
Summary: [dnf5] dnf5 repoquery mixes up stdout and stderr
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: 41
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Evan Goode
QA Contact:
URL:
Whiteboard: RejectedBlocker
: 2223347 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-23 11:13 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2025-02-18 10:56 UTC (History)
8 users (show)

Fixed In Version: dnf5-5.2.6.2-1.fc41
Clone Of:
Environment:
Last Closed: 2025-02-18 10:56:15 UTC
Type: Bug
Embargoed:
mhroncok: fedora_prioritized_bug?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rpm-software-management dnf5 issues 1361 0 None closed dnf5 repoquery writes repo update output to stdout not stderr 2024-08-20 09:42:23 UTC
Red Hat Bugzilla 1358245 0 low CLOSED repoquery: valid use of stderr and stdout, use stdout only for requested data 2023-02-23 11:13:09 UTC

Description Zbigniew Jędrzejewski-Szmek 2023-02-23 11:13:10 UTC
Description of problem:
Program logs and error messages must be written to fd 2 (i.e. stderr), and the actual output to fd 1 (i.e. stdout). Doing anything else makes it very hard to use the program in a pipeline. dnf5 repoquery writes log messages to stdout.

$ dnf5 repoquery 2>/dev/null | grep Repositories
Repositories loaded.

"Repositories loaded." is obviously not a package name.

Version-Release number of selected component (if applicable):
dnf5-5.0.6-1.fc39.x86_64

Comment 1 Fedora Release Engineering 2023-08-16 07:10:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 2 Petr Pisar 2024-04-04 07:27:13 UTC
*** Bug 2223347 has been marked as a duplicate of this bug. ***

Comment 3 František Zatloukal 2024-08-19 18:47:03 UTC
Discussed during the 2024-08-19 blocker review meeting: [1]

The decision to classify this bug as a RejectedBlocker (Final) was made:

"This is annoying, but we don't see anywhere it violates the release criteria. Please re-propose it with more details if there is a criteria violation we're missing."

[1] https://meetbot.fedoraproject.org/blocker-review_matrix_fedoraproject-org/2024-08-19/f41-blocker-review.2024-08-19-15.59.log.html

Comment 4 Miro Hrončok 2024-08-19 20:33:42 UTC
This has been reported a long time ago, please repsond.

Comment 5 Jan Kolarik 2024-08-20 06:20:43 UTC
Sorry, somehow it got out of our sight. I agree this is important to resolve, though it's not a release blocker. We'll try to address it before the release.

Comment 6 Jan Kolarik 2024-08-20 07:53:28 UTC
We've discussed this within the team and decided to close the ticket, leaving the current behavior unchanged. For more details, please refer to the explanation in the upstream ticket: https://github.com/rpm-software-management/dnf5/issues/1361.

Comment 7 Miro Hrončok 2024-08-20 09:37:32 UTC
You just said this is important to resolve.

Comment 8 Jan Kolarik 2024-08-20 10:00:45 UTC
(In reply to Miro Hrončok from comment #7)
> You just said this is important to resolve.

Yes and I believe closing the ticket with an explanation is a valid resolution, right? :) Anyway, thanks for the feedback upstream. I had a slightly different perspective on the distinction between stdout and stderr in this case. We'll look into this, but ensuring consistent behavior across all dnf commands might require a significant amount of work.


Note You need to log in before you can comment on or make changes to this bug.