Bug 1352130 - dnf should not report errors to stdout, it's mildly dangerous
dnf should not report errors to stdout, it's mildly dangerous
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
23
All Linux
low Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: EasyFix, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-01 13:18 EDT by Oliver Henshaw
Modified: 2016-08-27 06:22 EDT (History)
5 users (show)

See Also:
Fixed In Version: dnf-1.1.10-1.fc24 dnf-1.1.10-1.fc23 dnf-1.1.10-1.fc25
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-19 15:52:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Oliver Henshaw 2016-07-01 13:18:08 EDT
Description of problem:

dnf writes to stdout when invoked with an argument it doesn't recognise.

$ dnf repomanageeeee
No such command: repomanageeeee. Please use /usr/bin/dnf --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(repomanageeeee)'
$ dnf repomanageeeee 1> /dev/null
No such command: repomanageeeee. Please use /usr/bin/dnf --help
$ dnf repomanageeeee 2> /dev/null
It could be a DNF plugin command, try: "dnf install 'dnf-command(repomanageeeee)'"

This causes problems when you do something like:

$ TO_REMOVE=`dnf repomanageeeee`
No such command: repomanageeeee. Please use /usr/bin/dnf --help
$ echo $TO_REMOVE 
It could be a DNF plugin command, try: "dnf install 'dnf-command(repomanageeeee)'"
$ ls $TO_REMOVE
...

which I stumbled across after moving from F22 to F23 and the dnf python plugins moved from python 2 > python 3 and I was now missing the repomanage plugin. Luckily I didn't delete anything, but the wrong word in the stdout message could have been dangerous.

(I've now added a check against $? to my script but this shouldn't have happened.)

Version-Release number of selected component (if applicable):

dnf-1.1.9-2.fc23.noarch
Comment 1 Honza Silhan 2016-07-04 07:34:10 EDT
"It could be a DNF plugin command,..." message shoudl be reported to stderr as well.
Comment 3 Fedora Admin XMLRPC Client 2016-07-08 05:40:17 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 4 Igor Gnatenko 2016-07-21 06:23:45 EDT
Fixed in upcoming DNF 2.0 release.
Comment 5 Fedora Update System 2016-08-18 11:20:00 EDT
dnf-1.1.10-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-267f843cda
Comment 6 Fedora Update System 2016-08-18 11:21:05 EDT
dnf-1.1.10-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8caa619a9e
Comment 7 Fedora Update System 2016-08-18 11:22:05 EDT
dnf-1.1.10-1.fc24 dnf-plugins-core-0.1.21-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-878284e0d3
Comment 8 Fedora Update System 2016-08-18 12:53:16 EDT
dnf-1.1.10-1.fc25, dnf-plugins-core-0.1.21-4.fc25 has been pushed to the Fedora 25 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-2016-8caa619a9e
Comment 9 Fedora Update System 2016-08-18 20:23:00 EDT
dnf-1.1.10-1.fc23, dnf-plugins-core-0.1.21-3.fc23 has been pushed to the Fedora 23 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-2016-267f843cda
Comment 10 Fedora Update System 2016-08-18 20:58:10 EDT
dnf-1.1.10-1.fc24, dnf-plugins-core-0.1.21-3.fc24 has been pushed to the Fedora 24 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-2016-878284e0d3
Comment 11 Fedora Update System 2016-08-19 15:51:05 EDT
dnf-1.1.10-1.fc24, dnf-plugins-core-0.1.21-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2016-08-23 11:20:14 EDT
dnf-1.1.10-1.fc23, dnf-plugins-core-0.1.21-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2016-08-27 06:21:16 EDT
dnf-1.1.10-1.fc25, dnf-plugins-core-0.1.21-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

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