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 "opam install <local_dir>" not updating pinned packages' metadata #6209

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kit-ty-kate
Copy link
Member

Fixes #5567

I have no idea why for_view was introduced in kit-ty-kate@9b2a67f but i've tested opam show and i'm not seeing any breaking nor does the testsuite.

The bypass here was causing local packages to be put in the already_pinned set. However this set is only used to update the <switch>/.opam-switch/sources/<pkg> directory, not the <...>/overlay directory as the assumption with this set is that the package description hasn't change.
Removing that bypass makes the function much more consistent.

The reinstall bit is a bit easier to understand: when using --deps-only or --show-action, the codepath goes through simulate_local_pinning which didn't take into account that some packages being pinned are already pinned. In that case the reinstall field must be updated to ensure the rest of the code knows that package should be reinstalled.

…ages' metadata

The reinstall field from the switch state wasn't updated according to
the implicit pin and thus opam didn't think there was anything to do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opam install . --deps-only --working-dir incorrectly reports "Nothing to do"
1 participant