-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Possible breakage in opam update #25961
Comments
There is a pretty big problem though: the breakage is silent. This should not be advertise as "possible breakage" but Giant Warning to anyone still not using GNU patch on macOS instead and it might not be "breaking" |
What do you reckon we should do? Should we revert the change? Ping also @hannesm
|
My point of view is:
There's a workaround for those affected: |
And finally, I don't see a way to have a failsafe and smooth transition. Of course we could wait (forever?) until everyone updated to 2.1.6. We could also push for a release of opam where "if extra_source is present, a extra_file doesn't overwrite it" - but that also would mean to wait for an unknown time until everybody upgraded to that new opam release. Given that we don't have any statistics about "opam version usage", I see no point in delaying. |
The discuss post announces this as a policy change, which i think is fair to understand this way. However one thing that hasn't been done is to codify it in https://github.com/ocaml/opam-repository/wiki/Policies, could anyone write an amendment for it? |
I was wondering whether such a patch would be sensible (and would work): diff --git a/repo b/repo
index ff07c1813e..8e7eb9533c 100644
--- a/repo
+++ b/repo
@@ -8,4 +8,7 @@ announce: [
"""
[INFO] opam 2.1 includes many performance improvements over 2.0; please consider upgrading (https://opam.ocaml.org/doc/Install.html)
""" {opam-version >= "2.0.10" & opam-version < "2.1.0~~"}
+"""
+[WARNING] please ensure to have GNU patch installed as `patch`. Otherwise update may fail silently (since it can't remove files).
+""" {os = "macos" & opam-version < "2.1.6"}
] |
I also opened #25963 to guide contributors how to use |
yes i think it would be nice, however currently users of the default opam-repository (via opam.ocaml.org) use a different I'm not sure if there is a clean way to merge both (use opam-repository's |
I opened ocaml-opam/opam2web#234 which should work smoothly (at least with my knowledge and tests of shell) -- of course a review would be welcome. See #25967 for the update above. |
Updating the opam package repository can silently fail when using macos patch whenever files are removed upstream. As of opam 2.1.6 there is a warning on install to manually install gpatch to avoid any possible issue and the corruption of the local switches. See also ocaml/opam-repository#25961 This commit adds a dependency to gpatch to prevent any issue and avoid unnecessary manual intervention. Signed-off-by: Marcello Seri <[email protected]>
I have also checked the dependency on gpatch for some macos package managers
|
Updating the opam package repository can silently fail when using macos patch whenever files are removed upstream. As of opam 2.1.6 there is a warning on install to manually install gpatch to avoid any possible issue and the corruption of the local switches. See also ocaml/opam-repository#25961 This commit adds a dependency to gpatch to prevent any issue and avoid unnecessary manual intervention. Signed-off-by: Marcello Seri <[email protected]>
I think this has been worked out of the system by this point. Are we OK to close it? |
I suggest we make an entry on the FAQ in the Wiki with the specific error for this issue and the command to fix it, and then close this issue |
Due to the removal of some files, your opam repository may fail to update properly (on macos or bsd, if you don't have gpatch installed). If this is the case please install gpatch or delete
$OPAMROOT/repo/default{,.tar.gz}
and re-doopam update
apologies for the inconvenience.The text was updated successfully, but these errors were encountered: