narc0tiq / factorio-updater

Factorio update helper for headless servers
MIT License
244 stars 48 forks source link

factorio-updater isn't updating old server version #28

Closed JanWerder closed 7 years ago

JanWerder commented 7 years ago

I have a local isntallation of the factorio headless server 0.13.20 in /home/jan/factorio/bin/x64/factorio Thatfor I run python3 update_factorio.py -a /home/jan/factorio/bin/x64/factorio But that gives a return of

No updates available for version 0.13.20 (latest stable is 0.14.23). Did you want `--experimental`?

It doesn't update the server and it doesn't even seem to recognize that there is a newer version, even though it displays just that. What's the problem here?

narc0tiq commented 7 years ago

The problem is that 0.13.19 and 0.13.20 are dead-ends for headless servers* (no updates exist to go from them to the 0.14 series). If you look at https://updater.factorio.com/get-available-versions?apiVersion=2, you will see there is no "from": "0.13.20" to anything, and that the only "from": "0.13.19" has "to": "0.13.20". From 0.13.18 you can go to 0.13.19 or to 0.14.0.

I'm sorry to say, you're going to have to download the whole thing**. Try:

Or try other versions from https://www.factorio.com/download-headless, of course.


* For regular (i.e., non-headless), there are updates from 0.13.20 to 0.14.5. This, of course, doesn't help us. ** Actually, since you're going so many versions forward, you're saving bandwidth -- the entire set of 0.14.0 to .23 is 223 MB, whereas the 0.14.23 headless download is only 22 MB.


Hmm. Maybe I could detect this case and change the message, like "(latest [stable|experimental] is x.yy.zz, but is unreachable)". And add a link back to here, even.

JanWerder commented 7 years ago

Would my command auto-update it afterwards? I mean would it download newer version and automatically apply them?

narc0tiq commented 7 years ago

It certainly should. You may want to add -D for "delete after apply" and -x for "experimental"; my update command is python3 ~/src/factorio-updater/update_factorio.py -xDa ./bin/x64/factorio (while in the factorio root folder, obviously).

JanWerder commented 7 years ago

alright, thanks