Bug 226672 - Yum cannot handle indirect or piped args: "EOFError: EOF when reading a line"
Summary: Yum cannot handle indirect or piped args: "EOFError: EOF when reading a line"
Alias: None
Product: Fedora
Classification: Fedora
Component: yum   
(Show other bugs)
Version: 6
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-01-31 21:38 UTC by Keith G. Robertson-Turner
Modified: 2014-01-21 22:57 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-25 19:11:24 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Keith G. Robertson-Turner 2007-01-31 21:38:06 UTC
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 19:11:24 UTC
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-26 02:04:10 UTC
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.