[Nix-dev] [PATCH] cvs -z3 hanged. Applying gentoo patch. See comment
Marc Weber
marco-oweber at gmx.de
Sun Aug 1 14:51:12 CEST 2010
---
.../version-management/cvs/default.nix | 7 ++++-
.../applications/version-management/cvs/zlib.patch | 31 ++++++++++++++++++++
2 files changed, 37 insertions(+), 1 deletions(-)
create mode 100644 pkgs/applications/version-management/cvs/zlib.patch
diff --git a/pkgs/applications/version-management/cvs/default.nix b/pkgs/applications/version-management/cvs/default.nix
index 05b33f2..8c38937 100644
--- a/pkgs/applications/version-management/cvs/default.nix
+++ b/pkgs/applications/version-management/cvs/default.nix
@@ -8,7 +8,12 @@ stdenv.mkDerivation {
sha256 = "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq";
};
- patches = [ ./getcwd-chroot.patch ];
+ patches = [ ./getcwd-chroot.patch
+ # patch taken from gentoo:
+ # without it this command hangs:
+ # cvs -z3 -d:pserver:anonymous at cvs.motion-twin.com:/cvsroot co ocaml/extlib-dev
+ ./zlib.patch
+ ];
preConfigure =
# Apply the Debian patches.
diff --git a/pkgs/applications/version-management/cvs/zlib.patch b/pkgs/applications/version-management/cvs/zlib.patch
new file mode 100644
index 0000000..234c6c1
--- /dev/null
+++ b/pkgs/applications/version-management/cvs/zlib.patch
@@ -0,0 +1,31 @@
+Index: src/zlib.c
+===================================================================
+RCS file: /sources/cvs/ccvs/src/zlib.c,v
+retrieving revision 1.31
+retrieving revision 1.32
+diff -u -r1.31 -r1.32
+--- a/src/zlib.c 3 Jun 2005 18:26:09 -0000 1.31
++++ b/src/zlib.c 28 Oct 2005 14:10:59 -0000 1.32
+@@ -221,15 +221,14 @@
+ point. */
+ assert (bd->size == 0);
+
+- /* This will work well in the server, because this call will
+- do an unblocked read and fetch all the available data. In
+- the client, this will read a single byte from the stdio
+- stream, which will cause us to call inflate once per byte.
+- It would be more efficient if we could make a call which
+- would fetch all the available bytes, and at least one byte. */
+-
++ /* On the server, this will do an unblocking read of as much data as is
++ * available. On the client, with a blocking input descriptor and the
++ * current fd_buffer implementation, this should read as much data as
++ * is currently available, and at least 1 byte (or EOF), from the
++ * underlying buffer.
++ */
+ status = (*cb->buf->input) (cb->buf->closure, bd->text,
+- need, BUFFER_DATA_SIZE, &nread);
++ need ? 1 : 0, BUFFER_DATA_SIZE, &nread);
+
+ if (status == -2)
+ /* Don't try to recover from memory allcoation errors. */
--
1.7.1
More information about the nix-dev
mailing list