Closed Bug 945903 Opened 11 years ago Closed 11 years ago

Default eng app install directory to /system/b2g

Categories

(Firefox OS Graveyard :: Gaia, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kgrandon, Assigned: kgrandon)

References

Details

(Whiteboard: [c= p=1 s= u=])

Attachments

(1 file)

Applications in gaia may be installed in either /data/ or /system/. I believe this was done historically as /data/ was faster than /system/. If this is no longe the case, we should unify all of our applications under a single directory as this can be a pain point for developers. (They will try installing an application with the Makefile, and it will not be updated in the correct location). Potential place to look: http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#360
Michael - I don't really know the history here, but I was wondering if you had any idea about this?
Flags: needinfo?(mwu)
The historical reason is that /system was too small to hold all the test apps for gaia. Also, we need to use /data for installed apps since /system is read-only. I really don't want any platform change here, but feel free to move the eng builds to push apps to /system instead of /data.
I think /data and /system partitions should've been at the same speed way back at the beginning. They're both on the same flash and use the same file systems. The /data location was first supported and I think it just stuck. We should default to /system for default gaia/system apps though. It makes the most sense to me and it's how production devices actually run. We often run into trouble because gaia defaults to /data but production devices default to /system.
Flags: needinfo?(mwu)
Summary: See if we can consolidate app installation locations → Default eng app install directory to /system/b2g
Whiteboard: [c= p=1 s= u=]
Assignee: nobody → kgrandon
Status: NEW → ASSIGNED
Comment on attachment 8342039 [details] Pull request - Default eng app install directory Fabrice - since you know about this, could you either review or re-assign this for review? Thanks! As this may impact people on eng builds today, I will send out an email to the lists when landed.
Attachment #8342039 - Flags: review?(fabrice)
Comment on attachment 8342039 [details] Pull request - Default eng app install directory Looks good to me, but you should get a build peer review too.
Attachment #8342039 - Flags: review?(fabrice) → review+
Comment on attachment 8342039 [details] Pull request - Default eng app install directory Hi Yuren - would you have a minute to review this one? Thanks!
Attachment #8342039 - Flags: review?(yurenju.mozilla)
Comment on attachment 8342039 [details] Pull request - Default eng app install directory please remove Makfile:162-164[1] since it's unnecessary anymore, r=yurenju [1] https://github.com/KevinGrandon/gaia/blob/44331ee2ecb2c296ef113219ecdad97f7018aa0e/Makefile#L162-L164
Attachment #8342039 - Flags: review?(yurenju.mozilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Depends on: 946480
Note: one occurence of B2G_SYSTEM_APPS still exists and therefore is useless. Should remove it in an follow-up patch ;)
(In reply to Julien Wajsberg [:julienw] from comment #10) > Note: one occurence of B2G_SYSTEM_APPS still exists and therefore is > useless. Should remove it in an follow-up patch ;) Thanks, I'll do this in bug 946480.
(In reply to Fabrice Desré [:fabrice] from comment #2) > The historical reason is that /system was too small to hold all the test > apps for gaia. I believe this is still true. How do we want to address this now?
Some phone have smaller system partition than another. This will break workflow for people working on these phones. We have a lot of phones being ported to B2G, sometimes by partners, so it's impossible to say for sure putting all test apps into /system/b2g will not cause issues somewhere on this Earth. I would like to see more elegant approach like what I have told Yuren a long time ago. Maybe Gaia build script should send apps to *both* partitions for eng builds -- send our core apps to /system/b2g and other removable test apps to /local/data. Not sure if it's doable but it would be nice if you and Yuren could find out. Thanks. PS If this patch DID cause issues somewhere we would have to back this out. Sorry about that. Kevin, Yuren, ideas?
Flags: needinfo?(yurenju.mozilla)
Flags: needinfo?(kgrandon)
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #12) > (In reply to Fabrice Desré [:fabrice] from comment #2) > I believe this is still true. How do we want to address this now? I thought most of the larger apps went into the showcase_apps directory including crystal_skull and cubevid. As this directory is not included by default with eng builds I don't really see this as being a problem. I would like to wait and see if there are any problems for the time being, and if they are we can always back this out or utilize the GAIA_INSTALL_PARENT flag where necessary.
Flags: needinfo?(kgrandon)
One elegant approach we may be able to take is to prod the filesystem a bit to see if there is an existing installed application in either /system or /data, and install in the appropriate location. This would also solve the problem, but is slightly more work.
(In reply to Kevin Grandon :kgrandon from comment #14) > (In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from > comment #12) > > (In reply to Fabrice Desré [:fabrice] from comment #2) > > I believe this is still true. How do we want to address this now? > > I thought most of the larger apps went into the showcase_apps directory > including crystal_skull and cubevid. As this directory is not included by > default with eng builds I don't really see this as being a problem. > > I would like to wait and see if there are any problems for the time being, > and if they are we can always back this out or utilize the > GAIA_INSTALL_PARENT flag where necessary. I see. Look like you have already given some thought about this. Thanks!
it's doable but we need define which apps is core apps. For the situation which Tim mentioned, I think it wouldn't be a problem because we already have nightly engineering image which is installed test apps in /system/b2g, installing apps into /data/local only happend when we use |make reset/install-gaia| without PRODUCTION=1 and partner also can use distribution mechanism to pick apps which they want to preload.
Flags: needinfo?(yurenju.mozilla)
(In reply to Kevin Grandon :kgrandon from comment #15) > One elegant approach we may be able to take is to prod the filesystem a bit > to see if there is an existing installed application in either /system or > /data, and install in the appropriate location. This would also solve the > problem, but is slightly more work. The work is already done in [1] (will have to update it to use GAIA_INSTALL_PARENT instead of B2G_SYSTEM_APPS). I never found the right way to include this in the main flash system, I think it would involve moving the install-gaia steps out of the Makefile, and that was more work that I was willing to do. I also recall that Naoki included part of "gf" into B2G's ./flash.sh in bug 915034 and you may need to change this too. That said, I'm generally happy with this change as this probably fixes other bugs in the process (eg bug 850218). Let's see how it goes. [1] https://github.com/julienw/config-files/blob/master/gf
Note, I updated my "gf" script to work with the new configuration. Should still work for older code as well. I just use GAIA_INSTALL_PARENT instead of B2G_SYSTEM_APPS.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: