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"
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Depends On:
  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:
Last Closed: 2007-04-25 15:11:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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 ?
  File "/usr/share/yum-cli/yummain.py", line 172, in main
  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


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

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


How reproducible:


Steps to Reproduce:
1. Call yum with indirect args
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.