View Single Post
Old 01-27-2015, 12:54 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Auto-updates are not something that can be implemented in a pull request. They require a lot of backup infrastructure, at a minimum, the release process has to be modified to maintain binary deltas of the various installers, and the distribution servers have to be modified to host those deltas.

That said if someone is willing to do the coding for the calibre side of the equation, I am willing to help with the rest.

What would be needed, is

1) A way to *reliably* download binary diffs, and use them to update installer images. This means hash checks of the patched installer images at a minimum and the ability to rollback if a patch fails.

2) A way to *atomically* update the calibre installation on launch, when an update is waiting. This is particularly important, a background update must *never* break a working calibre install.

3) A way to notify the user if auto-updating is failing repeatedly, so that the user can perform manual updates.

4) Auto-updates have to be optional, defaulting to off. That is necessary for calibre, since unlike Chrome and Firefox it does not have a large development and QA team to ensure releases are relatively bug free. I do a fairly good job with that on my lonesome ownsome, but I absolutely refuse to responsible for an on-by-default auto update process breaking working software on people's systems.

5) You need to figure out a way to have auto updates work for installations in system folders for which the normal user account does not have permissions, without prompting the user. Most applications get around this by running a root background updater service, which is a particularly ugly (security nightmare) and resource intensive solution, but is probably the only robust way.

Auto-updates are particularly problematic on windows, where the installer uses MSI and files are mandatorily locked by the OS. I have no idea how one would incrementally update an MSI based installation in the background.

So while, to the uninitiated it might seem like enabling auto-updates is relatively easy, doing so *reliably* and *robustly* is a whole other ball game.
I'd estimate it would take over a man month of work -- for only the initial implementation, assuming there were no nasty surprises along the way, and there are almost always nasty surprises. And then will come all the work to make it robust.

Last edited by kovidgoyal; 01-27-2015 at 12:57 AM.
kovidgoyal is offline   Reply With Quote