Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Update legendary to stop using XDG_CONFIG_HOME #3137

Conversation

Etaash-mathamsetty
Copy link
Member

This updates legendary to latest git. If there are any known issues with the new legendary, then please let me know.

Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

process.env.XDG_CONFIG_HOME,
'MangoHud/MangoHud.conf'
)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a workaround because we were setting XDG_CONFIG_HOME originally, and now we aren't so this is no longer needed

@arielj
Copy link
Collaborator

arielj commented Oct 15, 2023

We had this PR #2806

the main issue is that legendary changed to not allow 2 processes in parallel that modify the list of installed games, so we need to do something with uninstalling a game while an installation is in progress (we need to either disable the uninstall buttons -but only for epic?- or enqueue the uninstallation for after the install is done and call the action then, or decide another option)

@flavioislima
Copy link
Member

Like Ariel said, we need to first decide what do to with the queue if there is an epic game being downloaded and someone wants to uninstall another epic game.

@Etaash-mathamsetty
Copy link
Member Author

Like Ariel said, we need to first decide what do to with the queue if there is an epic game being downloaded and someone wants to uninstall another epic game.

I think it's best to pause the install, uninstall the game, then resume it

@arielj
Copy link
Collaborator

arielj commented Oct 28, 2023

Like Ariel said, we need to first decide what do to with the queue if there is an epic game being downloaded and someone wants to uninstall another epic game.

I think it's best to pause the install, uninstall the game, then resume it

derrod advised against that because if you are in the middle of downloading a large file you lose all that progress #2806 (comment)

@Etaash-mathamsetty
Copy link
Member Author

Like Ariel said, we need to first decide what do to with the queue if there is an epic game being downloaded and someone wants to uninstall another epic game.

I think it's best to pause the install, uninstall the game, then resume it

derrod advised against that because if you are in the middle of downloading a large file you lose all that progress #2806 (comment)

what about queuing the uninstall?

@arielj
Copy link
Collaborator

arielj commented Oct 28, 2023

Like Ariel said, we need to first decide what do to with the queue if there is an epic game being downloaded and someone wants to uninstall another epic game.

I think it's best to pause the install, uninstall the game, then resume it

derrod advised against that because if you are in the middle of downloading a large file you lose all that progress #2806 (comment)

what about queuing the uninstall?

that could work, but we have to be really clear to the users... like... where's that queue? what's in there? can I remove items from there? it's a new status, what happens if an uninstall is on the queue and I start the game? there's too many edge cases

another option is to just disallow uninstalling an epic game while an epic game is being installed with a dialog and let the user decide what they want to do, we would just say Uninstalling an epic is disallowed since an epic game installation is in progress, wait for the download to finish or stop/pause it or something like that

@Etaash-mathamsetty
Copy link
Member Author

Like Ariel said, we need to first decide what do to with the queue if there is an epic game being downloaded and someone wants to uninstall another epic game.

I think it's best to pause the install, uninstall the game, then resume it

derrod advised against that because if you are in the middle of downloading a large file you lose all that progress #2806 (comment)

what about queuing the uninstall?

that could work, but we have to be really clear to the users

another option is to just disallow uninstalling an epic game while an epic game is being installed with a dialog and let the user decide what they want to do, we would just say Uninstalling an epic is disallowed since an epic game installation is in progress, wait for the download to finish or stop/pause it or something like that

I think it might be better to have a legendary side fix then

@arielj
Copy link
Collaborator

arielj commented Oct 28, 2023

Like Ariel said, we need to first decide what do to with the queue if there is an epic game being downloaded and someone wants to uninstall another epic game.

I think it's best to pause the install, uninstall the game, then resume it

derrod advised against that because if you are in the middle of downloading a large file you lose all that progress #2806 (comment)

what about queuing the uninstall?

that could work, but we have to be really clear to the users
another option is to just disallow uninstalling an epic game while an epic game is being installed with a dialog and let the user decide what they want to do, we would just say Uninstalling an epic is disallowed since an epic game installation is in progress, wait for the download to finish or stop/pause it or something like that

I think it might be better to have a legendary side fix then

the reason we have this problem is because of something added on purpose to legendary: Commands modifying the installed game data will now abort if another instance of Legendary is running a command that modifies it, so a fix on legendary's side would be to actually revert that instead, I'm not sure if that's an option

unless maybe if that is made optional with some flag to ignore the lockfile and we use it? (I imagine it's using a lock file for that)

EDIT: though if we ignore the lockfile somehow, we end up with another issue: if you uninstall a legendary game while a legendary game is being installed, after the installation ends the game that was uninstalled is "back", the files are gone but it shows up as installed

@arielj
Copy link
Collaborator

arielj commented Oct 28, 2023

if we want to finish this fast to have legendary fixes for the next release, I'd say to go with the simplest solution for now:

if an epic game is being installed, disabled the uninstall option for any epic game and show a message explaining why it's disabled

I don't think it's such a common use case to implement a complex solution, it's just something that we need to prevent from happening to avoid having reports

@Etaash-mathamsetty
Copy link
Member Author

Etaash-mathamsetty commented Oct 28, 2023

if we want to finish this fast to have legendary fixes for the next release, I'd say to go with the simplest solution for now:

if an epic game is being installed, disabled the uninstall option for any epic game and show a message explaining why it's disabled

I don't think it's such a common use case to implement a complex solution, it's just something that we need to prevent from happening to avoid having reports

I have a easier solution, make a fork of legendary based on the current version that we are using, then backport the patch. Then use the CI to make a build. Later, we can find a permanent solution

@arielj
Copy link
Collaborator

arielj commented Oct 28, 2023

if we want to finish this fast to have legendary fixes for the next release, I'd say to go with the simplest solution for now:
if an epic game is being installed, disabled the uninstall option for any epic game and show a message explaining why it's disabled
I don't think it's such a common use case to implement a complex solution, it's just something that we need to prevent from happening to avoid having reports

I have a easier solution, make a fork of legendary based on the current version that we are using, then backport the patch. Then use the CI to make a build. Later, we can find a permanent solution

I don't think that's a good idea, sounds like a complicated process and hiding a problem for the future just to get the XDG_CONFIG_HOME replacement fix merged in, it's replacing a problem with another problem

@arielj
Copy link
Collaborator

arielj commented Oct 28, 2023

I'll see if I can implement the uninstall button getting disabled today

@arielj
Copy link
Collaborator

arielj commented Oct 28, 2023

@Etaash-mathamsetty can you make this branch in the Heroic repo? that way I can push my codes changes there too, I understand you have access to do that?

@Etaash-mathamsetty
Copy link
Member Author

@Etaash-mathamsetty can you make this branch in the Heroic repo? that way I can push my codes changes there too, I understand you have access to do that?

will do

@arielj
Copy link
Collaborator

arielj commented Oct 28, 2023

closing in favor of #3168 since I can't push to this branch/PR

@arielj arielj closed this Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With "MANGOHUD=1", Heroic behaves like the option inside Heroic is set to 1 and uses its own config file
3 participants