Skip to content

Updates using factorio-updater do not work for 2.x #207

@bioxz

Description

@bioxz

I guess due to a changed package name, using the update function does not work for 2.x

Due to a change of the --version output of the binary, updates are not working for the 2.x version.

$ /opt/factorio/factorio-init/factorio update -l

Running updater in --dry-run mode, no patches will be applied
Checking for updates...
Traceback (most recent call last):
  File "/opt/factorio/factorio-updater/update_factorio.py", line 295, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/factorio/factorio-updater/update_factorio.py", line 279, in main
    updates, latest = pick_updates(j, args.package, for_version, args.experimental)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/factorio/factorio-updater/update_factorio.py", line 85, in pick_updates
    for row in updater_json[factorio_package]:
               ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'core-linux_headless'
Update check failed!

Factorio 1.x prints a Binary version, while 2.x prints just a Version:

Version: 1.1.108 (build 62305, linux64, headless)
Binary version: 64
Map input version: 0.18.0-0
Map output version: 1.1.108-0
Version: 2.0.8 (build 79416, linux64, headless)
Version: 64
Map input version: 1.0.0-0
Map output version: 2.0.8-1

This leads to the 64 missing in the package name.

Running the updater by hand did work (at least from 2.0.7 stable to 2.0.8 experimental). The server-init itself is also still running well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions