Linux: the game folder's launcher opens an older installed builder, which offers to rebuild a newer game at its older version #2352
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot#2352
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hookshot version
hookshot v2.1.0-rc.3-46-gddafc1f (source d13bde75)
What kind of problem
Something else
What happened
On Linux, a game folder built with a newer builder can be sent back to an older version by the launcher. From reading the code of the nightly above and main (I avoided it on my machine, so this is not from a run):
The folder's launcher prefers any installed builder, whatever its version.
builder/linux/hookshot-folder(copied to the game folder ashookshot) runs$XDG_DATA_HOME/hookshot/builder/current'sAppRunwhenever it exists, and uses the folder's ownbuilder=line inhookshot_version.txtonly when there is no installed builder. There is no version comparison. So once a builder has updated itself (which writescurrent), every later folder starts that builder, even when the folder was built by a newer AppImage.On my machine
currentpointed at an installed v2.0.14 builder while the folder had been rebuilt with the v2.1.0-rc.3 AppImage, so the app menu entry opened the v2.0.14 builder for an rc.3 game. I renamedcurrentto get the folder's own builder.The builder offers "Update" to an older version without asking. In
builder/linux/linux_update.py,choose_modereturnsupdate-gamewhenever the game's version differs fromupdate_target(...), not only when the target is newer. On a builder's own Release track,update_targetis the latest release (or the builder's own version). The only question before going older,older_okinhookshot_builder.py, runs only when the Track is being switched. So a Release-track builder opened on a game built by a newer release candidate or nightly would show "Update" with "Hookshot v2.1.0 is available. Your game is v2.1.0-rc.3-46-gddafc1f", and Update would rebuild the game at the older version.Together: build with a newer AppImage after a builder has updated itself, start the game from the app menu, and the button offers to rebuild the game at the older version.
Possible fixes (suggestions only):
builder=builder is newer (release_keyorder), or the folder's own builder when the game is newer than the installed one.choose_mode, offerupdate-gameonly when the target is newer than the game, or always ask througholder_okwhen it is older, switching or not.Related: #902 / #911 (the same problem for Actions-built builders, fixed in
update_target), #2201 (a version selector, Windows only).Where in the game
Not in the game: the Linux launcher and builder, when starting from the app menu after a build
How often
Every time
Graphics card and driver version
RTX 4070 12 GB, NVIDIA 615.71.09
CPU, RAM and operating system
Ryzen 7 5800X3D, 64 GB, Ubuntu 26.04.1 (GNOME 50 Wayland)
Changes from the defaults
None relevant (the launcher and builder code, before the game starts).
Other software hooked into the game
No, nothing hooked in
hookshot_log.txt
Not applicable: this is the launcher choosing a builder, before the game starts. Found by reading builder/linux/hookshot-folder, linux_update.py and hookshot_builder.py.
Screenshots or video
No response
Before you send it
I'll work on this, claimed in dev-work. On main
b744b1ec, an authored shell-launcher test selects installed v2.0.14 over the recorded v2.1.0-rc.3 AppImage. The realchoose_modealso returnsupdate-gamefor a v2.2.0 game when only v2.1.0 tools are known offline.The intended fix is to protect automatic/default actions while preserving explicit version/track choices. #2373 changes the launcher UI and
linux_update.py; I'll coordinate that overlap before editing those paths. No launcher redesign or real game build in these reproductions.Perhaps this is the same issue but when trying to update upon starting Hookshot the app keeps finding an older version as the update version (2.0.12), so I skip the update of course. Older builds seemed to update just fine but the last few versions I had to manually download the new AppImage.