Closed Bug 964744 Opened 10 years ago Closed 10 years ago

Allow external modules to wrap mozboot and add packages

Categories

(Firefox Build System :: General, defect)

26 Branch
x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla29

People

(Reporter: ahal, Assigned: ahal)

Details

Attachments

(1 file)

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.
Attached patch mozboot_extendSplinter Review
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)
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 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+
(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 :)
Or you could fight the good fight and get the B2G stuff converted to Python, possibly moved into mozboot :)
(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
(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)
(I couldn't find a backout)
https://hg.mozilla.org/mozilla-central/rev/6e77ceef4ebd
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
(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.
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: