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

Opam does install package despite download hash error #4305

Open
MSoegtropIMC opened this issue Aug 6, 2020 · 3 comments
Open

Opam does install package despite download hash error #4305

MSoegtropIMC opened this issue Aug 6, 2020 · 3 comments

Comments

@MSoegtropIMC
Copy link

In a local patch opam repo I did a mistake in setting the download hash (I used the wrong type). Opam did detect the error but installed the package anyway. Is this expected behavior?

[ERROR] In the opam file for coq-unicoq.1.3+8.11:
          - At
            /Users/msoegtrop/.opam/repo/patch_coq-platform_.8.11.2.alpha1/packages/coq-unicoq/coq-unicoq.1.3+8.11/opam:22:145:
            while expecting checksum: Invalid_argument("OpamHash.of_string")
        'url.checksum' has been ignored.
The following actions will be performed:
  - install coq-unicoq 1.3+8.11

opam version = 2.0.7.

@rjbou rjbou added this to To do in Opam 2.1.x via automation Aug 10, 2020
@rjbou rjbou added this to the 2.1.0~beta milestone Aug 10, 2020
@rjbou
Copy link
Collaborator

rjbou commented Aug 10, 2020

It is the expected behavior as it is an parsing error and the field is not mandatory, so a wrong checksum (because of an parse error) results on a missing checksum.

@MSoegtropIMC
Copy link
Author

I must say I don't find this very agreeable. It is easy to overlook this - I tend to install 50 opam packages en batch. Are there good reasons for this choice or is it more that this is what the implementation does without explicitly handling it otherwise?

@rjbou rjbou modified the milestones: 2.1.0~beta, 2.1.0 Aug 26, 2020
@dra27 dra27 modified the milestones: 2.1.0, 2.2.0~alpha Jan 22, 2021
@dra27 dra27 removed this from To do in Opam 2.1.x Jan 22, 2021
@dra27
Copy link
Member

dra27 commented Jan 22, 2021

This definitely needs to be fixed, but we'll address this for opam 2.2 as part of a wider check of the checksums!

@dra27 dra27 added this to To do in Opam 2.2.0 via automation Jul 8, 2021
@dra27 dra27 moved this from To do to Bump to 2.3? in Opam 2.2.0 Jan 13, 2022
@dra27 dra27 added this to To do in Opam 2.3 via automation May 17, 2022
@dra27 dra27 removed this from Bump to 2.3? in Opam 2.2.0 May 17, 2022
@dra27 dra27 removed this from the 2.2.0~alpha milestone May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Opam 2.3
  
To do
Development

No branches or pull requests

3 participants