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)

x86_64
Linux
defect
Not set
normal

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.
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)
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.
that makes sense.
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.
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 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)
Whiteboard: [p=3]
Target Milestone: --- → 2.1 S2 (15aug)
Leila, you are right, I will change |override| to |append|, thanks your observation.
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 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+
bug 1050709 is filed for move it into pre-app.js.
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.

Attachment

General

Created:
Updated:
Size: