Bug 922521 - DNF crashes when passing packages to it via pipe
Summary: DNF crashes when passing packages to it via pipe
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf   
(Show other bugs)
Version: 18
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2013-03-17 16:08 UTC by Jindrich Novy
Modified: 2014-09-30 23:41 UTC (History)
4 users (show)

Fixed In Version: dnf-0.3.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-05-14 08:52:22 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Jindrich Novy 2013-03-17 16:08:21 UTC
Description of problem:
rpm -qa | grep kernel-3.*$ | grep -v kernel-3.8.3 | xargs dnf remove
Příprava průběhu odstranění
Řešení závislostí...
--> Starting dependency resolution
--> Hledání nepotřebných závislostí
---> Package kernel.x86_64 3.8.1-201.fc18 will be smazán
---> Package kernel.x86_64 3.7.9-205.fc18 will be smazán
---> Package kernel.x86_64 3.8.2-206.fc18 will be smazán
--> Finished dependency resolution

Závislosti vyřešeny.

 Package                                Arch                                   Verze                                           Repozitář                                Vel.
Odstraňuje se:
 kernel                                 x86_64                                 3.7.9-205.fc18                                  @System                                   0  
 kernel                                 x86_64                                 3.8.1-201.fc18                                  @System                                   0  
 kernel                                 x86_64                                 3.8.2-206.fc18                                  @System                                   0  

Shrnutí transakce
Remove  3 Packages

Nainstalovaná velikost: 0  
V pořádku [a/N]: Traceback (most recent call last):
  File "/usr/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 306, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 215, in main
    return_code = base.doTransaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 192, in doTransaction
    if self.conf.assumeno or not self.userconfirm():
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 971, in userconfirm
    choice = dnf.i18n.input(msg)
  File "/usr/lib/python2.7/site-packages/dnf/i18n.py", line 78, in input
    return raw_input(s)
EOFError: EOF when reading a line

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

How reproducible:

Steps to Reproduce:
1. have more kernels installed
2. # rpm -qa | grep kernel-3.*$ | grep -v kernel-3.8.3 | xargs dnf remove
2. kaboom
Actual results:

Expected results:
As YUM - i.e. doesn't run the operation.

Additional info:
This runs as expected when:
# rpm -qa | grep kernel-3.*$ | grep -v kernel-3.8.3 | xargs dnf remove -y

Comment 1 Ales Kozumplik 2013-03-18 07:59:12 UTC
thanks for the report. I haven't tested the userconfirm() input with stdin piped into the process so this bug looks very plausible:)

Comment 2 Ales Kozumplik 2013-03-25 09:37:11 UTC
Fixed by 6c27561.

Comment 3 Ales Kozumplik 2013-03-25 09:38:48 UTC
*** Bug 927016 has been marked as a duplicate of this bug. ***

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