Closed Bug 867031 Opened 11 years ago Closed 11 years ago

[CustomizeUI] Cannot preload contacts during build time

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:tef+, firefox23 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)

VERIFIED FIXED
blocking-b2g tef+
Tracking Status
firefox23 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed

People

(Reporter: askeing, Assigned: askeing)

References

Details

(Whiteboard: [customization])

Attachments

(2 files)

### ENV:
inari
gaia mozillaorg/v1.0.1 10ec5e239b901ff23e290a1fc7a898bcf6ea29a7
gecko mozillaorg/v1.0.1 fd004d71261d0dd8ebdcd659df6c21e29d7c2b2f

### STR:
1. prepare the v1.0.1 B2G for inari, config it.
2. download gaia-distribution-sample.zip file, then unzip into gaia/distribution folder.
3. build
4. flash onto inari
5. power on, then open Contacts app.

### Expected:
There are preloaded contacts in contacts list.

### Actually:
No preloaded contacts.
Whiteboard: [customization]
Not sure who's at fault here, bug 861462 or the example.zip.
Depends on: 861462
With the same contacts.json, running "make production" under gaia folder is fine.
However, it doesn't work by running "./build.sh" under B2G project folder, then flashing into device.
"make production" and "make reset-gaia" will do "install-default-data".
And it will push profile/contacts.json to /system/b2g/defaults/contacts.json from pc to device.

But gonk-misc/Android.mk do not copy contacts.json from gaia/profile/contacts.json to out folder during B2G build time.
Attachment #749155 - Flags: review? → review?(mwu)
Can you move all files in gaia that need to be in /system/b2g/defaults/ to profile/defaults/ ? Then gonk-misc can just copy the contents of gaia/profile/defaults and we won't have to worry about adding new files in the future.
Attachment #749155 - Flags: review?(mwu)
Assignee: nobody → fyen
Attached file Gaia Part: PR#9777
Gaia part.
Added new task for creating "profile/defaults" folder.
Attachment #749698 - Flags: review?(yurenju.mozilla)
Comment on attachment 749155 [details]
Gonk park: PR of Android.mk change

Copying default data from "gaia/profile/defaults" to out folder base on comment 5.
Attachment #749155 - Attachment description: PR of Android.mk change → Gonk park: PR of Android.mk change
Attachment #749155 - Flags: review?(mwu)
This build issue is about customization, I'm not sure does it should be tef+ ?
blocking-b2g: --- → tef?
Comment on attachment 749698 [details]
Gaia Part: PR#9777

redirect review to Tim for load balancing...
Attachment #749698 - Flags: review?(yurenju.mozilla) → review?(timdream)
Comment on attachment 749698 [details]
Gaia Part: PR#9777

I wonder if profile/defaults/pref/user.js is the correct place to put this file? Also, why do we need to do s/pref/user_pref/g ?

Please leave a comment on that, just for the record, thanks. Otherwise this patch looks fine.
Attachment #749698 - Flags: review?(timdream) → review+
Also, we should probably clean up the approach in this patch with |install-default-data| target. We should file a follow up bug on this.
Comment on attachment 749155 [details]
Gonk park: PR of Android.mk change

Looks good. Not sure if we need the -f for cp, though I don't care too much either way. Mind rebasing your change so it's just one commit, and then merging?
Attachment #749155 - Flags: review?(mwu) → review+
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) from comment #10)
> Comment on attachment 749698 [details]
> Gaia Part: PR#9777
> 
> I wonder if profile/defaults/pref/user.js is the correct place to put this
> file? Also, why do we need to do s/pref/user_pref/g ?
> Please leave a comment on that, just for the record, thanks. Otherwise this
> patch looks fine.
It moved from gonk-misc, see
  https://github.com/mozilla-b2g/gonk-misc/pull/88/files#L0R184

Also, I found the origin commit here https://github.com/mozilla-b2g/gonk-misc/commit/4d61727f883e7b911a5343f9ad3a16d7b07ff061#Android.mk
(In reply to Michael Wu [:mwu] from comment #12)
> Comment on attachment 749155 [details]
> Gonk park: PR of Android.mk change
> 
> Looks good. Not sure if we need the -f for cp, though I don't care too much
> either way. Mind rebasing your change so it's just one commit, and then
> merging?
Removed -f of cp, and rebased the commits.
Is this affecting the way our partners are creating the commercial builds?
Flags: needinfo?
(In reply to Daniel Coloma:dcoloma from comment #15)
> Is this affecting the way our partners are creating the commercial builds?

If they are preloading contacts from a built system.img, they would need both this bug and bug 861462.
Flags: needinfo?
Can our partners comment if this affecting the way in which they create the builds?
Flags: needinfo?(Firefox_Mozilla)
Flags: needinfo?(mei.kong)
Depends on: 872522
Um, why did this land without the gaia part?
(In reply to Michael Wu [:mwu] from comment #19)
> Um, why did this land without the gaia part?

My bad. Gaia part is now merged and I am waiting Askeing to file a new gonk-misc pull request.

/me should learn not to merge code before leaving office.
comment 0 here indicates 1.01 is affected here. I'm guessing all branches are affected as a result.
blocking-b2g: tef? → tef+
Our partners are going to generate a build tomorrow, can we uplift this to 1.0.1 today?
Flags: needinfo?(jhford)
gonk-misc v1-train: 9d6f199f22320121a5e833dd0ee8e6ef75fd9f7e
gonk-misc v1.0.1: 662cd4b3c489799650fe380a4ea4b6e0d82a6443
b2g-manifest v1-train: 9c364982db1a3ca0467b7810951907f406e79c99
b2g-manifest v1.0.1: ab9e458a42c90f35356a2c8429b3dd7264754a6f

This does not apply cleanly to the gaia Makefile:

++<<<<<<< HEAD
++=======
+ # create default data, gonk-misc will copy this folder during B2G build time
+ create-default-data: preferences profile/settings.json contacts
+       # create a clean folder to store data for B2G, this folder will copy to b2g output folder.
+       rm -rf profile/defaults
+       mkdir -p profile/defaults/pref
+       # rename user_pref() to pref() in user.js
+       sed s/user_pref\(/pref\(/ profile/user.js > profile/defaults/pref/user.js
+       cp profile/settings.json profile/defaults/settings.json
+ ifdef CONTACTS_PATH
+       cp profile/contacts.json profile/defaults/contacts.json
+ endif
++>>>>>>> 45d2fb6... Merge pull request #9777 from askeing/Bug_867031

I'm not sure what dependencies this rule has on things that aren't present in v1-train or v1.0.1, so could someone who knows this code a little better take a look?
Flags: needinfo?(jhford) → needinfo?(fyen)
++<<<<<<< HEAD
++=======
It seems like an empty, I think we can resolve the conflict by remove it.

Tim, can you help on this?
Flags: needinfo?(fyen) → needinfo?(timdream)
the partner builds can preload the contacts now.
Status: RESOLVED → VERIFIED
Flags: needinfo?(mei.kong)
Flags: needinfo?(Firefox_Mozilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: