opam icon indicating copy to clipboard operation
opam copied to clipboard

Fix incorrect package installed state written on error

Open dra27 opened this issue 1 year ago • 1 comments

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 avatar Apr 11 '24 12:04 dra27

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

dra27 avatar Apr 11 '24 12:04 dra27

Superseded by https://github.com/ocaml/opam/pull/6213

kit-ty-kate avatar Apr 05 '25 14:04 kit-ty-kate