Bootstrap script should guide users towards `./mach bootstrap` if repo is already cloned
Categories
(Firefox Build System :: Bootstrap Configuration, enhancement, P2)
Tracking
(firefox96 fixed)
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: nyanpasu64, Assigned: surajeet310)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0
Steps to reproduce:
- On Arch Linux, run
curl https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py -O
. python3 bootstrap.py
and proceed through the wizard.- When it asks
Would you like to run a configuration wizard to ensure Mercurial is optimally configured? (Yn):
, press Enter and proceed through the wizard.
Actual results:
When bootstrap tries to enable fsmonitor, I get a message: The "watchman" filesystem watching tool could not be found or isn't working.
If I install watchman and run python3 bootstrap.py
again, it won't let me run the script again with the same path:
ERROR! Destination directory /home/nyanpasu64/code/mozilla-unified exists but is nonempty.
I had to workaround this by stubbing out validate_clone_dest()
and editing hg_clone_firefox()
to not call hg init
.
Expected results:
The script gives the user a choice to either check again for watchman, or skip enabling watchman.
Alternatively the script could download watchman for you (as requested in Bug 1700204).
Reporter | ||
Comment 1•3 years ago
|
||
As an additional issue, I edited the script to skip the directory check and hg init. However, it failed to add evolve
to the hg config because the clone already exists:
Would you like to enable the evolve extension? (Yn)
destination '/home/nyanpasu64/.mozbuild/evolve' is not empty
Could not clone the evolve extension for installation.
You can install evolve yourself with
$ pip install --user hg-evolve
and then enable the extension via
$ hg config -e
I didn't want to install hg-evolve using pip, because there's already a perfectly good copy in ~/.mozbuild. And I didn't know what to add to hg config -e
to enable either a pip-installed or bootstrap-installed hg-evolve.
I decided to rm -rf /home/nyanpasu64/.mozbuild/evolve
and run bootstrap.py again (which clones it again even though it already exists), which more-or-less worked.
Afterwards I checked to see what line bootstrap.py added to hg config -e
. Turns out it's evolve = /home/nyanpasu64/.mozbuild/evolve/hgext3rd/evolve
... which I had no way of knowing ahead of time.
Comment 2•3 years ago
|
||
Heh, the standalone bootstrap script usage can be a little confusing.
The intended workflow here is to do the following:
- Download
bootstrap.py
- Run
bootstrap.py
(repo is bootstrapped, tooling is bootstrapped automatically) - (Now that you have a local clone) Delete
bootstrap.py
, do all work within the repo itself - If you need to re-do the tooling bootstrapping, then run
./mach bootstrap
.
The distinction between bootstrap.py
and ./mach bootstrap
can be vague to new builders, and we should improve it.
One simple solution here is to modify bootstrap.py
to be more intelligent if the target repo already exists, and to provide more useful instructions in such a case.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
The modified script :
- Guides the user after the first successful clone to opt for './mach bootstrap',if the user wants to re do the tooling bootstraping .
- Prompts the user an option to remove the standalone 'bootstrap.py' script as it isn't required anymore .
- Guides the user to run './mach bootstrap' instead of 'python3 bootstrap.py', provided the repository is already cloned .
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/905c8a32aa69 Modified 'bootstrap.py' script from python/mozboot/bin r=mhentges
Comment 5•2 years ago
|
||
bugherder |
Description
•