On Wed, Jul 31, 2013 at 08:02:35AM +0100, Roberto Alsina wrote: > At the sprint the whole application upgrade story is being talked about, > and I have a technical doubt: > > What happens to a running app when you update its click package? > > Obviously since app lifecycle[1] means it could be killed while it's > upgraded, then maybe it has to reload its state from a archive created by > the previous version. That's not our problem, it's on the app developer's > hands. > > OTOH, what happens if it's *not* killed? It may have been stopped and not > killed because there was no memory pressure. > > 1) Does the click package installer kill it if it were stopped? > > 1a) Would it kill it even if it had focus and was running?
click doesn't do anything with running apps, and I'm inclined to say that it shouldn't because it shouldn't have to know about this kind of environment-specific detail; this should be the job of a hook of some kind if it's needed. > 2) Does installing a new version deletes the old one? Not necessarily. If no users have the old version registered, then the old version will be garbage-collected (not yet implemented); otherwise it will be left around. On a single-user system, I would expect that the old version will be deleted strictly after the new version has been installed, symlinks adjusted, and all hooks run (in some order). > 2a) Doesn't that interfere with the idea of having per-user versions? Well, indeed; that's why we don't unconditionally delete the old one. :-) > 3) Is the old version available to be started while the new one is being > installed? Yes; the symlinks aren't re-pointed until the end. > 4) If the old version is not killed and the new one is started, would we > end up with two instances of the same app on different versions, which is > not good? I expect this should be fixed; it just isn't the job of click itself. It seems appropriate for a user-level hook to sort this out. (It is probably not possible to write such a hook quite yet, because you can't write a hook that runs without specifically being attached to by an app; however, I already have some comments from Ted in my queue which should have the effect of addressing this.) -- Colin Watson [[email protected]] -- Mailing list: https://launchpad.net/~ubuntu-appstore-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~ubuntu-appstore-developers More help : https://help.launchpad.net/ListHelp

