Bisa / factorio-init

Factorio init script
MIT License
415 stars 82 forks source link

[BUG]"factorio update" will only update one version, but not multiple #156

Closed DIYglenn closed 4 years ago

DIYglenn commented 4 years ago

Describe the bug I've added the update script, but it doesn't seem to work when there are multiple updates. Between the last two stable updates I've had to update manually. It applies the first update, but does not continue. An example is that we now went from 0.17.74 to 0.17.79. "factorio version" shows it has only been updated to 0.17.75 (so the script did work) but then won't apply the rest of the patches to get it to 0.17.79.

The same happened when 0.17.74 was the most recent stable version, I believe it stopped at 0.17.69 or .70

The error message is "Cannot load base mod version 0.17.74 with game version 0.17.75". It was the same the last time, but it has already been updated to 0.17.75, it just doesn't update all the way to .79.

To Reproduce Steps to reproduce the behavior: Init script and update script installed. Logged in as a "factorio" user without sudo permissions etc. I run "factorio update" and get the following error.

Checking for updates...
New version core-linux_headless64 0.17.79.
Wrote /tmp/factorio-update.Zc2K1wfWwX/core-linux_headless64-0.17.75-0.17.76-update.zip, apply with `factorio --apply-update /tmp/factorio-update.Zc2K1wfWwX/core-linux_headless64-0.17.75-0.17.76-update.zip`
Wrote /tmp/factorio-update.Zc2K1wfWwX/core-linux_headless64-0.17.76-0.17.77-update.zip, apply with `factorio --apply-update /tmp/factorio-update.Zc2K1wfWwX/core-linux_headless64-0.17.76-0.17.77-update.zip`
Wrote /tmp/factorio-update.Zc2K1wfWwX/core-linux_headless64-0.17.77-0.17.78-update.zip, apply with `factorio --apply-update /tmp/factorio-update.Zc2K1wfWwX/core-linux_headless64-0.17.77-0.17.78-update.zip`
Wrote /tmp/factorio-update.Zc2K1wfWwX/core-linux_headless64-0.17.78-0.17.79-update.zip, apply with `factorio --apply-update /tmp/factorio-update.Zc2K1wfWwX/core-linux_headless64-0.17.78-0.17.79-update.zip`
Applying /tmp/factorio-update.Zc2K1wfWwX/core-linux_headless64-0.17.75-0.17.76-update.zip ...
   0.000 2019-11-20 08:30:30; Factorio 0.17.75 (build 47717, linux64, headless)
   0.058 Operating system: Linux (Ubuntu 18.04)
   0.058 Program arguments: "/opt/factorio/bin/x64/factorio" "--apply-update" "/tmp/factorio-update.Zc2K1wfWwX/core-linux_headless64-0.17.75-0.17.76-update.zip" 
   0.058 Read data path: /opt/factorio/data
   0.058 Write data path: /opt/factorio [11456/12288MB]
   0.058 Binaries path: /opt/factorio/bin
   0.070 System info: [CPU:        Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz, 24 cores, RAM: 64383 MB]
   0.070 Environment: DISPLAY=<unset> WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=<unset> XDG_SESSION_DESKTOP=<unset> XDG_CURRENT_DESKTOP=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.070 Running in headless mode
   0.072 Error Util.cpp:83: Cannot load base mod version 0.17.74 with game version 0.17.75. Update probably failed, please download the game again.

Error! Failed to apply update
You can try to apply it manually with:
su factorio -c "/opt/factorio/bin/x64/factorio --apply-update /tmp/factorio-update.Zc2K1wfWwX/core-linux_headless64-0.17.75-0.17.76-update.zip "

Expected behavior Apply each incremental update until it's at the latest version, not just one incremental update.

Bisa commented 4 years ago

On a fresh install of stable, I just changed it to experimental and updated from 0.17 to the latest 0.18 without issues - @DIYglenn if the issue still persists, please re-open the bug.