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

import with opam 2.2 of an export file created with 2.1.2 fails #5941

Closed
Khady opened this issue Apr 29, 2024 · 2 comments · Fixed by #5943
Closed

import with opam 2.2 of an export file created with 2.1.2 fails #5941

Khady opened this issue Apr 29, 2024 · 2 comments · Fixed by #5943
Projects
Milestone

Comments

@Khady
Copy link
Contributor

Khady commented Apr 29, 2024

$ opam sw import ./opam-switch-export-20240424-111440.txt --sw=.
Switch initialisation failed: clean up? ('n' will leave the switch partially installed)
[y/n] y
Fatal error:
Invalid_argument("Wrong padding")

The file was generated with

opam switch export --full opam-switch-export-20240424-111440.txt

I'll see if I can share the file without leaking details.

@kit-ty-kate
Copy link
Member

kit-ty-kate commented May 2, 2024

I had access to the file and the "Wrong padding" exception here is raised from the base64 library.

There seems to be an incompatibility between the base64 encoder from extlib (< 1.7.8) that was used before and the decoder from the base64 library (that is now used in 2.2 by 4d8229e). I'm having a deeper look

@kit-ty-kate
Copy link
Member

#5943 should fix this

Opam 2.2.0 automation moved this from For beta3 to Done May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Opam 2.2.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants