Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Feb 2014 22:25:30 +1300 (NZDT)
From:      Andrew Childs <lorne@cons.org.nz>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/187133: www/trac: fix rc script; backport fix for upstream #11345
Message-ID:  <20140228092530.6D22F84@northind.cons.org.nz>
Resent-Message-ID: <201402280950.s1S9o3P4079204@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         187133
>Category:       ports
>Synopsis:       www/trac: fix rc script; backport fix for upstream #11345
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 28 09:50:02 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Childs
>Release:        FreeBSD 10.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD northind.cons.org.nz 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
>Description:

1. Add PYTHON_CMD to SUB_LIST to fix the following in the rc script:

    command="%%PYTHON_CMD%%"

2. Backport a fix from upstream #11345 [1]. Not a FreeBSD or ports
specific problem, but prevents some functionality from working by
default. If this is an inappropriate change for ports please
cherry-pick the SUB_LIST fix.

[1] http://trac.edgewall.org/ticket/11345

>How-To-Repeat:
	
>Fix:

	

--- trac.patch begins here ---
diff --git a/www/trac/Makefile b/www/trac/Makefile
index 24527ee..289fbd6 100644
--- a/www/trac/Makefile
+++ b/www/trac/Makefile
@@ -51,6 +51,7 @@ USE_PYTHON=		2
 USE_PYDISTUTILS=	yes
 PYDISTUTILS_AUTOPLIST=	yes
 USE_RC_SUBR=		tracd
+SUB_LIST=		PYTHON_CMD=${PYTHON_CMD}
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/sample-plugins
diff --git a/www/trac/files/patch-trac_util_translation.py b/www/trac/files/patch-trac_util_translation.py
new file mode 100644
index 0000000..4f68fe0
--- /dev/null
+++ b/www/trac/files/patch-trac_util_translation.py
@@ -0,0 +1,32 @@
+Backported from fixes contained in http://trac.edgewall.org/ticket/11345
+
+--- trac/util/translation.py.orig
++++ trac/util/translation.py
+@@ -150,6 +150,6 @@
+                 t = self._null_translations
+             else:
+-                t.add(Translations.load(locale_dir, locale or 'en_US',
+-                                        'tracini'))
++                self._add(t, Translations.load(locale_dir, locale or 'en_US',
++                                               'tracini'))
+                 if env_path:
+                     with self._plugin_domains_lock:
+@@ -157,5 +157,6 @@
+                         domains = domains.items()
+                     for domain, dirname in domains:
+-                        t.add(Translations.load(dirname, locale, domain))
++                        self._add(t, Translations.load(dirname, locale,
++                                                       domain))
+             self._current.translations = t
+             self._activate_failed = False
+@@ -184,4 +185,10 @@
+             return self._current.translations is not None \
+                    or self._activate_failed
++
++        # Internal methods
++
++        def _add(self, t, translations):
++            if isinstance(translations, Translations):
++                t.add(translations)
+ 
+         # Delegated methods
--- trac.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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