patching incorrect versions...

Ryan C. Gordon icculus at
Sat Feb 1 00:07:00 EST 2003

Let's say productX is at version 1.02 on a user's machine. There's a 1.03
patch and then a 1.04 patch.

The foolish user hates loki_update and decides to download the 1.04 patch
directly. Being foolish, he doesn't get the 1.03 patch first. This happens
a lot in the real world, apparently.

loki_patch makes no attempt to verify that 1.04 is the next logical thing
to install, usually leaving half the files updated before it mangles
something and gives up.

The questions:
1) can loki_patch check that the version it is applying is what applies
over the currently installed version? Obviously, loki_update handles this
before running loki_patch, but it's way to easy to circumvent this and
mangle your system.

If nothing else, a workaround is to have a "THIS-IS-VERSION-1.02" file
installed, and make sure it's the first thing in patch.dat (and just
delete it and add THIS-IS-VERSION-1.03, etc...hacky, but it might work).

2) Can loki_patch build patches in a temp directory so that catastrophic
failure (files unexpectedly changed, loki_patch segfaults, out of disk
space, etc) doesn't leave the user with a half-upgraded (read: "ruined")
installation? All patched files (followed by those that are to be deleted)
then get moved into the appropriate place...then again, this can still
fail, but it seems less likely. Thoughts?


More information about the Lokisetup mailing list