Hi,

I keep being asked why unison fails to work since the upgrade to OCaml
4.02. Therefore I'd like to add this piece of information to the 
install message.
The patch is just for my convenience when debugging. Is it ok to commit 
this patch, too?
Unison comes in stable and snapshot versions. The snapshot version is 
outdated and broken. Can it be removed? Should it be updated?

Christopher



Index: Makefile
===================================================================
RCS file: /cvs/ports/net/unison/stable/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- Makefile    19 Sep 2014 12:56:23 -0000      1.23
+++ Makefile    16 Oct 2014 11:35:18 -0000
@@ -3,7 +3,7 @@
 COMMENT=       multi-platform file synchronization tool
 
 V=             2.40.102
-REVISION =     4
+REVISION =     5
 
 MASTER_SITES=  ${HOMEPAGE}download/releases/stable/
 
Index: patches/patch-uicommon_ml
===================================================================
RCS file: patches/patch-uicommon_ml
diff -N patches/patch-uicommon_ml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-uicommon_ml   16 Oct 2014 11:35:18 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+
+Don't discard backtraces for uncaught exceptions.
+
+--- uicommon.ml.orig   Tue Sep 23 11:23:39 2014
++++ uicommon.ml        Tue Sep 23 11:37:20 2014
+@@ -309,7 +309,8 @@ let reconItem2string oldPath theRI status =
+   let (r1, action, r2, path) = reconItem2stringList oldPath theRI in
+   Format.sprintf "%s %s %s %s %s" r1 (action2niceString action) r2 status path
+ 
+-let exn2string = function
++let exn2string exn = 
++  let s = match exn with
+     Sys.Break      -> "Terminated!"
+   | Util.Fatal(s)  -> Printf.sprintf "Fatal error: %s" s
+   | Util.Transient(s) -> Printf.sprintf "Error: %s" s
+@@ -323,6 +324,9 @@ let exn2string = function
+          | _                  -> "")
+   | Invalid_argument s -> Printf.sprintf "Invalid argument: %s" s
+   | other -> Printf.sprintf "Uncaught exception %s" (Printexc.to_string other)
++  in
++  s ^
++  if Printexc.backtrace_status () then "\n" ^ Printexc.get_backtrace () else 
""
+ 
+ (* precondition: uc = File (Updates(_, ..) on both sides *)
+ let showDiffs ri printer errprinter id =
Index: pkg/MESSAGE
===================================================================
RCS file: pkg/MESSAGE
diff -N pkg/MESSAGE
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/MESSAGE 16 Oct 2014 11:35:18 -0000
@@ -0,0 +1,6 @@
+Unison uses native OCaml marshalling in its prococol. This
+means that unison might not work when the OCaml versions of
+two instances are out of sync.
+One way to work around this limitation of unison is to use
+the OPAM OCaml package and compiler manager to sync the
+OCaml versions on your machines.
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/unison/stable/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   20 Nov 2012 15:18:31 -0000      1.3
+++ pkg/PLIST   16 Oct 2014 11:35:18 -0000
@@ -1,7 +1,5 @@
 @comment $OpenBSD: PLIST,v 1.3 2012/11/20 15:18:31 giovanni Exp $
 @bin bin/unison
-lib/ocaml/
-lib/ocaml/stublibs/
 share/doc/unison/
 share/doc/unison/BUGS.txt
 share/doc/unison/NEWS



-- http://gmerlin.de
OpenPGP: http://gmerlin.de/christopher.pub
F190 D013 8F01 AA53 E080  3F3C F17F B0A1 D44E 4FEE

Attachment: signature.asc
Description: PGP signature

Reply via email to