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

Fix installation of num for system switches #11207

Merged
merged 1 commit into from Jan 19, 2018
Merged

Conversation

@dra27
Copy link
Contributor

@dra27 dra27 commented Jan 10, 2018

See also #10857

The fixes to ocamlfind don't address the fact that the package was still attempting to write to the system's lib directory.

I've proposed the addition of a findlib-install target upstream, the patch for which is included in this PR.

@camelus
Copy link
Contributor

@camelus camelus commented Jan 10, 2018

All lint checks passed bedf285
  • These packages passed lint tests: num.1.0, num.1.1

Installability check (8198 → 8198)

@dra27
Copy link
Contributor Author

@dra27 dra27 commented Jan 10, 2018

Pull request amended to use findlib-uninstall as well, though it's unlikely using the normal uninstall target would have caused problems.

@dra27
Copy link
Contributor Author

@dra27 dra27 commented Jan 10, 2018

The Travis error on macOS previously was suspicious - let's see if it fails again with the new patches.

@mseri
Copy link
Member

@mseri mseri commented Jan 14, 2018

Still failing with ‘cannot find META.in’, as if it is not applying the patch

@dra27
Copy link
Contributor Author

@dra27 dra27 commented Jan 15, 2018

Hmm - perhaps renaming a file using a patch is not portable.

@dra27
Copy link
Contributor Author

@dra27 dra27 commented Jan 18, 2018

OK, I did a bit of testing on my own fork in Travis. It would appear that the patch utility in that version of Xcode patches the file, but doesn't rename it. I have no idea whether that's a bug or whether renaming files in a patch is not a portable to do, but I recreated the patches with --no-renames instead, so hopefully this will now pass CI.

@dra27 dra27 mentioned this pull request Jan 18, 2018
@dra27
Copy link
Contributor Author

@dra27 dra27 commented Jan 19, 2018

Huzzah - full Travis pass (finally!)

@mseri
Copy link
Member

@mseri mseri commented Jan 19, 2018

I think we should merge but I don't realy understand the docker error in datakit. @avsm is it fine to merge?

@kit-ty-kate
Copy link
Member

@kit-ty-kate kit-ty-kate commented Jan 19, 2018

The error is totally "normal". It should be fixed in a couple of days (some bugs in opam master).
Merging.

@kit-ty-kate kit-ty-kate merged commit 26cf83d into ocaml:master Jan 19, 2018
6 of 11 checks passed
dra27 added a commit to dra27/opam-repository that referenced this issue Jan 24, 2018
If the num library was installed in a system switch where the user had
write permissions to the system compiler's lib directory before ocaml#11207
was merged, then *fresh* installations of the ocamlfind package will
detect this "system" installation of num and create a META file for it.
This in turn will cause the num package installation to fail.
Annoyingly, this failure only appears once because opam then executes
ocamlfind remove num so a subsequent attempt to install the num package
will appear to have worked.

This patch displays a comprehensive error message the first time,
strongly suggesting that the user manually delete the files which were
incorrectly installed previously.
@RalfJung
Copy link
Contributor

@RalfJung RalfJung commented Jan 29, 2018

FYI, this change broke at least one reverse dependency of num: #11316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants