summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2006-11-15 03:04:42 +0000
committerSteve Arnold <nerdboy@gentoo.org>2006-11-15 03:04:42 +0000
commitdf560afa6d16dd4aa3875b5f2dc83807c23f71a4 (patch)
tree2a53f41a8eb51faaca35f037d75ed4d3e4cbe310 /net-misc/unison
parentMarked ~hppa (bug #154244). (diff)
downloadgentoo-2-df560afa6d16dd4aa3875b5f2dc83807c23f71a4.tar.gz
gentoo-2-df560afa6d16dd4aa3875b5f2dc83807c23f71a4.tar.bz2
gentoo-2-df560afa6d16dd4aa3875b5f2dc83807c23f71a4.zip
adding patch for more robust io-handling (back-ported from current trunk)
(Portage version: 2.1.2_rc1-r6)
Diffstat (limited to 'net-misc/unison')
-rw-r--r--net-misc/unison/ChangeLog9
-rw-r--r--net-misc/unison/files/digest-unison-2.17.1-r16
-rw-r--r--net-misc/unison/files/unison-2.17.1-io-error.patch66
-rw-r--r--net-misc/unison/unison-2.17.1-r1.ebuild5
4 files changed, 84 insertions, 2 deletions
diff --git a/net-misc/unison/ChangeLog b/net-misc/unison/ChangeLog
index 6e289e4c5421..5fa66d063836 100644
--- a/net-misc/unison/ChangeLog
+++ b/net-misc/unison/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/unison
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/unison/ChangeLog,v 1.40 2006/09/12 15:55:09 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/unison/ChangeLog,v 1.41 2006/11/15 03:04:42 nerdboy Exp $
+
+ 15 Nov 2006; Steve Arnold <nerdboy@gentoo.org>
+ +files/unison-2.17.1-io-error.patch, unison-2.17.1-r1.ebuild:
+ Adding a patch for more robust io-handling (back-ported from the current
+ Trunk). It fixes an I/O failure in unattended sync operations (eg, when
+ used in a cron job). No telling when the next "official" upstream release
+ will occur...
12 Sep 2006; Gustavo Zacarias <gustavoz@gentoo.org> unison-2.13.16.ebuild:
Stable on sparc
diff --git a/net-misc/unison/files/digest-unison-2.17.1-r1 b/net-misc/unison/files/digest-unison-2.17.1-r1
index 4f433147a008..7e39808c2c8d 100644
--- a/net-misc/unison/files/digest-unison-2.17.1-r1
+++ b/net-misc/unison/files/digest-unison-2.17.1-r1
@@ -1,3 +1,9 @@
MD5 6c782837db28944b6083adc37eff2b28 unison-2.17.1-manual.html 219449
+RMD160 30139b6ec047cd00878741ace62c49b2c0421e2e unison-2.17.1-manual.html 219449
+SHA256 941078f73580d465fd91590dbaaf060489ae5a05d8db2359747134c0442e64ed unison-2.17.1-manual.html 219449
MD5 e619b39db27ec8dbc36db35e808dd3bb unison-2.17.1-manual.pdf 404886
+RMD160 2936665534f9db0fa64c7686e8535bc09d9d6132 unison-2.17.1-manual.pdf 404886
+SHA256 d0cd1a3bbc26a3c7acfa51144dd8212a76a856032c6b213a5aa74e40200f299f unison-2.17.1-manual.pdf 404886
MD5 c62611dda096da360ad645fad8e8ce3e unison-2.17.1.tar.gz 415057
+RMD160 7b5143d160c09cefd6027807ca54c02e83265008 unison-2.17.1.tar.gz 415057
+SHA256 7a1173921237dd3e0ca758f4ba902a3d54eb04385a4450459f349a8846b7052c unison-2.17.1.tar.gz 415057
diff --git a/net-misc/unison/files/unison-2.17.1-io-error.patch b/net-misc/unison/files/unison-2.17.1-io-error.patch
new file mode 100644
index 000000000000..eea448534504
--- /dev/null
+++ b/net-misc/unison/files/unison-2.17.1-io-error.patch
@@ -0,0 +1,66 @@
+diff -uNr unison-2.17.1.orig/stasher.ml unison-2.17.1/stasher.ml
+--- unison-2.17.1.orig/stasher.ml 2005-08-11 17:26:59.000000000 -0700
++++ unison-2.17.1/stasher.ml 2006-09-13 12:04:18.000000000 -0700
+@@ -314,23 +314,36 @@
+ (Path.toString backPath)
+ (Fspath.toString backRoot));
+ try Os.rename fspath path backRoot backPath
+- with
+- _ ->
+- ((let info = Fileinfo.get true fspath path in
+- match info.Fileinfo.typ with
+- `SYMLINK ->
+- Os.symlink
+- backRoot backPath
+- (Os.readLink fspath path)
+- | _ ->
+- Copy.localFile
+- fspath path
+- backRoot backPath backPath
+- `Copy
+- info.Fileinfo.desc
+- (Osx.ressLength info.Fileinfo.osX.Osx.ressInfo)
+- None);
+- Os.delete fspath path)
++ with
++ _ ->
++ debug (fun () -> Util.msg "Rename failed -- copying instead\n");
++ let rec copy p backp =
++ let info = Fileinfo.get true fspath p in
++ match info.Fileinfo.typ with
++ | `SYMLINK ->
++ debug (fun () -> Util.msg " Copying link %s / %s to %s / %s\n"
++ (Fspath.toString fspath) (Path.toString p)
++ (Fspath.toString backRoot) (Path.toString backp));
++ Os.symlink backRoot backp (Os.readLink fspath p)
++ | `FILE ->
++ debug (fun () -> Util.msg " Copying file %s / %s to %s / %s\n"
++ (Fspath.toString fspath) (Path.toString p)
++ (Fspath.toString backRoot) (Path.toString backp));
++ Copy.localFile fspath p backRoot backp backp
++ `Copy info.Fileinfo.desc
++ (Osx.ressLength info.Fileinfo.osX.Osx.ressInfo) None
++ | `DIRECTORY ->
++ debug (fun () -> Util.msg " Copying directory %s / %s to %s / %s\n"
++ (Fspath.toString fspath) (Path.toString p)
++ (Fspath.toString backRoot) (Path.toString backp));
++ Os.createDir backRoot backp info.Fileinfo.desc;
++ let ch = Os.childrenOf fspath p in
++ Safelist.iter (fun n -> copy (Path.child p n) (Path.child backp n)) ch
++ | `ABSENT -> assert false in
++ copy path backPath;
++ debug (fun () -> Util.msg " Finished copying; deleting %s / %s\n"
++ (Fspath.toString fspath) (Path.toString path));
++ Os.delete fspath path
+ end else begin
+ debug ( fun () -> Util.msg
+ "File %s in %s will not be backed up.\n"
+diff -uNr unison-2.17.1.orig/uutil.ml unison-2.17.1/uutil.ml
+--- unison-2.17.1.orig/uutil.ml 2005-08-11 17:26:59.000000000 -0700
++++ unison-2.17.1/uutil.ml 2006-09-13 12:01:33.000000000 -0700
+@@ -123,4 +123,4 @@
+ end else if !l > 0 then
+ notify !l
+ in
+- Util.convertUnixErrorsToTransient "readWrite" (fun () -> read len)
++ Util.convertUnixErrorsToTransient "readWriteBounded" (fun () -> read len)
diff --git a/net-misc/unison/unison-2.17.1-r1.ebuild b/net-misc/unison/unison-2.17.1-r1.ebuild
index 24121f8ef451..8f73c4846afa 100644
--- a/net-misc/unison/unison-2.17.1-r1.ebuild
+++ b/net-misc/unison/unison-2.17.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/unison/unison-2.17.1-r1.ebuild,v 1.2 2006/07/04 13:01:03 mattam Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/unison/unison-2.17.1-r1.ebuild,v 1.3 2006/11/15 03:04:42 nerdboy Exp $
inherit eutils
@@ -30,6 +30,9 @@ pkg_setup() {
src_unpack() {
unpack ${P}.tar.gz
+ # backport patch for file-io error (fixed in current trunk)
+ EPATCH_OPTS="-d ${S} -p1"
+ epatch ${FILESDIR}/${P}-io-error.patch
# Fix for coreutils change of tail syntax
cd ${S}