diff --git a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix index 0017c13a7874..e333e6ab31fd 100644 --- a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix +++ b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix @@ -11,7 +11,9 @@ buildPythonPackage (rec { sha256 = "10j6s4wqqxb0x6plwvfnabxxl0k8jy1g1dfsrhpfgdi42f25dain"; }; - patchPhase = '' + patches = [ ./fix-test-copy-using-filecap.patch ]; + + postPatch = '' echo "forcing the use of \`setuptools' 0.6c9 rather than an unreleased version" for i in *setup.py do diff --git a/pkgs/tools/networking/p2p/tahoe-lafs/fix-test-copy-using-filecap.patch b/pkgs/tools/networking/p2p/tahoe-lafs/fix-test-copy-using-filecap.patch new file mode 100644 index 000000000000..9318e0fa204d --- /dev/null +++ b/pkgs/tools/networking/p2p/tahoe-lafs/fix-test-copy-using-filecap.patch @@ -0,0 +1,23 @@ +From http://allmydata.org/trac/tahoe/ticket/936 . + +Wed Feb 3 23:13:37 GMT Standard Time 2010 david-sarah@jacaranda.org + * Fix race condition in allmydata.test.test_cli.Cp.test_copy_using_filecap +diff -rN -u old-tahoe/src/allmydata/test/test_cli.py new-tahoe/src/allmydata/test/test_cli.py +--- old-tahoe/src/allmydata/test/test_cli.py 2010-02-03 23:20:06.803000000 +0000 ++++ new-tahoe/src/allmydata/test/test_cli.py 2010-02-03 23:20:10.483000000 +0000 +@@ -1007,13 +1007,13 @@ + self.set_up_grid() + outdir = os.path.join(self.basedir, "outdir") + os.mkdir(outdir) +- self.do_cli("create-alias", "tahoe") + fn1 = os.path.join(self.basedir, "Metallica") + fn2 = os.path.join(outdir, "Not Metallica") + fn3 = os.path.join(outdir, "test2") + DATA1 = "puppies" * 10000 + open(fn1, "wb").write(DATA1) +- d = self.do_cli("put", fn1) ++ d = self.do_cli("create-alias", "tahoe") ++ d.addCallback(lambda res: self.do_cli("put", fn1)) + def _put_file((rc, out, err)): + self.failUnlessEqual(rc, 0) + # keep track of the filecap