Closed
Bug 1039219
Opened 12 years ago
Closed 12 years ago
Migrate all snippets for preferences in Makefile to preferences.js
Categories
(Firefox OS Graveyard :: Gaia::Build, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.1 S2 (15aug)
People
(Reporter: yurenju, Assigned: yurenju)
References
Details
(Whiteboard: [p=3])
Attachments
(1 file)
it is not necessary to handle preferences stuffs both in Makefile and preferences.js, we can migrate it into preferences.js.
| Assignee | ||
Comment 1•12 years ago
|
||
George, could you review this pr?
I have verified:
1. DOGFOOD=1 make preferences
2. PRODUCTION=1 make preferences
3. make preferences
all result is same between master and my branch, additional we have build.test.js to check preference between engineer and produciton mode.
and we also should file another bug to move preference rule to pre-app or post-app.
Attachment #8456771 -
Flags: review?(gduan)
| Assignee | ||
Comment 2•12 years ago
|
||
Nice Yuren, how about changing the override and overridePreferences function names to "add" or "append" and "addPreference" or "appendPreference"? For bug 1037395, I'm thinking of adding a flag, something like override=true/false to this function.
| Assignee | ||
Comment 4•12 years ago
|
||
that makes sense.
| Assignee | ||
Comment 5•12 years ago
|
||
but we should always orverride preference if we have the same one come from EXTENDED_PREF_FILES or PARTNER_PREF_FILES.
for bug 1037395, we can execute extended and partner javascript and create a |user_pref()| in sandbox to store pref in a object, then we can override preference without string processing or regex.
like this: https://github.com/mozilla-b2g/gaia/blob/master/build/test/integration/helper.js#L6-L20
that is for nodejs, but we need to have a xpcshell environment version.
| Assignee | ||
Comment 6•12 years ago
|
||
so I will keep using override/overridePreference
According to Makefile EXTENDED_PREF_FILES are optional files that may be provided to _extend_ the set of default preferences installed for gaia while PARTNER_PREF_FILES are optional partner provided preference files while will be added after the ones on the EXTENDED_PREF_FILES. I'm not sure if the comments are relevant, but if you think they should be treated the same and have a check for both to override, then we will do so.
Comment 8•12 years ago
|
||
Comment on attachment 8456771 [details] [review]
github PR: https://github.com/mozilla-b2g/gaia/pull/21809
Tbpl fails due to getFile(GAIA_DISTRIBUTION_DIR).
Please fix it.
For the rest parts looks good looks good. It keeps the same logic as original makefile.
Attachment #8456771 -
Flags: review?(gduan)
| Assignee | ||
Updated•12 years ago
|
Whiteboard: [p=3]
Target Milestone: --- → 2.1 S2 (15aug)
| Assignee | ||
Comment 9•12 years ago
|
||
Leila, you are right, I will change |override| to |append|, thanks your observation.
| Assignee | ||
Comment 10•12 years ago
|
||
| Assignee | ||
Comment 11•12 years ago
|
||
Comment on attachment 8456771 [details] [review]
github PR: https://github.com/mozilla-b2g/gaia/pull/21809
looks good.
George, can you review this pr? I also added unit test for it.
Attachment #8456771 -
Flags: review?(gduan)
Comment 12•12 years ago
|
||
Comment on attachment 8456771 [details] [review]
github PR: https://github.com/mozilla-b2g/gaia/pull/21809
Patch looks fine. I think we can put this task into pre-app.js.
Attachment #8456771 -
Flags: review?(gduan) → review+
| Assignee | ||
Comment 13•12 years ago
|
||
bug 1050709 is filed for move it into pre-app.js.
| Assignee | ||
Comment 14•12 years ago
|
||
rebase, squash and add more unit test:
https://tbpl.mozilla.org/?rev=18bc91795b0e32c6676c655c6d3a2788da283e0b&tree=Gaia-Try
| Assignee | ||
Comment 15•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•