When emerging with the "--ask" option, emerge crashes with a traceback, if an end of file character is given to the question, because raw_input does not seem to handle the EOF. Reproducible: Always Steps to Reproduce: 1. emerge --ask some_ebuild 2. Give ^D (End of File) to the question Actual Results: emerge crashed with the following output. Do you want me to merge these packages? [Yes/No] Traceback (most recent call last): File "/usr/bin/emerge", line 2566, in ? if userquery(prompt)=="No": File "/usr/bin/emerge", line 49, in userquery response=raw_input("["+string.join([colours[i](responses[i]) for i in range(len(responses))],"/")+"] ") EOFError Expected Results: I don't know: Taking into account that the EOF will most often not be caused by the user intentionally, but may more likely come from some wrapper script not able to handle interactive emerges, one should perhaps choose to do less harm and treat EOF as No. On the other hand, Return is treated as Yes, so it would seem analogous to treat EOF as Yes. This behaviour was already described in <a href="http://bugs.gentoo.org/show_bug.cgi?id=41293#c1">Bug 41293</a>, but was considered not to be severe enough, and so that bug was marked resolved. I ran into this traceback, when trying to "revdep-rebuild --ask", which does not work, because of <a href="http://bugs.gentoo.org/show_bug.cgi?id=37485">Bug 37485</a>. I think, it seems quite likely, that other scripts in the future ("official" ones in portage and user-created) will also call emerge without considering possible interaction and, hence, will perhaps run into the same error. So, it seems worth fixing IMO.
This is handled in 2.0.51
Bug has been fixed and released in stable portages on or before 2.0.51-r2