Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77147 - "emerge -av sync" ends with an I/O error (portage-2.0.51-r3)
Summary: "emerge -av sync" ends with an I/O error (portage-2.0.51-r3)
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-01-08 09:34 UTC by Diederik van der Boor
Modified: 2005-07-14 06:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Comments out the section that closes stdin (emerge-ask-sync.patch,578 bytes, patch)
2005-01-09 00:19 UTC, Alec Warner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diederik van der Boor 2005-01-08 09:34:46 UTC
I have "emerge" aliased as "emerge -av". Typing "emerge sync" in bash causes the following error:

Do you want to sync your Portage tree with the mirror at
rsync://134.68.220.74/gentoo-portage? [Yes/No] Traceback (most recent call last):
  File "/usr/bin/emerge", line 2435, in ?
    if userquery("Do you want to sync your Portage tree with the mirror at\n" + blue(dosyncuri) + bold("?"))=="No":
  File "/usr/bin/emerge", line 110, in userquery
    response=raw_input("["+string.join([colours[i](responses[i]) for i in range(len(responses))],"/")+"] ")
IOError: [Errno 9] Bad file descriptor


Reproducible: Always
Steps to Reproduce:
1. run "emerge -av sync"
Comment 1 Søren Chrestensen 2005-01-08 09:48:25 UTC
Remove the -a and it works.
Comment 2 Diederik van der Boor 2005-01-08 13:45:52 UTC
I know.. I'm running "/usr/bin/emerge sync" these days to avoid the alias.

But this doesn't change my point; Portage appears to die with a bug just because I added a switch it didn't expect. This shouldn't occur. And IMHO, prompting "do want to sync with .. [y/n]" is a legitimate question.
Comment 3 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-01-08 23:43:57 UTC
It's supposed to work, IIRC it was working in an earlier version.  Attempting to fix it ( malformed raw_input line? ).
Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-01-09 00:10:57 UTC
I have no clue what this breaks, or why it was there, but someone was closing stdin in the "sync" code in emerge.  I commented it out and the sync appeared to go fine, if all goes well I'll submit the patch.  
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-01-09 00:19:44 UTC
Created attachment 48003 [details, diff]
Comments out the section that closes stdin

If this closure is necessary ( no clue why you'd need to close stdin I tried
typing all manner of crap while rsync was running and I couldn't make it fubar
) it needs to be moved to after --ask is done so userquery can do it's work. 
For now it's commented out with a pointer to this bug.
Comment 6 Nicholas Jones (RETIRED) gentoo-dev 2005-01-10 18:09:27 UTC
The close prevents people from hurting ebuild.sh by letting portage handle
control-c. Move it down to the metadata section instead.

See 51-r9 or later.
Comment 7 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 05:48:01 UTC
Fixed on or before 2.0.51.22-r1 
Comment 8 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 06:58:44 UTC
Looking through the batch of bugs, I'm not sure that some of these are 
actually fixed in stable. Others, the requirements have possibly changed after 
the initial fix was committed. 
 
If you think this bug has been closed incorrectly, please reopen or ask that 
it be reopened.