Bug 1499623

Summary: Mishandling stderr vs stdout (dnf search, dnf repoquery)
Product: [Fedora] Fedora Reporter: Pavel Raiskup <praiskup>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dmach, ignatenko, jmracek, mhatina, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-2.7.4-1.fc26 dnf-2.7.4-1.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1626011 (view as bug list) Environment:
Last Closed: 2017-10-25 23:11:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1626011    

Description Pavel Raiskup 2017-10-09 06:13:34 UTC
$ sudo dnf search something-nonexisting --enablerepo hell --repofrompath=hell,http://ftp.fi.muni.cz/pub/linux/fedora/linux/development/rawhide/Everything/source/tree/ > /tmp/a

Leads into:
$ cat /tmp/a
Added hell repo from http://ftp.fi.muni.cz/pub/linux/fedora/linux/development/rawhide/Everything/source/tree/                                                                                                                                
Last metadata expiration check: 0:00:18 ago on Mon 09 Oct 2017 08:08:50 AM CEST.                                                                                                                                                             
No matches found.

I would expect this

Comment 1 Pavel Raiskup 2017-10-09 06:16:22 UTC
Sorry, I submitted too early.

I would expect the /tmp/a file is empty.

-----

Also repoquery:

$ sudo dnf repoquery "--disablerepo=*" --enablerepo hell --repofrompath=hell,http://ftp.fi.muni.cz/pub/linux/fedora/linux/development/rawhide/Everything/x86_64/os/ --^Catrequires 'postgresql-server(:MODULE_COMPAT_9.6)' --alldeps > COMPAT
$ head -n2 COMPAT 
Added hell repo from http://ftp.fi.muni.cz/pub/linux/fedora/linux/development/rawhide/Everything/x86_64/os/
orafce-0:3.3.0-6.fc27.x86_64

Comment 2 Jaroslav Mracek 2017-10-13 10:26:08 UTC
The first workaround would be to use '-q' option

Comment 3 Jaroslav Mracek 2017-10-13 11:15:19 UTC
I create 2 patches that should solve the issue:

https://github.com/rpm-software-management/dnf/pull/954

https://github.com/rpm-software-management/dnf-plugins-core/pull/236

Comment 4 Fedora Update System 2017-10-16 09:06:07 UTC
dnf-2.7.4-1.fc26 libdnf-0.11.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-9f04c2c90f

Comment 5 Fedora Update System 2017-10-16 09:06:58 UTC
dnf-2.7.4-1.fc27 libdnf-0.11.1-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-113a221a3d

Comment 6 Fedora Update System 2017-10-16 18:23:06 UTC
dnf-2.7.4-1.fc26, libdnf-0.11.1-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9f04c2c90f

Comment 7 Fedora Update System 2017-10-17 02:24:40 UTC
dnf-2.7.4-1.fc27, libdnf-0.11.1-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-113a221a3d

Comment 8 Fedora Update System 2017-10-25 23:11:34 UTC
dnf-2.7.4-1.fc26, libdnf-0.11.1-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2017-11-11 02:54:54 UTC
dnf-2.7.4-1.fc27, libdnf-0.11.1-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.