For some time now (forever) bootstrap.sh has had some very antisocial behaviour. It replaces make.conf temporarily for the fist phase of bootstrapping, and replaces it later. Many users are not aware of this, and if for any reason bootstrapping fails, they will restart it and consequently lose all their CFLAGS and USE flags. Worse still, they will often continue to build their system with the wrong make.conf. The easy solution to this is to _first_ check for make.conf.save in /etc. If it exists, copy it over make.conf. If not, then cp make.conf make.conf.save. When bootstrap has successfully completed, remove make.conf.save. All of this should be accompanied by informative messages to let the user know exactly what is happening.
Ok, I said what I did in the previous 20 bugs about this. Somebody else handle this this time around, thanks.
This is a known situation (and has been for a while), unfortunately aside from your suggested workaround there is not yet an elegant solution at hand for this behaviour without some low level modifications to the way things work. That being said maybe we shoud make a note in the docs that this process will occur. Also, make.conf is always backed up by the bootstrap script (make.conf.build I think or something like that), so would probably suffice to add at least that to our docs for now I'll pursue this further Azarah, int's unavoidable currently and at least if it's known it wont show up on bugs so often :)
It won't suffice. Although make.conf is backed up, if bootstrap.sh fails (as it often does, particularly with novice users) and the user restarts it, the 'backup' is zapped by the temporary version. All I am suggesting is that the script creates a safe backup first, but ONLY if that backup does not exist. Then it can carry on doing what it does right now. If the script is restarted and the safe backup exists, use that. When and only when bootstrap completes successfully will the safe backup be deleted. There is nothing more frustrating than spending 10-20 minutes setting up make.conf, only to have a psychotic shell script stomp all over it.
Whooa! Even better idea. Change ebuild so that it does not use make.conf directly, but instead copies make.conf to make.conf.work. Also have it check for the existence of make.conf.bootstrap, which will be created/deleted by bootstrap.sh. If that file exists, then use that instead. the user's make.conf would be safe from assault then.
the "psychotic shell script" won't be a problem any further. THere have been changes made to the portage build that will take care of this. Thanks for the input, these changes are in place now and will be reflected with next portage release available. Basically now, when USE="build" (as it set by bootstrap.sh) it will no longer even attempt to put in a make.conf file, therefore eliminating this whole mess in one fell swoop. No backup file, no swapping, etc. Given the extremly vocal responses we are getting with this "psychotic shell script" this is solved for good. Closing this bug now.