Closed Bug 1376392 Opened 8 years ago Closed 8 years ago

mozboot: ensure_stylo_packages fails in stand-alone bootstrap

Categories

(Firefox Build System :: General, defect, P2)

defect

Tracking

(firefox56 fixed)

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: rillian, Assigned: froydnj)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I tried bootstrapping directly from python/mozboot/bin/bootstrap.py a a fresh machine today and it seems we're failing to find the correct mach to install libclang for stylo: Traceback (most recent call last): File "/Users/mozilla/Downloads/bootstrap.py", line 170, in <module> sys.exit(main(sys.argv)) File "/Users/mozilla/Downloads/bootstrap.py", line 161, in main dasboot.bootstrap() File "/var/folders/js/1gxgwh1s2qnglt201d39b2wh0000gn/T/tmpOK35gA/mozboot/bootstrap.py", line 341, in bootstrap File "/var/folders/js/1gxgwh1s2qnglt201d39b2wh0000gn/T/tmpOK35gA/mozboot/osx.py", line 526, in ensure_stylo_packages File "/var/folders/js/1gxgwh1s2qnglt201d39b2wh0000gn/T/tmpOK35gA/mozboot/base.py", line 280, in install_tooltool_clang_package ValueError: mach not found at /Users/mozilla/.config/nvim/mach
Priority: -- → P2
The issue turns out to be I invoked bootstrap.py in `/.config/nvim, which is a dotfile directory under version control. We assume we have an m-c checkout if there's a .git directory present, and then decide to invoke mach. So definitely a corner case, but it seems like something which could happen to other people. We could check for some well-known files in the top-level directory as a better heuristic.
Assignee: nobody → nfroyd
When determining the path of a possible mozilla-central checkout, bootstrap currently considers the existence of a `.git` directory as sufficient proof that the containing directory is a git checkout. Unfortunately, if you happen to execute standalone bootstrap from a git checkout of something else, you're gonna have a bad time. To prevent this, check for the existence of a moz.configure file. This is not an ideal proof, but it is better than what we currently have.
Attachment #8882419 - Flags: review?(giles)
Why not just check that the bootstrap.py path is python/mozboot/mozboot/bootstrap.py in that directory that contains a .git? (same for .hg, btw)
(In reply to Mike Hommey [:glandium] from comment #3) > Why not just check that the bootstrap.py path is > python/mozboot/mozboot/bootstrap.py in that directory that contains a .git? > (same for .hg, btw) We talked about using the bootstrap file. I am ambivalent to the exact file being used.
Comment on attachment 8882419 [details] [diff] [review] do a more thorough check for git checkouts of mozilla-central in bootstrap Review of attachment 8882419 [details] [diff] [review]: ----------------------------------------------------------------- r=me with issues addressed. ::: python/mozboot/mozboot/bootstrap.py @@ +297,5 @@ > dest = os.path.expanduser(dest) > have_clone = clone_firefox(self.instance.which('hg'), dest) > checkout_root = dest > > + have_clone=True This looks spurious? @@ +472,3 @@ > elif os.path.exists(git_dir): > + moz_configure = os.path.join(path, 'moz.configure') > + Remove the blank line here.
Attachment #8882419 - Flags: review?(giles) → review+
Pushed by nfroyd@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/0dd4dc37770d do a more thorough check for git checkouts of mozilla-central in bootstrap; r=rillian
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: