summaryrefslogtreecommitdiff
path: root/www/trac
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2014-03-11 17:41:44 +0000
committergdt <gdt@pkgsrc.org>2014-03-11 17:41:44 +0000
commitb5e2d7f301739838f99939136e9554152950e2dc (patch)
tree1a7771b4d9989a2f8f968c0b412eb4390912914f /www/trac
parent76740313a3ac624b6ff51288f485f40d39d80cb1 (diff)
downloadpkgsrc-b5e2d7f301739838f99939136e9554152950e2dc.tar.gz
Add patch to avoid exception in git browser.
The underlying issue seems to be a race; if the spawned git log command finishes before trac kills it, the os.kill() throws an exception which is not caught. Simply catch and ignore the exception. I sent the patch to trac-devel@.
Diffstat (limited to 'www/trac')
-rw-r--r--www/trac/Makefile3
-rw-r--r--www/trac/distinfo3
-rw-r--r--www/trac/patches/patch-tracopt_versioncontrol_git_PyGIT.py34
3 files changed, 38 insertions, 2 deletions
diff --git a/www/trac/Makefile b/www/trac/Makefile
index 69eaa57dc60..3ef66cfe1dc 100644
--- a/www/trac/Makefile
+++ b/www/trac/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.63 2014/01/25 10:45:22 wiz Exp $
+# $NetBSD: Makefile,v 1.64 2014/03/11 17:41:44 gdt Exp $
DISTNAME= Trac-1.0.1
PKGNAME= ${DISTNAME:tl}
+PKGREVISION= 1
CATEGORIES= devel www
MASTER_SITES= http://ftp.edgewall.org/pub/trac/ \
ftp://ftp.edgewall.org/pub/trac/
diff --git a/www/trac/distinfo b/www/trac/distinfo
index abe8c9291bb..2201baf57cd 100644
--- a/www/trac/distinfo
+++ b/www/trac/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.32 2014/01/21 22:29:33 gdt Exp $
+$NetBSD: distinfo,v 1.33 2014/03/11 17:41:44 gdt Exp $
SHA1 (Trac-1.0.1.tar.gz) = b4fffeb171a64299597be616002aee44054673f6
RMD160 (Trac-1.0.1.tar.gz) = db9abe8f7e52b28aa933187fd2be40bb4a544617
Size (Trac-1.0.1.tar.gz) = 3479896 bytes
+SHA1 (patch-tracopt_versioncontrol_git_PyGIT.py) = e0ccdbe2c6a0dc83009460a214763d9d5eccdf04
diff --git a/www/trac/patches/patch-tracopt_versioncontrol_git_PyGIT.py b/www/trac/patches/patch-tracopt_versioncontrol_git_PyGIT.py
new file mode 100644
index 00000000000..05ab40815f6
--- /dev/null
+++ b/www/trac/patches/patch-tracopt_versioncontrol_git_PyGIT.py
@@ -0,0 +1,34 @@
+$NetBSD: patch-tracopt_versioncontrol_git_PyGIT.py,v 1.1 2014/03/11 17:41:44 gdt Exp $
+
+The git browser can fail if the git log process has already exited when
+trac tries to terminate it (resulting in a python exception).
+
+This patch should be applied upstream; Reported to trac-devel@ on 2014-03-11.
+
+--- tracopt/versioncontrol/git/PyGIT.py.orig 2013-02-01 00:47:41.000000000 +0000
++++ tracopt/versioncontrol/git/PyGIT.py
+@@ -913,7 +913,11 @@ class Storage(object):
+ except ValueError:
+ break
+ f.close()
+- terminate(p[0])
++ # The process may or may not have finished.
++ try:
++ terminate(p[0])
++ except:
++ pass
+ p[0].wait()
+ p[:] = []
+ while True:
+@@ -930,7 +934,10 @@ class Storage(object):
+
+ if p:
+ p[0].stdout.close()
+- terminate(p[0])
++ try:
++ terminate(p[0])
++ except:
++ pass
+ p[0].wait()
+
+ def last_change(self, sha, path, historian=None):