Open madscientist16 opened 2 months ago
(See also: sonic2kk/steamtinkerlaunch#1083)
For continuity, to reiterate what I said on the other issue, I find it very strange that the ProtonUp-Qt Flatpak can even check for missing dependencies. I always thought that this was not possible, and across all tools that ProtonUp-Qt installs which have dependencies.
For SteamTinkerLaunch specifically, I thought we ignored this entirely if we were using ProtonUp-Qt Flatpak. https://github.com/DavidoTek/ProtonUp-Qt/blob/b6907ab504805f6f013b437c9dc4e14c1a298e86/pupgui2/resources/ctmods/ctmod_steamtinkerlaunch.py#L174
But perhaps my wires were crossed, and ProtonUp-Qt can actually run which
on the host for Flatpak, and will do this for tools? Maybe I got mixed up between dependencies not being able to be installed on SteamOS or something (https://github.com/DavidoTek/ProtonUp-Qt/discussions/129).
Out of interest, if you install these dependencies, does the warning message disappear when you try to re-install? From the screenshot, some low-hanging fruit to try might be wget
- which I am surprised is not present, so perhaps this check is not working properly? I don't recall seeing a distribution without wget
(except perhaps very early versions of SteamOS 3), so it would be interesting to know if this check is actually working properly.
I just uninstalled wget
for the screenshot. If I install it gets detected by ProtonUp-Qt.
I think this might have something to do with org.freedesktop.Flatpak
Session Bus since if I remove it using Flatseal it all of the dependencies appear as missing and I get multiple Portal call failed: org.freedesktop.DBus.Error.ServiceUnknown
in the terminal output.
which: no yad in
Is yad
available in the path, i.e., can you just type yad --version
in a terminal and it will work? What is the output?
strange that the ProtonUp-Qt Flatpak can even check for missing dependencies ProtonUp-Qt can actually run which on the host for Flatpak, and will do this for tools?
It's possible to run commands (including which
) on the host using flatpak-spawn
if it has access to the org.freedesktop.Flatpak
session bus.
Maybe I got mixed up between dependencies not being able to be installed on SteamOS or something (#129).
I think we ignore the checks and just show a warning for some compatibility tools, including Boxtron. Can't remember exactly why we do that.
For SteamTinkerLaunch specifically, I thought we ignored this entirely if we were using ProtonUp-Qt Flatpak.
I think we actually do it.
It will check if it is running inside Flatpak (/.flatpak-info
exists) and then try to run the commands using flatpak-spawn
.
We might want to change the behavior though:
yad --version
fails for some reason, it will set yad_ver = 0.0
which results in STL not being installedyad_exe is None
, yad_ver
will not even be set. It is fine as we do yad_exe and yad_ver >= 7.2
, but feels a bit sketchy
(Reference: test
is an undefined variable. False and test
will return False
. True and test
will throw an exception)I think this might have something to do with org.freedesktop.Flatpak Session Bus since if I remove it using Flatseal it all of the dependencies appear as missing and I get multiple Portal call failed: org.freedesktop.DBus.Error.ServiceUnknown in the terminal output
Yes, the dependency is required for detecting dependencies. We might want to consider that a user does not permit ProtonUp-Qt to run commands on the host.
It's possible to run commands (including
which
) on the host usingflatpak-spawn
if it has access to theorg.freedesktop.Flatpak
session bus.
Ah, I see. So this is a SteamTinkerLaunch documentation issue. For some reason I assumed ProtonUp-Qt couldn't check dependencies on Flatpak and noted this as such on the SteamTinkerLaunch ProtonUp-Qt wiki page. I'll update that on my side.
If
yad --version
fails for some reason, it will setyad_ver = 0.0
which results in STL not being installed
I think this is fine, SteamTinkerLaunch more or less requires Yad. As of sonic2kk/steamtinkerlaunch#1059, it won't even load SteamTinkerLaunch if Yad isn't installed. Some code paths may work but these are likely more along the lines of oversights than intended functionality (for now, in future I may try to decouple this a little bit to allow for a more streamlined commanndline experience, but it's an exceptionally low priority for now).
If
yad_exe
isNone
,yad_ver
will not even be set. It is fine as we doyad_exe
andyad_ver >= 7.2
, but feels a bit sketchy
I agree, we could probably resolve this by setting yad_ver = 0.0
above the if yad_exe
line. This would also mean we can remove setting yad_ver = 0.0
if we catch an exception.
To be honest, I should really take another look at the SteamTinkerLaunch ctmod. I'm sure there's plenty of cleanup opportunity - we have ugly nested if
s that could likely be replaced with early falsey checks that return early (example), as well as breaking out various bits of logic into internal-ctmod functions to make some operations a bit clearer (like fetching the version), and using some of our newer util functions (such as write_tool_version
to replace this block just like how we replaced a similar block like this for Luxtorpeda (#250).
Since I have a SteamTinkerLaunch installation that I use for STL development on my PC, to avoid any conflicts or borking during ctmod development, I originally developed the ctmod stuff on my PC (I prefer developing at my "battlestation" :laughing:) and then tested the branch on my laptop, but my laptop was in-flux between distros and I haven't used it in a long time, so it's not in a testing-ready state. And setting up a VM is a bit of a pain because it requires Steam. But in future I will take another look at the SteamTinkerLaunch ctmod and give it a bit of a refactor.
We might want to consider that a user does not permit ProtonUp-Qt to run commands on the host.
We should be able to check for an error coming from trying to run a flatpak-spawn
command, right? It should return an error code that we could check for. We could check for this at startup, and if we can't run Flatpak commands we should use this in is_system_compatible
as a separate early check, but return true
since dependencies could be met, we just can't check. This could also be done for other ctmods. Testing this in localdev may be a bit tricky though...
Describe the bug ProtonUp-Qt Flatpak is detecting that I have missing dependecies when installing steamtinkerlaunch.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
ProtonUp-Qt to not detect if there are missing dependencies.
Screenshots
Detecting missing dependencies.
Installs if the dependencies are met.
Desktop:
Additional context
I'm not sure if this is actually a bug. I made an issue here first and was asked to make an issue here.
Terminal output
Same as the screenshot above.