Bug 1208592 - dnf repoquery prints diagnostic messages to standard output
Summary: dnf repoquery prints diagnostic messages to standard output
Keywords:
Status: CLOSED DUPLICATE of bug 1232535
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-02 15:51 UTC by Petr Pisar
Modified: 2015-07-21 12:02 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-07-21 12:02:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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 ***


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