Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68946 - Emerge crashed when running 'emerge --sync --ask'
Summary: Emerge crashed when running 'emerge --sync --ask'
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 69084 69406 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-26 01:48 UTC by Maximilian Schwerin
Modified: 2005-07-14 06:58 UTC (History)
2 users (show)

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


Attachments
This patch solves the bug. (emerge-bug-68946-proposed-solution.patch.gz,354 bytes, patch)
2004-11-16 09:02 UTC, Maximilian Schwerin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maximilian Schwerin 2004-10-26 01:48:51 UTC
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
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2004-10-28 06:28:45 UTC
*** Bug 69084 has been marked as a duplicate of this bug. ***
Comment 2 Jason Stubbs (RETIRED) gentoo-dev 2004-10-28 06:53:53 UTC
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?
Comment 3 Brian Harring (RETIRED) gentoo-dev 2004-10-29 07:43:59 UTC
*** Bug 69406 has been marked as a duplicate of this bug. ***
Comment 4 Tor Klingberg 2004-10-29 12:21:10 UTC
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.
Comment 5 Maximilian Schwerin 2004-11-16 09:02:17 UTC
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 6 Maximilian Schwerin 2004-11-16 09:05:39 UTC
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]=="/":
Comment 7 Tor Klingberg 2004-11-17 05:07:55 UTC
Is there any reason not to do this the right way, i.e. ask the user?
Comment 8 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 05:48:17 UTC
Fixed on or before 2.0.51.22-r1 
Comment 9 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 06:58:56 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.