-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Could not update local repository: processed-patch failed #3433
Comments
Thanks for reporting. If you have tested an earlier beta or rc, it would be useful to know whether the error is new or wals already there? Thanks. |
I'm not 100% sure, but I think I saw it also with rc2, but did not test any earlier version. 1.2 had no problems updating repositories. |
OK, I found the problem. Question remains on how to fix it. Index: src/core/opamSystem.ml
--- src/core/opamSystem.ml.orig
+++ src/core/opamSystem.ml
@@ -1131,7 +1131,9 @@ let patch ~dir p =
raise Not_found);
let p' = temp_file ~auto_clean:false "processed-patch" in
translate_patch ~dir p p';
- make_command ~name:"patch" ~dir "patch" ["-p1"; "-i"; p'] @@> fun r ->
+ make_command
+ ~env:Array.(append default_env [|"POSIXLY_CORRECT=yes"|])
+ ~name:"patch" ~dir "patch" ["-p1"; "-i"; p'] @@> fun r ->
if not (OpamConsole.debug ()) then Sys.remove p';
if OpamProcess.is_success r then Done None
else Done (Some (Process_error r)) The other half of the problem is OpenBSD |
This issue was actually reproduced on Linux too. In that case, it's due to several factors:
This combination results in a dire breakage on the Thanks for reporting: this will need to be fixed before 2.0.0 proper. |
Note: if you are in the broken state after the 1.2.2 update:
Solution:
|
I can confirm OpenBSD's patch is broken for binary content. |
Can the diff be confined to the "interesting" files? Like so: for x in repo version packages
do
diff -aurN "opam/repo/local/$x" "opam/repo/local.new/$x"
done >diff |
Ok, thanks. We'll probably require |
Has this been fixed or worked around yet? I am writing the new up-and-running page for ocaml.org, so I copied the instructions from opam.ocaml.org to use |
Patch underway: Homebrew/homebrew-core#64301 |
Yes,
|
This was fixed in 2.1.6 by #5893 |
On OpenBSD I regularly get this error when updating from my local opam repository:
I can work around this problem by removing and re-adding the repository.
The text was updated successfully, but these errors were encountered: