Ideas on self updating software?

Jaime Wyant programmer.py at gmail.com
Sat Sep 11 22:38:08 EDT 2004


*long post alert!*

Can anyone give me some pointers on writing "self-updating" python
programs?  I have an application that is almost ready for beta
testing.  I want to be able to fix any bugs and push the updates out.

I have a *very vague* idea of how to attack this.   The client will
have an auto-update feature that will hit the webserver via xml-rpc,
asking for updates.  The server responds, sending back any updated
modules.

Ok.  My first idea is to have *versions* of software tagged somehow. 
A table (software_update -- not a permanent name, all I can come up
with right now :-)) would exist with two columns:

version_number, updated_module

The first beta version of my software will be tagged 0.1.  The first
load into my database would contain a row for each module.  Assume I
only have 4 modules, named a, b, c and d:

The table (software_update) would contain the following rows:
0.1     a
0.1     b
0.1     c
0.1     d

Now, assume that later I update modules c, d and tag the module
verison 0.2.  Now the table contains the following rows:
0.1     a
0.1     b
0.2     c
0.2     d

The idea is that the client sends the server its version.  The server
queries software_update for all rows where version_number >
client_version_number.  Then all modules are *pushed* down to the
client.

I realize that I'll have to worry about *duplicates* in revisions. 
That is version 0.3 may also update module 'c'.  I'll figure that out
later.

Okay, does this sound sound?  =)  Anyone have any other ideas on how
to tackle this?

jw



More information about the Python-list mailing list