Bug 922521 - DNF crashes when passing packages to it via pipe
DNF crashes when passing packages to it via pipe
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-17 12:08 EDT by Jindrich Novy
Modified: 2014-09-30 19:41 EDT (History)
4 users (show)

See Also:
Fixed In Version: dnf-0.3.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-14 04:52:22 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 Jindrich Novy 2013-03-17 12:08:21 EDT
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:
Always

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:
crashes

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 03:59:12 EDT
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 05:37:11 EDT
Fixed by 6c27561.
Comment 3 Ales Kozumplik 2013-03-25 05:38:48 EDT
*** 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.