Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2018 18:12:14 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r458159 - in head/net/unison: . files
Message-ID:  <201801051812.w05ICEEn013319@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Fri Jan  5 18:12:14 2018
New Revision: 458159
URL: https://svnweb.freebsd.org/changeset/ports/458159

Log:
  Import upstream patch to fix crash in certain situations.
  
  Obtained from:	https://github.com/bcpierce00/unison/commit/ed12af1f890623b4aff8b08316ca473a00ebf45e#diff-b4c630fa7a766bd2e17a1838276ea339
  MFH:		2018Q1

Added:
  head/net/unison/files/patch-copy.ml   (contents, props changed)
Modified:
  head/net/unison/Makefile

Modified: head/net/unison/Makefile
==============================================================================
--- head/net/unison/Makefile	Fri Jan  5 17:44:48 2018	(r458158)
+++ head/net/unison/Makefile	Fri Jan  5 18:12:14 2018	(r458159)
@@ -3,7 +3,7 @@
 
 PORTNAME=	unison
 PORTVERSION=	2.48.4
-PORTREVISION?=	1
+PORTREVISION?=	2
 CATEGORIES=	net
 MASTER_SITES=	http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${DISTNAME}/
 DISTFILES=	${EXTRACT_ONLY} ${EXTRA_DOCS}

Added: head/net/unison/files/patch-copy.ml
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/unison/files/patch-copy.ml	Fri Jan  5 18:12:14 2018	(r458159)
@@ -0,0 +1,20 @@
+diff --git a/src/copy.ml b/src/copy.ml
+index b9e10f6..19c2370 100644
+--- copy.ml
++++ copy.ml
+@@ -1004,7 +1004,14 @@ let recursively fspathFrom pathFrom fspathTo pathTo =
+         let ch = Os.childrenOf fspathFrom pFrom in
+         Safelist.iter
+           (fun n -> copy (Path.child pFrom n) (Path.child pTo n)) ch
+-    | `ABSENT -> assert false in
++    | `ABSENT ->
++        (* BCP 4/16: Was "assert false", but this causes unison to
++           crash when (1) the copyonconflict preference is used, (2) 
++           there is a conflict between a deletion and a change, and
++           (3) the change is propagated on top of the deletion.  Seems
++           better to silently ignore the copy request. *)
++        ()
++    in
+   debug (fun () -> Util.msg "  Copying recursively %s / %s\n"
+     (Fspath.toDebugString fspathFrom) (Path.toString pathFrom));
+   copy pathFrom pathTo;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801051812.w05ICEEn013319>