Trac - 从 0.12.5 升级到 1.0.1 的问题

Trac - Problems upgrading from 0.12.5 to 1.0.1

我一直在尝试在 debian squeeze 上将我们的 trac 环境从 0.12.5 升级到 1.0.1。我使用 wheezy backports 更新了它。

我使用 apt-get 安装新版本后 运行 以下内容:

trac-admin /var/lib/trac upgrade
trac-admin /var/lib/trac wiki upgrade

当我在浏览器中打开 trac 时,出现以下错误:

    Trac[env] WARNING: base_url option not set in configuration, generated links may be incorrect
Trac[loader] ERROR: Skipping "trac.wiki.admin = trac.wiki.admin": (can't import "ImportError: No module named admin")
Trac[loader] ERROR: Skipping "tracopt.ticket.commit_updater = tracopt.ticket.commit_updater": (can't import "ImportError: cannot import name cleandoc_")
Trac[loader] ERROR: Skipping "tracopt.versioncontrol.svn.svn_fs = tracopt.versioncontrol.svn.svn_fs": (can't import "ImportError: cannot import name ChoiceOption")
Trac[loader] ERROR: Skipping "tracopt.ticket.clone = tracopt.ticket.clone": (can't import "ImportError: cannot import name captioned_button")
Trac[loader] ERROR: Skipping "tracopt.ticket.deleter = tracopt.ticket.deleter": (can't import "ImportError: cannot import name from_utimestamp")
Trac[loader] ERROR: Skipping "trac.wiki.web_api = trac.wiki.web_api": (can't import "ImportError: No module named web_api")
Trac[loader] ERROR: Skipping "trac.versioncontrol.admin = trac.versioncontrol.admin": (can't import "ImportError: No module named admin")
Trac[loader] ERROR: Skipping "trac.ticket.batch = trac.ticket.batch": (can't import "ImportError: No module named batch")
Trac[loader] ERROR: Skipping "tracopt.perm.config_perm_provider = tracopt.perm.config_perm_provider": (can't import "ImportError: cannot import name ConfigSection")
Trac[loader] ERROR: Failed to load plugin from /var/lib/trac/plugins/setup.py: 
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/loader.py", line 91, in _load_py_files

据我所知,如果有帮助,我安装了以下插件:

TracHierWiki

TracXMLRPC

在我看来,这条线

Failed to load plugin from /var/lib/trac/plugins/setup.py

意味着,在您的 Trac 环境的 /plugin 目录中没有正确打包的多文件 Trac 插件源代码(setup.py 文件),那一定不存在。

最近在 Trac ticket #11846 中讨论了这种情况,作为上游 Trac 开发的解决方案。