Allow external modules to wrap mozboot and add packages

RESOLVED FIXED in mozilla29

Status

Firefox Build System
General
RESOLVED FIXED
4 years ago
3 months ago

People

(Reporter: ahal, Assigned: ahal)

Tracking

26 Branch
mozilla29
x86_64
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
My use case is, you guessed it, B2G. The B2G prerequisites are mostly the same as Firefox's plus some additional packages. I'd like to create a mach command that hooks into mozboot, adds these additional packages to the list to install and then runs the mozboot install like normal.

Currently this is impossible because the packages are just a hardcoded string that is defined in the call to the install function. But all that's needed is to pull that list out and define it in __init__ instead.
(Assignee)

Comment 1

4 years ago
Created attachment 8366622 [details] [diff] [review]
mozboot_extend

I'd also like to get mozboot on pypi so that this command doesn't require a source checkout to work.
Attachment #8366622 - Flags: review?(gps)

Comment 2

4 years ago
Did you see the code in bin/bootstrap.py that loads missing Python modules from https://hg.mozilla.org/? You don't need a source checkout to run mozboot. You can download that single file and run it in isolation.

Comment 3

4 years ago
Comment on attachment 8366622 [details] [diff] [review]
mozboot_extend

Review of attachment 8366622 [details] [diff] [review]:
-----------------------------------------------------------------

The bug description doesn't match what was done in this patch. But this is a good refactor, so I'll take it.

Bonus points if you split the OS X bits into two code paths depending on whether Homebrew or MacPorts is being used :)
Attachment #8366622 - Flags: review?(gps) → review+
(Assignee)

Comment 4

4 years ago
(In reply to Gregory Szorc [:gps] from comment #2)
> Did you see the code in bin/bootstrap.py that loads missing Python modules
> from https://hg.mozilla.org/? You don't need a source checkout to run
> mozboot. You can download that single file and run it in isolation.

I did not, cool! I guess this way it stays up to date.

(In reply to Gregory Szorc [:gps] from comment #3)
> Bonus points if you split the OS X bits into two code paths depending on
> whether Homebrew or MacPorts is being used :)

On B2G the osx prereqs are hairy enough that a semi-official shell script was made to automate everything (minus the xcode setup). So I'd rather just call that as it will probably be better maintained than whatever I would end up implementing. Sorry :)

Comment 5

4 years ago
Or you could fight the good fight and get the B2G stuff converted to Python, possibly moved into mozboot :)
(Assignee)

Comment 6

4 years ago
(In reply to Gregory Szorc [:gps] from comment #5)
> Or you could fight the good fight and get the B2G stuff converted to Python,
> possibly moved into mozboot :)

I think that is a few stages away from the current where we are currently ;). Right now I can't even land a mach command in the repo without it getting backed out. For now I'm trying the "build it and they will come" approach.

https://hg.mozilla.org/integration/mozilla-inbound/rev/6e77ceef4ebd

Comment 7

4 years ago
(In reply to Andrew Halberstadt [:ahal] from comment #6)
> I think that is a few stages away from the current where we are currently
> ;). Right now I can't even land a mach command in the repo without it
> getting backed out.

Other than bug 867817, is there somewhere else you are receiving pushback?
(Curious to know if there are yet more bugs in which B2G is inflicting it's pain on everyone as normal)

Comment 8

4 years ago
(I couldn't find a backout)

Comment 9

4 years ago
https://hg.mozilla.org/mozilla-central/rev/6e77ceef4ebd
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
(Assignee)

Comment 10

4 years ago
(In reply to Ed Morley [:edmorley UTC+0] from comment #7)
> Other than bug 867817, is there somewhere else you are receiving pushback?
> (Curious to know if there are yet more bugs in which B2G is inflicting it's
> pain on everyone as normal)

Just bug 937594. I haven't tried since then, but I figured if something as simple as clobber gets backed out, the chances of something more complicated are slim to none.
By the time they come around to switching, they'll likely have converted all the shell to some node.js flavor-of-the-day solution. Don't get me wrong, that will be a step in the right direction. Unfortunately, it likely won't interop well with m-c. Oh well.

Updated

3 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.