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 incorrect package installed state written on error #5922

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Apr 11, 2024

If a package needs to be rebuilt because of upstream changes, an error in the rebuild causes a cache indicating that it's installed to be written. Something appears to be wrong in OpamClient.parallel_apply, but I haven't got to the bottom of exactly what.

What I have written is a test! Spotted while debugging #5921 - because errors during fetch also trigger this. Note in the commit history that erasing .opam-switch/packages/cache causes opam to do the right thing on the second upgrade.

@dra27 dra27 added KIND: BUG AREA: ENGINE PR: WIP Not for merge at this stage labels Apr 11, 2024
@dra27
Copy link
Member Author

dra27 commented Apr 11, 2024

In the 2.2 project as I haven't yet determined if this is a regression or long-standing.

Comment on lines +512 to +521
### opam update
[NOTE] ongoing.dev has previously been updated with --working-dir, not resetting unless explicitly selected

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[second] no changes from file://${BASEDIR}/REPO2
[default] synchronised from file://${BASEDIR}/REPO

<><> Synchronising development packages <><><><><><><><><><><><><><><><><><><><>
[quux.dev5] synchronised (no changes)
Now run 'opam upgrade' to apply any package updates.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this opam update output needed?

Copy link
Member

Choose a reason for hiding this comment

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

I think currently yes but we could remove it if the new version of d-foo.6 was introduced using <pkg:d-foo.6> instead of <REPO/...>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AREA: ENGINE KIND: BUG PR: WIP Not for merge at this stage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants