Replace wget with curl for Steam Deck support #59
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: N-archive/pineapple-src#59
Loading…
Reference in a new issue
No description provided.
Delete branch "patch-1"
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?
wget is not included in SteamOS and not easy to install because the file system is read-only by default and any changes will get wiped by the next system update. This is the only instance where wget is used, curl is used extensively in appimage.sh.
How does our ci script affect the steamdeck?
I'm not sure what the ci script is, but in regards to this pr steam deck does not have wget so $GITVER is always null and the update script will never run. Steam deck does have curl, which is already used elsewhere in this project.
CURL is not installed by default on many distros, and so if using it, there should be a fallback to
wget
Curl is already used 9 other times in the project. This change removes 1 dependency and adds 0.
Curl is used in
.github/workflows/appimage.sh
, and.github/workflows/docker.sh
, but those don't run through the appimage, those are just for the CI where we know curl is installed.I also tested the auto updater appimage after uninstalling curl just to check, and it doesn't seem to have any issues or output any errors, so I'm pretty sure it's not used anywhere yet. And curl isn't part of the base package on Arch, so it's possible it isn't installed on some Arch systems (and possibly other distros as well). Using both curl and wget with one as a fallback would maximise compatibility with as many distros and systems as possible.
Here's one way how this could be implemented, but I'm sure there's probably a better and more maintainable solution using a variable for which program to use.
EDIT: heh, ignore the not preinstalled on arch part, turns out uninstalling it broke pacman and bricked my install (was able to recover it via chrooting from an arch boot usb though so all good) 😄
What about including wget or curl in the AppImage?
That would work, but it would also be fair to assume that 99% of systems have either wget or curl, unless there is a popular distro that doesn't have one installed by default
Pushed a new commit. One liner, reverts to wget but tries curl is wget fails. This code should work if you have either wget or curl or both.
LGTM 👍.
@edisionnano @qurious-pixel do you have anything to add or change?