[haiku] Re: Installing nightly ontop of another

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Thu, 24 Apr 2014 11:44:04 +0200

Hi,

Am 24.04.2014 um 11:04 schrieb Simon Taylor <simontaylor1@xxxxxxxxxxxx>:
> 
> On 24 Apr 2014, at 09:34, Stephan Aßmus <superstippi@xxxxxx> wrote:
> 
>> Hi,
>> 
>> Am 24.04.2014 um 10:06 schrieb Simon Taylor <simontaylor1@xxxxxxxxxxxx>:
>>> 
>>> Aren't there similar issues with other packages too? For example if I’m 
>>> running WebPositive whilst I update the WebPositive package? I would expect 
>>> if I close and reopen WebPositive then I would be running the new one, but 
>>> what about the current one - would that experience stability issues?
>>> 
>>> […]
>> 
>> Maybe someone more knowledgable can correct me, but I believe this is 
>> handled by reference counting (resource tracking) in the kernel. When the 
>> WebPositive package is updated, the running instance still owns a reference 
>> to the file stream of its executable (and I assume the loaded libraries). 
>> Even though that file is unlinked from PackageFS and cannot be seen anymore, 
>> the running instance should continue to have access to it just fine.
> 
> But what if that (old version) executable tries to load a resource file from 
> the package that has been moved in the new version, or an add-on where the 
> API has changed? I’m not sure it’s right to do the update underneath things 
> running from the old package, even if they can in most cases continue to 
> function.

You are right. But it sounds to me like applications need to be aware of the 
possibility of being updated while running. Firefox has this "Restart required" 
overlay on Linux for example. I think the system cannot deal with it. It can't 
simply restart apps and generally delaying package activation until a reboot 
does not sound helpful either. Only the apps know whether an update needs a 
restart. And that could get quite complex. What if an app links against a 
library, and there is actually a need to restart the app because the library 
was updated? Should well behaving apps iterate over all images at startup and 
monitor all of them for being updated?

BTW, these problems are not being introduced by PM. A user could have 
overwritten a library or application while it is running before PM. And it may 
also have happened unconsciously by extracting a .ZIP archive to /boot.

Best regards,
-Stephan


Other related posts: