Skip to content

bug: opam fails to handle corrupted packages  #6365

Open
@Banyc

Description

If your issue concerns a package not building, please report to
https://github.com/ocaml/opam-repository/issues or to the package maintainer
unless you are confident it is an issue in the opam tool itself.
If your issue concerns failures with the opam.ocaml.org website, please report to
https://github.com/ocaml/infrastructure/issues

❯ opam config report
# opam config report
# opam-version         2.3.0
# self-upgrade         no
# system               arch=arm64 os=macos os-distribution=homebrew os-version=14.5
# solver               builtin-mccs+glpk
# install-criteria     -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed
# upgrade-criteria     -removed,-count[avoid-version,changed],-count[version-lag,solution],-count[missing-depexts,changed],-new
# jobs                 11
# read-state           In /private/var/folders/rs/s_91mgrx38n9tg742t37h_t00000gn/T/opam-31163-a0be32/default/packages/octez-alcotezt/octez-alcotezt.17.1/opam:
unsupported or missing file format version; should be 2.0 or older

The file mentioned is a empty file.

This file bugs almost all the opam commands, following are examples:

❯ opam clean
Fatal error:
In /private/var/folders/rs/s_91mgrx38n9tg742t37h_t00000gn/T/opam-31104-37d38c/default/packages/octez-alcotezt/octez-alcotezt.17.1/opam:
unsupported or missing file format version; should be 2.0 or older
❯ opam update
Fatal error:
In /private/var/folders/rs/s_91mgrx38n9tg742t37h_t00000gn/T/opam-31191-16e3ad/default/packages/octez-alcotezt/octez-alcotezt.17.1/opam:
unsupported or missing file format version; should be 2.0 or older

And there is no way to uninstall the opam and reinstall it again since this binary was installed from script and not from any package manager like brew.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions