[CustomizeUI] Cannot preload contacts during build time

VERIFIED FIXED

Status

Firefox OS
Gaia::System
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: askeing, Assigned: askeing)

Tracking

unspecified
All
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

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

Details

(Whiteboard: [customization])

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
### 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.
(Assignee)

Updated

5 years ago
Whiteboard: [customization]
Not sure who's at fault here, bug 861462 or the example.zip.
Depends on: 861462
(Assignee)

Comment 2

5 years ago
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.
(Assignee)

Comment 3

5 years ago
"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.
(Assignee)

Comment 4

5 years ago
Created attachment 749155 [details]
Gonk park: PR of Android.mk change
Attachment #749155 - Flags: review?
(Assignee)

Updated

5 years ago
Attachment #749155 - Flags: review? → review?(mwu)

Comment 5

5 years ago
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.

Updated

5 years ago
Attachment #749155 - Flags: review?(mwu)

Updated

5 years ago
Assignee: nobody → fyen
(Assignee)

Comment 6

5 years ago
Created attachment 749698 [details]
Gaia Part: PR#9777

Gaia part.
Added new task for creating "profile/defaults" folder.
Attachment #749698 - Flags: review?(yurenju.mozilla)
(Assignee)

Comment 7

5 years ago
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)
(Assignee)

Comment 8

5 years ago
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 12

5 years ago
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+
(Assignee)

Comment 13

5 years ago
(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
(Assignee)

Comment 14

5 years ago
(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)

Updated

5 years ago
Flags: needinfo?(mei.kong)
Depends on: 872522

Comment 19

5 years ago
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.
gonk-misc: https://github.com/mozilla-b2g/gonk-misc/commit/35612c6ff764b43db4d3e43761b79eeeb88b6fc9
gaia: https://github.com/mozilla-b2g/gaia/commit/45d2fb61e01065b97d9a98ef9891f8db53785893
Status: NEW → RESOLVED
Last Resolved: 5 years ago
status-b2g18: --- → ?
status-b2g18-v1.0.0: --- → wontfix
status-b2g18-v1.0.1: --- → ?
status-firefox23: --- → fixed
Resolution: --- → FIXED
comment 0 here indicates 1.01 is affected here. I'm guessing all branches are affected as a result.
status-b2g18: ? → affected
status-b2g18-v1.0.1: ? → affected

Updated

5 years ago
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)
(Assignee)

Comment 26

5 years ago
++<<<<<<< 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)
(Assignee)

Comment 29

5 years ago
the partner builds can preload the contacts now.
Status: RESOLVED → VERIFIED

Updated

5 years ago
Flags: needinfo?(mei.kong)
Flags: needinfo?(Firefox_Mozilla)
You need to log in before you can comment on or make changes to this bug.