Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17394 - Please fix bootstrap.sh
Summary: Please fix bootstrap.sh
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-12 14:55 UTC by Tim Hosking
Modified: 2003-03-13 16:25 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Hosking 2003-03-12 14:55:59 UTC
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.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-12 17:55:09 UTC
Ok, I said what I did in the previous 20 bugs about this.  Somebody else
handle this this time around, thanks.
Comment 2 Mark Guertin 2003-03-12 21:31:59 UTC
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 :) 
Comment 3 Tim Hosking 2003-03-13 15:48:32 UTC
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.
Comment 4 Tim Hosking 2003-03-13 15:55:55 UTC
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.
Comment 5 Mark Guertin 2003-03-13 16:25:50 UTC
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.