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 enabling of dependencies with identical names #12253

Merged
merged 1 commit into from
May 8, 2022

Conversation

TurkeyMcMac
Copy link
Contributor

@TurkeyMcMac TurkeyMcMac commented Apr 30, 2022

Add compact, short information about your PR for easier understanding:

  • Goal of the PR
    • Fix the following situation: Mod A depends on mod B. There are two mods named B. The B mod earlier in the list is already enabled. When the A mod is enabled, the second B mod is enabled due to the dependency, leading to both B mods being enabled at once. This is incorrect. Since the first B mod is already enabled, it should be used to fulfill the dependency.
  • How does the PR work?
    • When mod names are being mapped to indices, the indices of already enabled mods take precedence over others.
  • Does it resolve any reported issue?
    • Not that I can find.

To do

This PR is Ready for Review.

How to test

  1. Download and unzip mods boofarf.zip and foobarf.zip. boofarf depends on foobarf.
  2. Put the mods into your mod directory. Put foobarf in twice using a symlink.
  3. Try enabling boofarf with neither foobarf enabled. The one later in the list should become enabled.
  4. Disable boofarf and both foobarfs.
  5. Enable the first foobarf listed.
  6. Try enabling boofarf. The first foobarf should remain the only one enabled.

@sfan5 sfan5 added Bugfix 🐛 PRs that fix a bug @ Mainmenu labels Apr 30, 2022
@rubenwardy rubenwardy self-requested a review May 7, 2022 15:55
@rubenwardy rubenwardy added One approval ✅ ◻️ Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines labels May 8, 2022
@rubenwardy rubenwardy merged commit 54bc8a7 into minetest:master May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 PRs that fix a bug @ Mainmenu One approval ✅ ◻️ Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants