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.2.1.0~alpha] Errors while fetching sources return with exit code 31 instead of 40 #4214

Closed
kit-ty-kate opened this issue May 29, 2020 · 1 comment · Fixed by #4416
Closed
Projects

Comments

@kit-ty-kate
Copy link
Member

kit-ty-kate commented May 29, 2020

With opam 2.0, failures when fetching an archive that is inaccessible returns the exit code 40. For instance, with opam-repository in its current state (ocaml/opam-repository@a7eaf84):

$ opam install rfsm.1.4.2
[...]
[ERROR] The sources of the following couldn't be obtained, aborting:
          - rfsm.1.4.2: curl error code 404

$ echo $?
40

In opam 2.1.0~alpha however, even though the man page still specifies that:

EXIT STATUS
[...]
       40  Sync error. Could not fetch some remotes from the network. This can
           be a partial error.

the same command returns the exit code 31 instead:

$ opam install rfsm.1.4.2
[...]
#=== ERROR while fetching sources for rfsm.1.4.2 ==============================#
https://github.com/jserot/rfsm/archive/v1.4.2.tar.gz (curl: code 404 while downloading https://github.com/jserot/rfsm/archive/v1.4.2.tar.gz)

[...]
$ echo $?
31
@rjbou rjbou added this to To do in Opam 2.1.x via automation Jun 2, 2020
@rjbou rjbou modified the milestone: 2.1.0~beta Jun 2, 2020
@rjbou
Copy link
Collaborator

rjbou commented Jun 2, 2020

It's a consequence of #3777, as the download is now in the graph action, its failure is then an package action failure, which is 31.

Thanks for the report!

@rjbou rjbou moved this from To do to In Progress in Opam 2.1.x Nov 4, 2020
Opam 2.1.x automation moved this from In Progress to Done Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Opam 2.1.x
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants