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