|
#1
|
|||
|
|||
|
fault tolerance
Just wondering what happens in the following scenarios...
1. Computer shuts down while patching (power outage or something) 2. Patch fails to apply halfway through for some reason so a rollback initiates, then computer shuts down while rolling back 3. A binary file (not a key file) has been modified from the version's original state, and a patch is applied Thanks |
|
#2
|
||||
|
||||
|
Quote:
It's somewhat undefined, since it depends on what is happening at that very instant at the file system level. But in both cases you will likely end up with a frankenstein version -- with some files that are patched, and some files that are unpatched (either because they weren't patched yet or they were already restored). Power loss may cause file corruption if a file is being written when the computer shuts down; if that happens during the patching process it could result in a corrupted file. For both (1) and (2) it might be possible to correct everything by simply reapplying the patch, if all of the key files ended up "unpatched" (either because they weren't patched yet or they were successfully restored to the original version). If any of the key files have been patched, however, that would prevent the default version identification method from "seeing" the old version. (The MD5 signatures of all of the key files must match in order for a version to be identified.) In theory using custom scripting it would be possible to build patches that would ignore the key file restrictions if a previous patch was interrupted (which you could detect by using a semaphore of some kind, e.g. check for a value written to the registry when the patch starts, and removed from the registry when the patch ends). Note that if the "Backup patched files" option was enabled, it should always be possible to manually restore the original files from the backups after such an event. Quote:
If "Force install" is on, the modified file will be replaced. (The patch actually contains a full copy of that file so it can accomplish this.) If "Force install" is off, the modified file will be left untouched. (A file can only be patched if its MD5 signature matches the original.)
__________________
--[[ Indigo Rose Software Developer ]] |
|
#3
|
|||
|
|||
|
Thanks for your reply
regarding the file that was somehow modified.. is there a way to make the patch fail if the MD5 signature does not match the original? If a file was modified, it means somebody did something wrong... and I don't want the patch to make it look like everything went ok Thanks! |
|
#4
|
||||
|
||||
|
Quote:
Another approach would be to verify the MD5 signature from script using Crypto.MD5DigestFromFile. This could be done after identifying the version (or anywhere else for that matter). It should also be possible to use the g_OnFileProcessed hidden function, by checking for a ResultCode of 4. (See "Miscellaneous > Hidden Functions" in the help file.)
__________________
--[[ Indigo Rose Software Developer ]] |
|
#5
|
|||
|
|||
|
Quote:
say I have versions 1, 2 and 3, and patch with target version = 3. If I take a non-key file and edit it in version 1, then apply the patch.. it recognizes that something has been changed and aborts the way I want it to. Now if I instead take a non-key file from version 2 and drop it in version 1 (overwriting version 1's file), I expected it to abort as well (with error code 4) because its not the expected file for version 1. However the patch seems to recognize that the file is from version 2 and patches it properly! This works for me... is it intentional? If I decide later that I DO actually want to abort in this kind of scenario... is there a way for me to detect this? The patch log seems to just indicate success as usual. |
|
#6
|
||||
|
||||
|
Quote:
![]() I'm not sure if there's a way to detect that scenario generically. There are a few ways you could script it right now (e.g. check the files against a table containing all the files from different versions) but it would be a bit labour intensive, since I think you'd need to populate the tables yourself. Hmmm.
__________________
--[[ Indigo Rose Software Developer ]] |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Flash intro fault ? | therussian | AutoPlay Media Studio 6.0 | 0 | 08-13-2006 10:42 AM |
| Language Fault in 6.0.1.0 | Kimbo | Setup Factory 6.0 | 0 | 05-20-2002 03:22 AM |
All times are GMT -6. The time now is 04:03 AM.









Linear Mode

