[Python-apps-commits] r4794 - in packages/trac/trunk/debian (6 files)
debacle at users.alioth.debian.org
debacle at users.alioth.debian.org
Wed Feb 17 07:39:20 UTC 2010
Date: Wednesday, February 17, 2010 @ 07:39:18
Author: debacle
Revision: 4794
Package version 0.11.6-3.
Added:
packages/trac/trunk/debian/patches/80_correct_plugin_names.dpatch
Modified:
packages/trac/trunk/debian/README.Debian
packages/trac/trunk/debian/changelog
packages/trac/trunk/debian/control
packages/trac/trunk/debian/copyright
packages/trac/trunk/debian/patches/00list
Modified: packages/trac/trunk/debian/README.Debian
===================================================================
--- packages/trac/trunk/debian/README.Debian 2010-02-16 22:49:07 UTC (rev 4793)
+++ packages/trac/trunk/debian/README.Debian 2010-02-17 07:39:18 UTC (rev 4794)
@@ -169,7 +169,15 @@
3. A patch to use UTF-8 per default, as this is the default and
preferred encoding on Debian systems.
+jQuery version
+--------------
+Note, that Trac 0.11 ships with jQuery 1.2, while Debian ships
+with jQuery 1.4 at the moment. This might lead to problems with
+certain Trac plugins that use jQuery functions that are not
+present any more. See http://bugs.debian.org/562859 for details.
+Sorry for any inconvenience.
+
Enjoy!
/The Trac Team
Modified: packages/trac/trunk/debian/changelog
===================================================================
--- packages/trac/trunk/debian/changelog 2010-02-16 22:49:07 UTC (rev 4793)
+++ packages/trac/trunk/debian/changelog 2010-02-17 07:39:18 UTC (rev 4794)
@@ -1,9 +1,13 @@
-trac (0.11.6-) UNRELEASED; urgency=low
+trac (0.11.6-3) unstable; urgency=low
[ Jakub Wilk ]
* Replace deprecated > operator with >=.
+ [ W. Martin Borgert ]
+ * Fix problem with wrong plugin names (Closes: #562963). Thanks to
+ Anatoly Techtonik <techtonik at gmail.com> for providing the patch.
+ * Added some Trac plugins as suggestions.
- --
+ -- W. Martin Borgert <debacle at debian.org> Sun, 07 Feb 2010 13:06:32 +0000
trac (0.11.6-2) unstable; urgency=low
Modified: packages/trac/trunk/debian/control
===================================================================
--- packages/trac/trunk/debian/control 2010-02-16 22:49:07 UTC (rev 4793)
+++ packages/trac/trunk/debian/control 2010-02-17 07:39:18 UTC (rev 4794)
@@ -15,7 +15,7 @@
Architecture: all
Depends: ${python:Depends}, python-setuptools, python (>= 2.5) | python-pysqlite2 (>= 2.3.2) | python-psycopg2 (>= 1.2.1) | python-mysqldb, python-genshi (>= 0.5)
Recommends: apache2 | httpd, python-subversion, libjs-jquery, python-pygments (>= 0.6) | enscript, python-tz
-Suggests: python-docutils, libapache2-mod-wsgi | libapache2-mod-python, python-textile (>= 2.0), trac-git, trac-spamfilter, trac-bzr (>= 0.2+bzr45), trac-mercurial (>= 0.11.0.4), trac-accountmanager, trac-email2trac
+Suggests: python-docutils, libapache2-mod-wsgi | libapache2-mod-python, python-textile (>= 2.0), trac-git, trac-spamfilter, trac-bzr (>= 0.2+bzr45), trac-mercurial (>= 0.11.0.4), trac-accountmanager, trac-email2trac, trac-xmlrpc, trac-wysiwyg, trac-mastertickets, trac-customfieldadmin, trac-bitten, trac-authopenid, trac-graphviz, trac-ja-resource
Conflicts: libapache2-mod-python2.3 (<< 3.2.8-3)
Description: Enhanced wiki and issue tracking system for software development projects
Trac uses a minimalistic approach to web-based software project management.
Modified: packages/trac/trunk/debian/copyright
===================================================================
--- packages/trac/trunk/debian/copyright 2010-02-16 22:49:07 UTC (rev 4793)
+++ packages/trac/trunk/debian/copyright 2010-02-17 07:39:18 UTC (rev 4794)
@@ -49,4 +49,4 @@
Foundation; version 2.
b) the MIT license.
On Debian GNU/Linux systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'
+Public License can be found in `/usr/share/common-licenses/GPL-2'
Modified: packages/trac/trunk/debian/patches/00list
===================================================================
--- packages/trac/trunk/debian/patches/00list 2010-02-16 22:49:07 UTC (rev 4793)
+++ packages/trac/trunk/debian/patches/00list 2010-02-17 07:39:18 UTC (rev 4794)
@@ -5,3 +5,4 @@
50_sqlitetopg_script.dpatch
60_roadmap_dbx_cursor_fix.dpatch
70_cache_control_typo.dpatch
+80_correct_plugin_names.dpatch
Added: packages/trac/trunk/debian/patches/80_correct_plugin_names.dpatch
===================================================================
--- packages/trac/trunk/debian/patches/80_correct_plugin_names.dpatch (rev 0)
+++ packages/trac/trunk/debian/patches/80_correct_plugin_names.dpatch 2010-02-17 07:39:18 UTC (rev 4794)
@@ -0,0 +1,141 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 80_correct_plugin_names.dpatch by Anatoly Techtonik <techtonik at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fixes problem with wrong plugin names
+
+ at DPATCH@
+
+Index: trac/mimeview/pygments.py
+===================================================================
+--- orig/trac/mimeview/pygments.py (revision 9000)
++++ patch/trac/mimeview/pygments.py (working copy)
+@@ -21,7 +21,7 @@
+ from trac.config import ListOption, Option
+ from trac.mimeview.api import IHTMLPreviewRenderer, Mimeview
+ from trac.prefs import IPreferencePanelProvider
+-from trac.util import get_module_path, get_pkginfo
++from trac.util import get_pkginfo
+ from trac.util.datefmt import http_date, localtz
+ from trac.util.translation import _
+ from trac.web import IRequestHandler
+Index: trac/admin/web_ui.py
+===================================================================
+--- orig/trac/admin/web_ui.py (revision 9000)
++++ patch/trac/admin/web_ui.py (working copy)
+@@ -28,7 +28,7 @@
+ from trac.admin.api import IAdminPanelProvider
+ from trac.core import *
+ from trac.perm import PermissionSystem, IPermissionRequestor
+-from trac.util import get_pkginfo, get_module_path
++from trac.util import get_pkginfo, get_package_path
+ from trac.util.compat import partial
+ from trac.util.text import exception_to_unicode, to_unicode
+ from trac.util.translation import _
+@@ -394,9 +394,6 @@
+ 'Environment', 'EnvironmentSetup', 'PermissionSystem',
+ 'RequestDispatcher', 'Mimeview', 'Chrome')
+
+- def __init__(self):
+- self.trac_path = get_module_path(sys.modules['trac.core'])
+-
+ # IAdminPanelProvider methods
+
+ def get_admin_panels(self, req):
+@@ -589,15 +586,28 @@
+ return 'admin_plugins.html', data
+
+ def _find_distribution(self, module):
+- path = get_module_path(module)
+- if path == self.trac_path:
+- return pkg_resources.Distribution(project_name='Trac',
+- version=TRAC_VERSION,
+- location=path)
+- for dist in pkg_resources.find_distributions(path, only=True):
++ """Trac plugins are either modules that are imported from trac.plugins
++ entrypoint with pkg_resources, or modules that are located directly
++ inside "plugins" folder in environment.
++ """
++ entrypoints = list(pkg_resources.iter_entry_points("trac.plugins"))
++ ep_modules = [ep.module_name for ep in entrypoints]
++ module_name = module.__name__
++
++ while module_name not in ep_modules and "." in module_name:
++ module_name = module_name.rsplit('.',1)[0]
++ if module_name in ep_modules:
++ return entrypoints[ep_modules.index(module_name)].dist
++ # if exact entrypoint is not found - attempt to get Distribution
++ # for the parent package (works for Trac components)
++ package = get_package_path(module)
++ try:
++ dist = pkg_resources.get_distribution(os.path.basename(package))
+ return dist
+- else:
+- # This is a plain Python source file, not an egg
+- return pkg_resources.Distribution(project_name=module.__name__,
++ except pkg_resources.DistributionNotFound:
++ pass
++ # Plain Python import
++ return pkg_resources.Distribution(project_name=module.__name__,
+ version='',
+ location=module.__file__)
++
+Index: trac/web/chrome.py
+===================================================================
+--- orig/trac/web/chrome.py (revision 9000)
++++ patch/trac/web/chrome.py (working copy)
+@@ -39,7 +39,7 @@
+ from trac.mimeview import get_mimetype, Context
+ from trac.resource import *
+ from trac.util import compat, get_reporter_id, presentation, get_pkginfo, \
+- get_module_path, translation
++ translation
+ from trac.util.compat import partial, set
+ from trac.util.html import escape, plaintext
+ from trac.util.text import pretty_size, obfuscate_email_address, \
+Index: trac/util/__init__.py
+===================================================================
+--- orig/trac/util/__init__.py (revision 9000)
++++ patch/trac/util/__init__.py (working copy)
+@@ -350,8 +350,17 @@
+
+ # -- setuptools utils
+
+-def get_module_path(module):
+- # Determine the plugin that this component belongs to
++def get_package_path(module):
++ """
++ Determine root path of the top level package the module belongs to
++
++ >>> trac_path = os.path.dirname(sys.modules['trac'].__file__)
++ >>> get_package_path(sys.modules['trac.util.compat']) == trac_path
++ True
++ >>> get_package_path(sys.modules['trac']) == trac_path
++ True
++ >>> trac_path
++ """
+ path = module.__file__
+ module_name = module.__name__
+ if path.endswith('.pyc') or path.endswith('.pyo'):
+@@ -360,10 +369,10 @@
+ path = os.path.dirname(path)
+ base_path = os.path.splitext(path)[0]
+ while base_path.replace(os.sep, '.').endswith(module_name):
++ if "." not in module_name:
++ break
+ base_path = os.path.dirname(base_path)
+ module_name = '.'.join(module_name.split('.')[:-1])
+- if not module_name:
+- break
+ return base_path
+
+ def get_pkginfo(dist):
+@@ -381,7 +390,7 @@
+ try:
+ from pkg_resources import find_distributions
+ module = dist
+- module_path = get_module_path(module)
++ module_path = os.path.dirname(get_package_path(module))
+ for dist in find_distributions(module_path, only=True):
+ if os.path.isfile(module_path) or \
+ dist.key == module.__name__.lower():
Property changes on: packages/trac/trunk/debian/patches/80_correct_plugin_names.dpatch
___________________________________________________________________
Added: svn:executable
+ *
More information about the Python-apps-commits
mailing list