Author Topic: Please explain --safe-exit  (Read 262 times)

Offline AL|EN

  • Planewalker
  • *****
  • Posts: 320
  • Gender: Male
Please explain --safe-exit
« on: February 18, 2019, 12:58:35 PM »
Quote
Save weidu.log every time a component installation is begun. This makes it impossible to uninstall components (don’t ask), but allows the user to kill the weidu process (E.G. closing the DOS console via the X button) without leaving the game in an unrecoverably inconsistent state (you can Re or Uninstall the component and the game will be consistent again). This might break with mods using overly complicated AT_* actions (basically don’t use this with Big Mods).

What does it mean "impossible to uninstall components" ? Impossible like forever?
How it alters '--force-install-list'? My observation shows that only new components are installed and already installed aren't reinstalled (unlike when not using --safe-exit)
If the mod doesn't use AT_* actions, shouldn't this be default way to install mod if there is a chance that weidu process will be killed via power outage?
« Last Edit: February 18, 2019, 01:42:18 PM by AL|EN »
You cannot have progress without committing changes...A Basic Modder's Guide to Git and Github

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1051
Re: Please explain --safe-exit
« Reply #1 on: February 19, 2019, 12:08:30 PM »
What does it mean "impossible to uninstall components" ? Impossible like forever?
It means something like weidu --uninstall --safe-exit will immediately fail. You can re-run WeiDU in a session without --safe-exit to uninstall. Normally, WeiDU keeps the log in memory; installed components are added, uninstalled ones are removed and the whole thing is written out before WeiDU exits. --safe-exit changes this so that each installed component is immediately written out to storage. Since the log is essentially treated as write-only and only atomic operations are performed, you have some limitations on what you can and cannot do. Some additional limitations are imposed by the existing structure of the code (hence the "don't ask"). Should WeiDU survive to a normal exit, the log will be written out as normal, all the same.

Quote
How it alters '--force-install-list'? My observation shows that only new components are installed and already installed aren't reinstalled (unlike when not using --safe-exit)
As far as I can tell, it is much as you have found. Additionally, no stack operations are performed.

Quote
If the mod doesn't use AT_* actions, shouldn't this be default way to install mod if there is a chance that weidu process will be killed via power outage?
The install code is sufficiently complicated and there is a sufficient number of edge cases that I choose not to give a recommendation in this matter. At best WeiDU could tell if a mod makes use of AT_*, but not what is being done with it.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: