Bug 1236306 - Some of dnf's subcommands can't handle pipe
Some of dnf's subcommands can't handle pipe
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: Michael Mráka
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-27 11:01 EDT by kealthou
Modified: 2015-08-19 03:51 EDT (History)
8 users (show)

See Also:
Fixed In Version: dnf-plugins-core-0.1.10-1.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-14 22:14:18 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)
Result of "dnf group list | head -n 1" (14.17 KB, text/plain)
2015-06-27 11:01 EDT, kealthou
no flags Details

  None (edit)
Description kealthou 2015-06-27 11:01:54 EDT
Created attachment 1043883 [details]
Result of "dnf group list | head -n 1"

Description of problem:
Some, for instance list and group, can't handle pipe properly, and throw "[Errno 32] Broken pipe".

Others can, for instance info and search, but when used with "head -n 0", go wrong. In this case, I don't think it causes a problem, from a practical viewpoint.

Version-Release number of selected component (if applicable):
dnf-1.0.1-2.fc22.noarch

How reproducible:
Always

Steps to Reproduce:
$ dnf list | head -n 1
Last metadata expiration check performed 0:38:32 ago on Sat Jun 27 23:18:33 2015.
[Errno 32] Broken pipe

$ dnf search dnf | head -n 0
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 883, in emit
    self.flush()
  File "/usr/lib/python2.7/logging/__init__.py", line 843, in flush
    self.stream.flush()
IOError: [Errno 32] Broken pipe
Logged from file cli.py, line 802
Comment 1 Honza Silhan 2015-06-29 11:27:16 EDT
Thanks for the report. We'll take a look. Btw yum does that too.
Comment 2 Honza Silhan 2015-07-29 08:07:53 EDT
Do you now what's the cause of the problem, Michael?
Comment 3 Michael Mráka 2015-08-06 06:23:15 EDT
Python by default does not ignore SIGPIPE.

Fixed in
commit 0e940a58d13bf4c22d42881cbd3b83bce12adb59
    ignore SIGPIPE (RhBug:1236306)
Comment 4 Fedora Update System 2015-08-10 06:05:45 EDT
dnf-plugins-core-0.1.10-1.fc23,dnf-1.1.0-1.fc23,hawkey-0.6.0-1.fc23 has been submitted as an update for Fedora 23.
https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.10-1.fc23,dnf-1.1.0-1.fc23,hawkey-0.6.0-1.fc23
Comment 5 Fedora Update System 2015-08-10 06:49:30 EDT
dnf-plugins-core-0.1.10-1.fc22,dnf-1.1.0-1.fc22,hawkey-0.6.0-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.10-1.fc22,dnf-1.1.0-1.fc22,hawkey-0.6.0-1.fc22
Comment 6 Fedora Update System 2015-08-10 22:10:44 EDT
Package dnf-plugins-core-0.1.10-1.fc22, dnf-1.1.0-1.fc22, hawkey-0.6.0-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.1.10-1.fc22 dnf-1.1.0-1.fc22 hawkey-0.6.0-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-13162/dnf-plugins-core-0.1.10-1.fc22,dnf-1.1.0-1.fc22,hawkey-0.6.0-1.fc22
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2015-08-14 22:14:18 EDT
dnf-plugins-core-0.1.10-1.fc22, hawkey-0.6.0-1.fc22, dnf-1.1.0-2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2015-08-19 03:51:34 EDT
dnf-plugins-core-0.1.10-1.fc23, hawkey-0.6.0-1.fc23, dnf-1.1.0-2.fc23 has been pushed to the Fedora 23 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.