Bug 226672 - Yum cannot handle indirect or piped args: "EOFError: EOF when reading a line"
Yum cannot handle indirect or piped args: "EOFError: EOF when reading a line"
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
6
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-31 16:38 EST by Keith G. Robertson-Turner
Modified: 2014-01-21 17:57 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-25 15:11:24 EDT
Type: ---
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 Keith G. Robertson-Turner 2007-01-31 16:38:06 EST
Description of problem:

Yum fails with the following error:

 Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 172, in main
    base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 388, in doTransaction
    if not self.userconfirm():
  File "/usr/share/yum-cli/output.py", line 115, in userconfirm
    choice = raw_input('Is this ok [y/N]: ')
EOFError: EOF when reading a line

Command called:

Many examples:

echo "gphoto2" | awk '{print "sudo yum remove "$0}' | /bin/sh

echo "wine" | xargs sudo yum remove

Etc.

Using the "-y" flag circumvents the above condition (but is not ideal).

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

yum-3.0.3-1.fc6

How reproducible:

Always.

Steps to Reproduce:
1. Call yum with indirect args
2.
3.
  
Actual results:

EOFError: EOF when reading a line

Expected results:

Should parse the args correctly.

Additional info:

This makes writing scripts for yum a real pain.

Also, this is not really a new bug. I've noticed this behaviour before, but
never got around to reporting it.
Comment 1 Jeremy Katz 2007-04-25 15:11:24 EDT
This is the expected behavior, though; with the CLI, we ask if things are okay.
 If you don't want to be asked (in cases like this), then you should pass -y
Comment 2 Keith G. Robertson-Turner 2007-04-25 22:04:10 EDT
Yes but surely "EOFError: EOF when reading a line" is not "expected behaviour",
it's an error condition? Note, this is not just a warning message, it does
actually cause yum to fail.

I can confirm this bug is still in yum-3.0.5-2.fc6.x86_64, I just tried it.

+1 reopen this bug.

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