Move indexedDB databases and push settingsDB #46

Closed
wants to merge 2 commits into
from

Projects

None yet

4 participants

@gregorwagner
Member

IndexedDB databases are moving from the profile folder to /data/local. We want to preserve the existing ones and also push a new settingsDB each time we flash gecko.

@michaelwu
Member

Recapping the discussion on #B2G, I basically asked for

  1. Autogenerating the settings db from settings.js at first startup.
  2. Deleting the settings db on gecko updates to force autoregeneration of the settingsDB
@michaelwu
Member

@cgjones, gregor wants your input before doing making the suggested changes.

@joneschrisg
Member

In (2), what does "gecko update" mean specifically?

@michaelwu
Member

In (2), I mean ./flash.sh gecko. For real OTA gecko updates, we should support upgrading the settings db.

@joneschrisg
Member

I'm fine with blowing away settings on gecko "reflash".

I don't think we should regenerate when gecko starts up. I think it would be better to generate a "default DB" and package it along with gecko (like we'll need to do for gaia) and restore that if the DB is missing on /data. But a settings.js is a step in that direction.

@joneschrisg
Member

(This is based on the assumption that running a bunch of SQL per DB is slower than unzipping a lot of data in one fell swoop.)

@michaelwu
Member

It only generates the db on first startup. I don't think first startup db generation is worth optimizing for the amount of complexity it brings in.

@joneschrisg
Member

That may be true from the perspective of settings, but then you're spreading this complexity around to every part of gecko that needs a DB restored into /data on wipe/first boot.

@michaelwu
Member

Gecko already has this complexity for every database in the profile. Every database can handle being deleted.

@timdream timdream commented on the diff Sep 4, 2012
@@ -114,6 +114,8 @@ case "$1" in
"gecko")
$ADB remount &&
$ADB push $GECKO_OBJDIR/dist/b2g /system/b2g &&
+ $ADB shell 'if test -d $echo /data/b2g/mozilla/*.default/indexedDB && test ! -d /data/local/indexedDB; then mv $echo /data/b2g/mozilla/*.default/indexedDB /data/local/; fi'&&
+ make -C gaia install-settingsdb ADB="$ADB" &&
@timdream
timdream Sep 4, 2012 Mozilla-B2G member

@cgjones @michaelwu Hey, what's the status of this pull request? I don't mind we take a loooong time to figure out what's right for production phones, but right now people are dogfooding Otoro phones without proper Settings database. I am told by @gregorwagner that this line is the right way to fix the situation, and I have been telling QAs to flash settings databases after every ./flash.sh.

Can this be fixed soon?

@michaelwu
Member

Gecko now restores the settings db from a json file when one isn't available.

@michaelwu michaelwu closed this Nov 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment