Running 'emerge --sync --ask' crashes the application since portage-2.0.51. Reproducible: Always Steps to Reproduce: 1. run 'emerge --sync --ask' Actual Results: The application crashes. # emerge --sync --ask Do you want to sync your Portage tree with the mirror at rsync://137.226.34.228/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
*** Bug 69084 has been marked as a duplicate of this bug. ***
Is there any particular reason that --ask is needed in conjunction with --sync? The easiest and possibly best fix for this is to remove the --ask option altogether when syncing. Does anyone have any valid reasons that the option should remain?
*** Bug 69406 has been marked as a duplicate of this bug. ***
I use --ask on emerge sync since I use the aliases alias ge='emerge -av' alias se='emerge -s' for all my portage interaction. Also, why did I not find this bug when I searched for 'ALL sync IOError'? Then I could have avoided filing 69406.
Created attachment 44070 [details, diff] This patch solves the bug. This solves the bug. It remains to be decided, if the --ask option is supposed to be available for sync.
Comment on attachment 44070 [details, diff] This patch solves the bug. --- emerge.orig 2004-11-16 17:53:05.861199056 +0100 +++ emerge 2004-11-16 17:53:12.694160288 +0100 @@ -2295,13 +2295,6 @@ print "emerge: \"sync\" actions do not support \"--pretend.\"" sys.exit(1) - try: - os.close(sys.stdin.fileno()) - except SystemExit, e: - raise # Needed else can't exit - except: - pass - emergelog(" === "+str(myaction)) myportdir=portage.settings["PORTDIR"] if myportdir[-1]=="/":
Is there any reason not to do this the right way, i.e. ask the user?
Fixed on or before 2.0.51.22-r1
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.