Bug 1208592

Summary: dnf repoquery prints diagnostic messages to standard output
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: dnf-plugins-coreAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: jsilhan, mluscon, packaging-team-maint, pnemade, rholy, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-21 12:02:43 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:

Description Petr Pisar 2015-04-02 15:51:39 UTC
DNF's repoquery prints "Using metadata from " diagnostic message onto standard output:

$ dnf repoquery --repoid=rawhide --whatprovides 'perl(DOESNOTEXIST)'  
Using metadata from Thu Apr  2 17:29:31 2015 (0:15:11 hours old)
$ echo $?
0
$ dnf repoquery --repoid=rawhide --whatprovides 'perl(DOESNOTEXIST)' >/dev/null
$

So the message mixes with response data:

$ dnf repoquery --repoid=rawhide --whatprovides 'perl(strict)'
Using metadata from Thu Apr  2 17:29:31 2015 (0:18:33 hours old)
perl-4:5.20.2-325.fc23.x86_64
$ dnf repoquery --repoid=rawhide --whatprovides 'perl(strict)' |wc -l
2

This way it's hard for scripts to recognize that something the query has empty response. Ignoring first line is awful workaround.

Please print the message into error output instead.

Tested with dnf-plugins-core-0.1.6-2.fc23.noarch.

Comment 1 Jan Kurik 2015-07-15 14:19:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 2 Radek Holy 2015-07-21 12:02:43 UTC
I admit that this is an older bug but since we have already closed a newer duplicate of this, let me close this as a duplicate of that bug.

*** This bug has been marked as a duplicate of bug 1232535 ***