Closed Bug 982093 Opened 8 years ago Closed 8 years ago

Single variant builds are broken when flashing Gaia & Gecko together

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S2 (23may)

People

(Reporter: albert, Assigned: albert)

Details

(Whiteboard: [systemsfe])

Attachments

(1 file)

Single variant is not working when building a full build. It only works when distribution folder is in gaia folder, but the following command doesn't enable single variant:

MOZILLA_OFFICIAL=1 GAIA_DISTRIBUTION_DIR=../single-variant/ make production
(In reply to Albert [:albert] from comment #0)
> Single variant is not working when building a full build. It only works when
> distribution folder is in gaia folder, but the following command doesn't
> enable single variant:
> 
> MOZILLA_OFFICIAL=1 GAIA_DISTRIBUTION_DIR=../single-variant/ make production

What do you mean by full build?

To my understanding, flashing Gaia directly with a Gaia customization worked the last time John tested it. So I'm a bit confused by this bug.
(In reply to Jason Smith [:jsmith] from comment #1)
> (In reply to Albert [:albert] from comment #0)
> > Single variant is not working when building a full build. It only works when
> > distribution folder is in gaia folder, but the following command doesn't
> > enable single variant:
> > 
> > MOZILLA_OFFICIAL=1 GAIA_DISTRIBUTION_DIR=../single-variant/ make production
> 
> What do you mean by full build?
> 
> To my understanding, flashing Gaia directly with a Gaia customization worked
> the last time John tested it. So I'm a bit confused by this bug.

Yes, flashing gaia works fine. I mean:

MOZILLA_OFFICIAL=1 GAIA_DISTRIBUTION_DIR=../single-variant/firefox-gaia-testsbuild/ ./build.sh && ./flash.sh -f

I'm trying to reproduce, it works sometimes.
Okay - going to add clarification in the title that this requires flashing gaia & gecko together.
Summary: Single variant builds are broken → Single variant builds are broken when flashing Gaia & Gecko together
Note - we're probably going to be stuck with this bug for 1.3 given how late in the game we are. However, we probably should document the workaround here in the Market Customization wiki, so that our partners know how to get around this known issue.
The root of the problem is caused by the 'persist' folder used to keep single variant configuration when a factory reset is done. The following command in buri does not erase the folder and causes invalid single variant configuration when the device has been already flashed with a different single variant configuration and 'persist' folder is not deleted manually. As a workaround, we can erase it by hand, for example:

MOZILLA_OFFICIAL=1 GAIA_DISTRIBUTION_DIR=/home/acperez/ssd/OWD/single-variant/ ./build.sh && adb shell rm -r /persist/svoperapps && sudo ./flash.sh -f
Assignee: nobody → acperez
As said in comment 5 the problem is that persist partition is not created / erased / modified when flashing. So I think we can do nothing to fix it, just add a note to the wiki.
Yuren what do you think?
Flags: needinfo?(yurenju.mozilla)
Component: General → Gaia::Build
Flags: needinfo?(yurenju.mozilla)
according comment 5 we better patch flash.sh[1] in B2G respotiroy to solve this issue, but that's not part of gaia build system.

[1] https://github.com/mozilla-b2g/B2G/blob/master/flash.sh
Component: Gaia::Build → General
Attached file Patch
Attachment #8399421 - Flags: review?(mwu)
The review is pending since one week ago, are you the right person to do that review?
Flags: needinfo?(mwu)
Are you available on irc? I'd like to understand single variant builds a bit better.
Flags: needinfo?(mwu)
(In reply to Michael Wu [:mwu] from comment #11)
> Are you available on irc? I'd like to understand single variant builds a bit
> better.

Yes, my nickname is acperez
Whiteboard: [systemsfe]
Target Milestone: --- → 2.0 S2 (23may)
Comment on attachment 8399421 [details]
Patch

Based on what we discussed on IRC, this seems to be the easiest solution for now. There is one change I would like though - try to delete /persist/svoperapps *before* rebooting into fastboot. This will ensure that we never reboot with stale single variant info after flashing.
Attachment #8399421 - Flags: review?(mwu)
Comment on attachment 8399421 [details]
Patch

Changes from comment 13
Attachment #8399421 - Flags: review?(mwu)
Attachment #8399421 - Flags: review?(mwu) → review+
Master: https://github.com/mozilla-b2g/B2G/commit/a6e6e360f2d4c65606a988e3a11e617294c07a2b
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.