By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,961 Members | 1,333 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,961 IT Pros & Developers. It's quick & easy.

Ideas on self updating software?

P: n/a
*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
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jaime Wyant wrote:
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.


Keep it simple. Write a separate application, called the updater
that can download and overwrite the existing modules.

During startup the application that needs to be updated could check
for new versions and ask the user to run the updater
if necessary.

It might save you a lot of trouble. And don't fool around with
databases, just download everything each time, zip it up if it is
too big.

Istvan.
Jul 18 '05 #2

P: n/a
Jaime Wyant <pr***********@gmail.com> writes:
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.
You can try rsync'ing the differences from the installed software to
your reference repository. Or you can 'cvs update' it, or use any other
version management system.
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.
Keep things simple. You can version each module independently and
create one with your systems version that is incremented each time an
update is applied. So, this version module will be constantly increased
and will show its version to your users when they ask for the version
running -- remember to make it the last update, in case something
fails... -- and the other modules will be updated independently.

I would go for the CVS approach: each file is independently versioned
and the product version is not limited or bound by the file version.
Okay, does this sound sound? =) Anyone have any other ideas on how
to tackle this?


rsync seems to be the simpler approach... ;-)
But, just issuing a warning about a new version seems to be the best
thing, leave the updates for the user (actually, to another application
activated by the user).

--
Godoy. <go***@ieee.org>
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.