Bug 1236306 - Some of dnf's subcommands can't handle pipe
Summary: Some of dnf's subcommands can't handle pipe
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-27 15:01 UTC by kealthou
Modified: 2015-08-19 07:51 UTC (History)
8 users (show)

Fixed In Version: dnf-plugins-core-0.1.10-1.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-15 02:14:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Result of "dnf group list | head -n 1" (14.17 KB, text/plain)
2015-06-27 15:01 UTC, kealthou
no flags Details

Description kealthou 2015-06-27 15:01:54 UTC
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 15:27:16 UTC
Thanks for the report. We'll take a look. Btw yum does that too.

Comment 2 Honza Silhan 2015-07-29 12:07:53 UTC
Do you now what's the cause of the problem, Michael?

Comment 3 Michael Mráka 2015-08-06 10:23:15 UTC
Python by default does not ignore SIGPIPE.

Fixed in
commit 0e940a58d13bf4c22d42881cbd3b83bce12adb59
    ignore SIGPIPE (RhBug:1236306)

Comment 4 Fedora Update System 2015-08-10 10:05:45 UTC
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 10:49:30 UTC
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-11 02:10:44 UTC
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-15 02:14:18 UTC
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 07:51:34 UTC
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.