opam icon indicating copy to clipboard operation
opam copied to clipboard

Package content and .install file gets removed from the switch but internal switch state kept it installed

Open kit-ty-kate opened this issue 1 year ago • 3 comments

I had some weird issue locally and i have no idea what caused it: https://github.com/ocaml/opam-repository/issues/26318

In that case the result.1.5 package:

  • was shown as installed (internal switch state)
  • none of its content was installed (e.g. <switch>/lib/result)
  • the <switch>/.opam-switch/install/result.install file was missing
  • packages that rely on it were still installed
  • <switch>/.opam-switch/packages/result.1.5/opam still existed

Maybe it's something of my own doing at some point but i'm opening this issue just in case it happens again or if someone else encounters this too

kit-ty-kate avatar Jul 31 '24 16:07 kit-ty-kate

Is this another manifestation of #5922?

dra27 avatar Aug 05 '24 08:08 dra27

result being still installed is normal (and ones that rely on it). It's the delayed removal mechanism (cf #2593, and for a test #6139). What is not normal is that some internal files was removed. As it is shown in the test, everything is kept, from installed package files to internal ones.

Is this another manifestation of #5922?

I don't think.

rjbou avatar Aug 06 '24 16:08 rjbou

result being still still installed is normal (and ones that rely on it). It's the delayed removal mechanism (cf #2593, and for a test #6139).

I don't know how my switch came to be in this state so we have no indication if this mechanism was used or not

kit-ty-kate avatar Aug 06 '24 16:08 kit-ty-kate